diff --git a/PBGitHistoryController.h b/PBGitHistoryController.h index 6d46ad1..b8bf8a3 100644 --- a/PBGitHistoryController.h +++ b/PBGitHistoryController.h @@ -76,9 +76,11 @@ - (IBAction) openSelectedFile:(id)sender; - (BOOL) selectCommit: (NSString*) commit; +- (void) updateKeys; - (void) updateQuicklookForce: (BOOL) force; +- (void) scrollSelectionToTopOfViewFrom:(NSInteger)oldIndex; // Moved over Sidebar methods - (IBAction) fetchPullPushAction:(id)sender; diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m index 48895f8..6b77175 100644 --- a/PBGitHistoryController.m +++ b/PBGitHistoryController.m @@ -82,6 +82,12 @@ [repository addObserver:self forKeyPath:@"currentBranch" options:0 context:@"branchChange"]; [repository addObserver:self forKeyPath:@"refs" options:0 context:@"updateRefs"]; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self + selector:@selector(preferencesChangedWithNotification:) + name:NSUserDefaultsDidChangeNotification + object:nil]; + forceSelectionUpdate = YES; NSSize cellSpacing = [commitList intercellSpacing]; cellSpacing.height = 0; @@ -183,6 +189,10 @@ self.status = [NSString stringWithFormat:@"%d commits loaded", [[commitController arrangedObjects] count]]; } +- (void) preferencesChangedWithNotification:(NSNotification *)notification { + [[[repository windowForSheet] contentView] setNeedsDisplay:YES]; +} + - (void) restoreFileBrowserSelection { if (self.selectedCommitDetailsIndex != kHistoryTreeViewIndex)