mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
CLI: Show history view if necessary
This commit is contained in:
+2
-1
@@ -53,10 +53,11 @@
|
||||
|
||||
if ([arguments count] > 0 && ([[arguments objectAtIndex:0] isEqualToString:@"--commit"] ||
|
||||
[[arguments objectAtIndex:0] isEqualToString:@"-c"]))
|
||||
((PBGitWindowController *)document.windowController).selectedViewIndex = 1;
|
||||
[((PBGitWindowController *)document.windowController) showCommitView:self];
|
||||
else {
|
||||
PBGitRevSpecifier* rev = [[PBGitRevSpecifier alloc] initWithParameters:arguments];
|
||||
document.currentBranch = [document addBranch: rev];
|
||||
[(PBGitWindowController *)document.windowController showHistoryView:self];
|
||||
}
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
|
||||
|
||||
@@ -77,12 +77,14 @@
|
||||
|
||||
- (void) showCommitView:(id)sender
|
||||
{
|
||||
self.selectedViewIndex = 1;
|
||||
if (self.selectedViewIndex != 1)
|
||||
self.selectedViewIndex = 1;
|
||||
}
|
||||
|
||||
- (void) showHistoryView:(id)sender
|
||||
{
|
||||
self.selectedViewIndex = 0;
|
||||
if (self.selectedViewIndex != 0)
|
||||
self.selectedViewIndex = 0;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user