aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CustomQuery.h1
-rw-r--r--Source/CustomQuery.m19
2 files changed, 14 insertions, 6 deletions
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h
index cedccab0..9d1559e6 100644
--- a/Source/CustomQuery.h
+++ b/Source/CustomQuery.h
@@ -76,6 +76,7 @@
IBOutlet NSWindow *queryFavoritesSheet;
IBOutlet NSButton *saveQueryFavoriteButton;
IBOutlet NSTextField *queryFavoriteNameTextField;
+ IBOutlet id saveQueryFavoriteGlobal;
IBOutlet NSWindow *helpWebViewWindow;
IBOutlet WebView *helpWebView;
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];
+
}
}