mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Update views when switching
This commit is contained in:
@@ -112,6 +112,11 @@
|
||||
self.files = files;
|
||||
}
|
||||
|
||||
- (void) updateView
|
||||
{
|
||||
[self refresh:nil];
|
||||
}
|
||||
|
||||
- (void) doneProcessingIndex
|
||||
{
|
||||
if (!--self.busy)
|
||||
|
||||
@@ -173,6 +173,11 @@
|
||||
[repository.revisionList reload];
|
||||
}
|
||||
|
||||
- (void) updateView
|
||||
{
|
||||
[self refresh:nil];
|
||||
}
|
||||
|
||||
- (void) selectCommit: (NSString*) commit
|
||||
{
|
||||
NSPredicate* selection = [NSPredicate predicateWithFormat:@"realSha == %@", commit];
|
||||
|
||||
@@ -60,11 +60,16 @@
|
||||
case 0: // swap in the "CustomImageViewController - NSImageView"
|
||||
if (!historyViewController)
|
||||
historyViewController = [[PBGitHistoryController alloc] initWithRepository:repository superController:self];
|
||||
else
|
||||
[historyViewController updateView];
|
||||
viewController = historyViewController;
|
||||
break;
|
||||
case 1:
|
||||
if (!commitViewController)
|
||||
commitViewController = [[PBGitCommitController alloc] initWithRepository:repository superController:self];
|
||||
else
|
||||
[commitViewController updateView];
|
||||
|
||||
viewController = commitViewController;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@
|
||||
|
||||
- (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGitWindowController *)controller;
|
||||
- (void) removeView;
|
||||
- (void) updateView;
|
||||
@end
|
||||
|
||||
@@ -34,4 +34,10 @@
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
}
|
||||
|
||||
// This is called when the view is displayed again; it
|
||||
// should be updated to show the most recent information
|
||||
- (void) updateView
|
||||
{
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user