aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-06-20 22:32:37 +0000
committerrowanbeentje <rowan@beent.je>2011-06-20 22:32:37 +0000
commit3828e4ced24e5f8125a5d95c78a1c7e0c9bed39a (patch)
treef84a03866f2a8ab0cbc6b52e93fc41ec936ad58c /Source
parentf589953f799a2288f9d9bb24f97c60a8056ad67e (diff)
downloadsequelpro-3828e4ced24e5f8125a5d95c78a1c7e0c9bed39a.tar.gz
sequelpro-3828e4ced24e5f8125a5d95c78a1c7e0c9bed39a.tar.bz2
sequelpro-3828e4ced24e5f8125a5d95c78a1c7e0c9bed39a.zip
- Fix exceptions seen in 0.9.9RC related to query favorites with nil query texts (L2239)
- Update localisable strings
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCustomQuery.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index e51da22c..eacffe3b 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -3408,7 +3408,9 @@
initWithString:([favorite objectForKey:@"tabtrigger"] && [(NSString*)[favorite objectForKey:@"tabtrigger"] length]) ? [NSString stringWithFormat:@"%@\t%@⇥", [favorite objectForKey:@"name"], [favorite objectForKey:@"tabtrigger"]] : [favorite objectForKey:@"name"]
attributes:attributes] autorelease];
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""];
- [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]];
+ if ([favorite objectForKey:@"query"]) {
+ [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]];
+ }
[item setAttributedTitle:titleString];
[item setIndentationLevel:1];
[menu addItem:item];
@@ -3433,7 +3435,9 @@
initWithString:([favorite objectForKey:@"tabtrigger"] && [(NSString*)[favorite objectForKey:@"tabtrigger"] length]) ? [NSString stringWithFormat:@"%@\t%@⇥", [favorite objectForKey:@"name"], [favorite objectForKey:@"tabtrigger"]] : [favorite objectForKey:@"name"]
attributes:attributes] autorelease];
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""];
- [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]];
+ if ([favorite objectForKey:@"query"]) {
+ [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]];
+ }
[item setAttributedTitle:titleString];
[item setIndentationLevel:1];
[menu addItem:item];