Files
gitx/PBGitWindowController.h
T
Pieter de Bie b2cd87cb72 GitWindow: Don't try to be smart with the view selector
Previously, we would try to copy the view selector from within
the RepositoryWindow, so we could reuse it and change it if we
need to.

However, that causes problems if you have another window open:
if we try to add an item using the insertItemWithIdentifier:atIndex:
method, the item will be added to _all_ toolbars with the same
identifier, even if those toolbars already have the item!

As I see no easy way to fix that, we completely avoid the issue
by not inserting any objects and just copying the view selector
from view to view.
2008-10-04 23:00:11 +02:00

31 lines
807 B
Objective-C

//
// PBDetailController.h
// GitX
//
// Created by Pieter de Bie on 16-06-08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PBGitRepository.h"
@interface PBGitWindowController : NSWindowController {
__weak PBGitRepository* repository;
int selectedViewIndex;
IBOutlet NSView* contentView;
NSViewController* viewController;
}
@property (assign) __weak PBGitRepository *repository;
@property (readonly) NSViewController *viewController;
@property (assign) int selectedViewIndex;
- (id)initWithRepository:(PBGitRepository*)theRepository displayDefault:(BOOL)display;
- (void)changeViewController:(NSInteger)whichViewTag;
- (void)useToolbar:(NSToolbar *)toolbar;
- (IBAction) showCommitView:(id)sender;
- (IBAction) showHistoryView:(id)sender;
@end