CLI: Show history view if necessary

This commit is contained in:
Pieter de Bie
2008-11-19 02:21:02 +01:00
parent b2c03bc97b
commit edf4822e34
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -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];
+4 -2
View File
@@ -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 -