mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
b2cd87cb72
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.
31 lines
807 B
Objective-C
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
|