diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CustomQuery.h | 1 | ||||
-rw-r--r-- | Source/CustomQuery.m | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index 908dd594..9b75c906 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -47,6 +47,7 @@ IBOutlet id runSelectionButton; IBOutlet id runAllButton; IBOutlet NSMenuItem *runSelectionMenuItem; + IBOutlet NSMenuItem *clearHistoryMenuItem; IBOutlet NSMenuItem *shiftLeftMenuItem; IBOutlet NSMenuItem *shiftRightMenuItem; IBOutlet NSMenuItem *completionListMenuItem; diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index baa81170..3d6c18d0 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -161,6 +161,12 @@ closes the sheet */ - (IBAction)gearMenuItemSelected:(id)sender { + // "Clear History" menu item - clear query history + if (sender == clearHistoryMenuItem) { + [queryHistoryButton removeAllItems]; + [queryHistoryButton addItemWithTitle:NSLocalizedString(@"Query History…",@"Title of query history popup button")]; + [prefs setObject:[NSArray array] forKey:@"queryHistory"]; + } // "Shift Right" menu item - indent the selection with an additional tab. if (sender == shiftRightMenuItem) { |