diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-09-04 11:55:54 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-09-04 11:55:54 +0000 |
commit | 3352744652a821093ef1138187609cdca5c9fef7 (patch) | |
tree | 61722ea2c5d6f37ec7af942553ade03158abf09f /Source/CustomQuery.m | |
parent | 51246e91d7709ea1083039be88b9076bec7b3c44 (diff) | |
download | sequelpro-3352744652a821093ef1138187609cdca5c9fef7.tar.gz sequelpro-3352744652a821093ef1138187609cdca5c9fef7.tar.bz2 sequelpro-3352744652a821093ef1138187609cdca5c9fef7.zip |
• prepared Query Name Sheet for choosing the target of the to be saved query favorite (global or not)
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r-- | Source/CustomQuery.m | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index d679a1de..bbad9edc 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -154,6 +154,7 @@ modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"addSelectionToNewQueryFavorite"]; + } if ([queryFavoritesButton indexOfSelectedItem] == 2) { @@ -2489,14 +2490,20 @@ queryToBeAddded = [textView string]; } - [favorites addObject:[NSDictionary dictionaryWithObjects: - [NSArray arrayWithObjects:[queryFavoriteNameTextField stringValue], queryToBeAddded, nil] - forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]]; - - [prefs setObject:favorites forKey:@"queryFavorites"]; - [prefs synchronize]; + if([saveQueryFavoriteGlobal state] == NSOnState) { + [favorites addObject:[NSDictionary dictionaryWithObjects: + [NSArray arrayWithObjects:[queryFavoriteNameTextField stringValue], queryToBeAddded, nil] + forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]]; + [prefs setObject:favorites forKey:@"queryFavorites"]; + } else { + [SPTooltip showWithObject:@"Not yet implemented"]; + } + + [saveQueryFavoriteGlobal setState:NSOffState]; + [self queryFavoritesHaveBeenUpdated:nil]; + } } |