diff --git a/English.lproj/RepositoryWindow.xib b/English.lproj/RepositoryWindow.xib index bf277d9..d3b0ec6 100644 --- a/English.lproj/RepositoryWindow.xib +++ b/English.lproj/RepositoryWindow.xib @@ -8,7 +8,6 @@ 352.00 YES - YES @@ -72,10 +71,9 @@ - + 265 {{0, 14}, {183, 22}} - YES 343014976 @@ -171,10 +169,9 @@ Branch - + 268 {{0, 14}, {134, 26}} - YES -2076049856 @@ -282,10 +279,9 @@ View selector - + 268 {{6, 14}, {66, 23}} - YES 67239424 @@ -771,21 +767,20 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ - + YES - - + YES @@ -794,10 +789,9 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ {3.40282e+38, 3.40282e+38} {213, 107} - + 274 {850, 418} - {{0, 0}, {1440, 878}} {213, 178} @@ -814,9 +808,9 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ shortName description + PBGitRevSpecifier YES - YES YES YES YES @@ -899,22 +893,6 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 215 - - - selectionIndexes: repository.currentBranch - - - - - - selectionIndexes: repository.currentBranch - selectionIndexes - repository.currentBranch - 2 - - - 218 - contentView @@ -1028,6 +1006,14 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 290 + + + branchesController + + + + 291 + @@ -1303,7 +1289,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ {3.40282e+38, 3.40282e+38} {213, 107} - {{429, 644}, {616, 227}} + {{429, 871}, {616, 0}} com.apple.InterfaceBuilder.CocoaPlugin {{132, 614}, {616, 0}} com.apple.InterfaceBuilder.CocoaPlugin @@ -1350,7 +1336,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ - 290 + 291 @@ -1362,12 +1348,14 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ YES YES + branchesController contentView searchController searchField YES + NSArrayController NSView NSArrayController NSSearchField diff --git a/PBGitRepository.m b/PBGitRepository.m index 2523ccb..b3589c2 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -231,7 +231,9 @@ static NSString* gitPath; if ([rev isEqualTo: r]) return r; + [self willChangeValueForKey:@"branches"]; [branches addObject: rev]; + [self didChangeValueForKey:@"branches"]; return rev; } diff --git a/PBGitWindowController.h b/PBGitWindowController.h index 008526e..c7f589c 100644 --- a/PBGitWindowController.h +++ b/PBGitWindowController.h @@ -12,6 +12,7 @@ @interface PBGitWindowController : NSWindowController { IBOutlet NSSearchField* searchField; IBOutlet NSArrayController* searchController; + IBOutlet NSArrayController *branchesController; PBGitRepository* repository; int selectedViewIndex; IBOutlet NSView* contentView; diff --git a/PBGitWindowController.m b/PBGitWindowController.m index 8612ebd..1a40152 100644 --- a/PBGitWindowController.m +++ b/PBGitWindowController.m @@ -70,6 +70,8 @@ - (void)awakeFromNib { + // We bind this ourselves because otherwise we would lose our selection + [branchesController bind:@"selectionIndexes" toObject:repository withKeyPath:@"currentBranch" options:nil]; NSLog(@"CurrentBranch: %@", repository.currentBranch); [self changeViewController:0]; }