Skip to content

Commit

Permalink
Remember the currently selected tab across sessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaran committed Aug 19, 2008
1 parent 2b0a4da commit 8de6a10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PBDetailController.m
Expand Up @@ -30,7 +30,7 @@ - (void)awakeFromNib
{
[fileBrowser setTarget:self];
[fileBrowser setDoubleAction:@selector(openSelectedFile:)];
self.selectedTab = 0;
self.selectedTab = [[NSUserDefaults standardUserDefaults] integerForKey:@"Repository Window Selected Tab Index"];;
[commitController addObserver:self forKeyPath:@"selection" options:(NSKeyValueObservingOptionNew,NSKeyValueObservingOptionOld) context:@"commitChange"];
[treeController addObserver:self forKeyPath:@"selection" options:0 context:@"treeChange"];
}
Expand Down Expand Up @@ -64,6 +64,7 @@ - (void) updateKeys
- (void) setSelectedTab: (int) number
{
selectedTab = number;
[[NSUserDefaults standardUserDefaults] setInteger:selectedTab forKey:@"Repository Window Selected Tab Index"];
[self updateKeys];
}

Expand Down

0 comments on commit 8de6a10

Please sign in to comment.