Fix the 'parent' link in commits

This allows you to click on the parent link to select a parent. Also fixes
an issue that the NSTableView would not scroll to the correct commit.
This commit is contained in:
Pieter de Bie
2008-09-12 11:42:06 +02:00
parent db68f38232
commit 8c076bb8ad
3 changed files with 10 additions and 3 deletions
+1
View File
@@ -39,6 +39,7 @@
- (IBAction) setRawView: sender;
- (IBAction) setTreeView: sender;
- (void) selectCommit: (NSString*) commit;
- (IBAction) refresh: sender;
- (IBAction) toggleQuickView: sender;
- (IBAction) openSelectedFile: sender;
+8
View File
@@ -152,6 +152,14 @@
repository.currentBranch = repository.currentBranch;
}
- (void) selectCommit: (NSString*) commit
{
NSPredicate* selection = [NSPredicate predicateWithFormat:@"sha == %@", commit];
NSArray* selectedCommits = [repository.revisionList.commits filteredArrayUsingPredicate:selection];
[commitController setSelectedObjects: selectedCommits];
int index = [[commitController selectionIndexes] firstIndex];
[commitList scrollRowToVisible: index];
}
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
+1 -3
View File
@@ -64,9 +64,7 @@
- (void) selectCommit: (NSString*) sha
{
NSPredicate* selection = [NSPredicate predicateWithFormat:@"sha == %@", sha];
NSArray* selectedCommits = [detailController.repository.revisionList.commits filteredArrayUsingPredicate:selection];
// TODO: reimplement this. How can we set the new commit? Our detailscontroller is read-only
[detailController selectCommit:sha];
}
+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector