aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPContentFilterManager.m
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2009-11-09 23:59:05 +0000
committeravenjamin <avenjamin@gmail.com>2009-11-09 23:59:05 +0000
commit404e21cfa7e9d20b7afeac10675b61fab621eeec (patch)
tree9933129c63debacf6fbd4c11e0cc85ea84f48a9f /Source/SPContentFilterManager.m
parent171a50a5aa737d2bf096cea931107f9978771edb (diff)
downloadsequelpro-404e21cfa7e9d20b7afeac10675b61fab621eeec.tar.gz
sequelpro-404e21cfa7e9d20b7afeac10675b61fab621eeec.tar.bz2
sequelpro-404e21cfa7e9d20b7afeac10675b61fab621eeec.zip
Set keyboard shortcut for Delete button in alert dialogs to command D.
Set keyboard shortcut for Truncate button in alert dialog to command T
Diffstat (limited to 'Source/SPContentFilterManager.m')
-rw-r--r--Source/SPContentFilterManager.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index d6a7f1e3..44e74ebc 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -270,8 +270,8 @@
- (IBAction)removeContentFilter:(id)sender
{
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected content filters?", @"remove selected content filters message")
- defaultButton:NSLocalizedString(@"Cancel", @"cancel button")
- alternateButton:NSLocalizedString(@"Remove", @"remove button")
+ defaultButton:NSLocalizedString(@"Remove", @"remove button")
+ alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
otherButton:nil
informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to remove all selected content filters? This action cannot be undone.", @"remove all selected content filters informative message")];
@@ -280,8 +280,9 @@
NSArray *buttons = [alert buttons];
// Change the alert's cancel button to have the key equivalent of return
- [[buttons objectAtIndex:0] setKeyEquivalent:@"\r"];
- [[buttons objectAtIndex:1] setKeyEquivalent:@""];
+ [[buttons objectAtIndex:0] setKeyEquivalent:@"d"];
+ [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask];
+ [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"];
[alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeSelectedFilters"];
}
@@ -706,7 +707,7 @@
// }
// }
if([contextInfo isEqualToString:@"removeSelectedFilters"]) {
- if (returnCode == NSAlertAlternateReturn) {
+ if (returnCode == NSAlertDefaultReturn) {
NSIndexSet *indexes = [contentFilterTableView selectedRowIndexes];
// get last index