Set keyboard focus reasonably when switching between views.

When you switch to the commit view, the commit message gets focus;
when you switch to the history view, the commit list gets focus.
This commit is contained in:
Nicholas Riley
2009-06-16 23:25:53 -05:00
committed by Pieter de Bie
parent 7baf854666
commit f2a37df9f5
5 changed files with 17 additions and 0 deletions
+4
View File
@@ -47,6 +47,10 @@
[webController closeView];
[super finalize];
}
- (NSResponder *)firstResponder;
{
return commitMessageView;
}
- (IBAction)signOff:(id)sender
{
+5
View File
@@ -179,6 +179,11 @@
[self refresh:nil];
}
- (NSResponder *)firstResponder;
{
return commitList;
}
- (void) selectCommit: (NSString*) commit
{
NSPredicate* selection = [NSPredicate predicateWithFormat:@"realSha == %@", commit];
+1
View File
@@ -100,6 +100,7 @@
[self setNextResponder: viewController];
[self didChangeValueForKey:@"viewController"]; // this will trigger the NSTextField's value binding to change
[[self window] makeFirstResponder:[viewController firstResponder]];
}
- (void)awakeFromNib
+2
View File
@@ -23,4 +23,6 @@
- (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGitWindowController *)controller;
- (void) removeView;
- (void) updateView;
- (NSResponder *)firstResponder;
@end
+5
View File
@@ -40,4 +40,9 @@
- (void) updateView
{
}
- (NSResponder *)firstResponder;
{
return nil;
}
@end