WIP: Move the sidebar to the history view instead

I'm not sure what we should do with the commit stuff, but
this seems more reasonable
This commit is contained in:
Pieter de Bie
2009-09-13 22:44:26 +02:00
parent 692a79c3ad
commit ff1d30571b
4 changed files with 17 additions and 6 deletions
+3
View File
@@ -12,7 +12,10 @@
#import "PBViewController.h"
#import "PBCollapsibleSplitView.h"
@class PBGitSidebarController;
@interface PBGitHistoryController : PBViewController {
PBGitSidebarController *sidebarController;
IBOutlet NSSearchField *searchField;
IBOutlet NSArrayController* commitController;
IBOutlet NSTreeController* treeController;
+14
View File
@@ -11,6 +11,7 @@
#import "PBGitGrapher.h"
#import "PBGitRevisionCell.h"
#import "PBCommitList.h"
#import "PBGitSidebarController.h"
#define QLPreviewPanel NSClassFromString(@"QLPreviewPanel")
@@ -29,6 +30,19 @@
[fileBrowser setTarget:self];
[fileBrowser setDoubleAction:@selector(openSelectedFile:)];
[historySplitView removeFromSuperview];
NSSplitView *newView = [[NSSplitView alloc] initWithFrame:[historySplitView frame]];
sidebarController = [[PBGitSidebarController alloc] initWithRepository:repository superController:superController];
[newView setDividerStyle:NSSplitViewDividerStyleThin];
[newView addSubview:[sidebarController view]];
[newView addSubview:historySplitView];
[newView setVertical:YES];
[newView adjustSubviews];
[newView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
[[self view] addSubview:newView];
if (!repository.currentBranch) {
[repository reloadRefs];
[repository readCurrentBranch];
-2
View File
@@ -20,8 +20,6 @@
PBViewController *commitViewController;
PBViewController* viewController;
PBGitSidebarController *sidebarController;
}
@property (assign) __weak PBGitRepository *repository;
-4
View File
@@ -29,10 +29,6 @@
else
self.selectedViewIndex = -1;
// Sidebar
sidebarController = [[PBGitSidebarController alloc] initWithRepository:repository superController:self];
// Hack for now
[sidebarController view];
return self;
}