aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.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/TablesList.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/TablesList.m')
-rw-r--r--Source/TablesList.m12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index e35b65e1..fbbd412c 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -299,7 +299,8 @@
NSArray *buttons = [alert buttons];
// Change the alert's cancel button to have the key equivalent of return
- [[buttons objectAtIndex:0] setKeyEquivalent:@""];
+ [[buttons objectAtIndex:0] setKeyEquivalent:@"d"];
+ [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask];
[[buttons objectAtIndex:1] setKeyEquivalent:@"\r"];
NSIndexSet *indexes = [tablesListView selectedRowIndexes];
@@ -456,14 +457,19 @@
[tableWindow endEditingFor:nil];
- NSAlert *alert = [NSAlert alertWithMessageText:@"" defaultButton:NSLocalizedString(@"Truncate", @"truncate button") alternateButton:NSLocalizedString(@"Cancel", @"cancel button") otherButton:nil informativeTextWithFormat:@""];
+ NSAlert *alert = [NSAlert alertWithMessageText:@""
+ defaultButton:NSLocalizedString(@"Truncate", @"truncate button")
+ alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
+ otherButton:nil
+ informativeTextWithFormat:@""];
[alert setAlertStyle:NSCriticalAlertStyle];
NSArray *buttons = [alert buttons];
// Change the alert's cancel button to have the key equivalent of return
- [[buttons objectAtIndex:0] setKeyEquivalent:@""];
+ [[buttons objectAtIndex:0] setKeyEquivalent:@"t"];
+ [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask];
[[buttons objectAtIndex:1] setKeyEquivalent:@"\r"];
if ([tablesListView numberOfSelectedRows] == 1) {