aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-09-30 17:06:06 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-09-30 17:06:06 +0000
commitb61c01f4d7cf69ba0cac74afd18ec9f05d5526eb (patch)
tree80366c43d42dac7cf28aacd22dac21c180820c19 /AppKit
parent14d386b499c8495b3725469cc0cd3393e0c613e6 (diff)
[Author: dmaclach]
Allow tabbing to move around dialog, and add a description method. R=thomasvl DELTA=11 (10 added, 0 deleted, 1 changed)
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMHotKeyTextField.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/AppKit/GTMHotKeyTextField.m b/AppKit/GTMHotKeyTextField.m
index 8c8703d..df5853a 100644
--- a/AppKit/GTMHotKeyTextField.m
+++ b/AppKit/GTMHotKeyTextField.m
@@ -94,6 +94,12 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
return NSCopyObject(self, 0, zone);
}
+- (NSString *)description {
+ return [NSString stringWithFormat:@"<%@ %p> - %@",
+ [self class], self,
+ [GTMHotKeyTextFieldCell displayStringForHotKey:self]];
+}
+
@end
@implementation GTMHotKeyTextField
@@ -672,7 +678,11 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
(modifierFlags == (NSCommandKeyMask | NSShiftKeyMask))) {
NSBeep();
bypass = YES;
+ } else if (modifierFlags == 0 || modifierFlags == NSShiftKeyMask) {
+ // Probably attempting to tab around the dialog.
+ bypass = YES;
}
+
} else if ((keyCode == 12) && (modifierFlags == NSCommandKeyMask)) {
// Don't eat Cmd-Q. Users could have it as a hotkey, but its more likely
// they're trying to quit