aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryFavoriteManager.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/SPQueryFavoriteManager.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/SPQueryFavoriteManager.m')
-rw-r--r--Source/SPQueryFavoriteManager.m20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index 5a766853..e99706db 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -240,8 +240,8 @@
- (IBAction)removeQueryFavorite:(id)sender
{
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected query favorites?", @"remove selected query favorites 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 query favorites? This action cannot be undone.", @"remove all selected query favorites informative message")];
@@ -250,8 +250,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:@"removeSelectedFavorites"];
}
@@ -262,8 +263,8 @@
- (IBAction)removeAllQueryFavorites:(id)sender
{
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove all query favorites?", @"remove all query favorites message")
- defaultButton:NSLocalizedString(@"Cancel", @"cancel button")
- alternateButton:NSLocalizedString(@"Remove All", @"remove all button")
+ defaultButton:NSLocalizedString(@"Remove All", @"remove all button")
+ alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
otherButton:nil
informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to remove all of your saved query favorites? This action cannot be undone.", @"remove all query favorites informative message")];
@@ -272,8 +273,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:@"removeAllFavorites"];
}
@@ -672,7 +674,7 @@
// }
// }
if([contextInfo isEqualToString:@"removeSelectedFavorites"]) {
- if (returnCode == NSAlertAlternateReturn) {
+ if (returnCode == NSAlertDefaultReturn) {
NSIndexSet *indexes = [favoritesTableView selectedRowIndexes];
// get last index