aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMHotKeyTextField.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-11-10 20:36:02 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-11-10 20:36:02 +0000
commit8b6fbb8fa94600574337580cd1c3d7511379b8d4 (patch)
tree5876b4ac4cee078eac615ce6863d2fcab5ab8457 /AppKit/GTMHotKeyTextField.m
parent699407b316e8a9b49370fe65941f257665b2c83e (diff)
[Author: dmaclach]
Fix up GTMHotKeyTextField so that it compiles cleanly with format string warnings on. Change to match other controls where string value always returns the empty string as opposed to nil. R=thomasvl DELTA=7 (4 added, 0 deleted, 3 changed)
Diffstat (limited to 'AppKit/GTMHotKeyTextField.m')
-rw-r--r--AppKit/GTMHotKeyTextField.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/AppKit/GTMHotKeyTextField.m b/AppKit/GTMHotKeyTextField.m
index df5853a..276f212 100644
--- a/AppKit/GTMHotKeyTextField.m
+++ b/AppKit/GTMHotKeyTextField.m
@@ -148,7 +148,11 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
}
- (NSString *)stringValue {
- return [[self class] displayStringForHotKey:hotKey_];
+ NSString *value = [[self class] displayStringForHotKey:hotKey_];
+ if (!value) {
+ value = @"";
+ }
+ return value;
}
- (void)setStringValue:(NSString *)string {