diff options
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]; + } } |