mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
PBViewController *commitViewController;
|
||||
|
||||
PBViewController* viewController;
|
||||
|
||||
PBGitSidebarController *sidebarController;
|
||||
}
|
||||
|
||||
@property (assign) __weak PBGitRepository *repository;
|
||||
|
||||
@@ -29,10 +29,6 @@
|
||||
else
|
||||
self.selectedViewIndex = -1;
|
||||
|
||||
// Sidebar
|
||||
sidebarController = [[PBGitSidebarController alloc] initWithRepository:repository superController:self];
|
||||
// Hack for now
|
||||
[sidebarController view];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user