diff options
author | avenjamin <avenjamin@gmail.com> | 2009-11-09 23:59:05 +0000 |
---|---|---|
committer | avenjamin <avenjamin@gmail.com> | 2009-11-09 23:59:05 +0000 |
commit | 404e21cfa7e9d20b7afeac10675b61fab621eeec (patch) | |
tree | 9933129c63debacf6fbd4c11e0cc85ea84f48a9f /Source/SPTableRelations.m | |
parent | 171a50a5aa737d2bf096cea931107f9978771edb (diff) | |
download | sequelpro-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/SPTableRelations.m')
-rw-r--r-- | Source/SPTableRelations.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 1f37f8f7..d16838be 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -190,8 +190,8 @@ if ([relationsTableView numberOfSelectedRows] > 0) { NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Delete relation", @"delete relation message") - defaultButton:NSLocalizedString(@"Cancel", @"cancel button") - alternateButton:NSLocalizedString(@"Delete", @"delete button") + defaultButton:NSLocalizedString(@"Delete", @"delete button") + alternateButton:NSLocalizedString(@"Cancel", @"cancel button") otherButton:nil informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to delete the selected relations? This action cannot be undone.", @"delete selected relation informative message")]; @@ -200,7 +200,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"]; [alert beginSheetModalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:@"removeRelation"]; @@ -338,7 +339,7 @@ { if ([contextInfo isEqualToString:@"removeRelation"]) { - if (returnCode == NSAlertAlternateReturn) { + if (returnCode == NSAlertDefaultReturn) { NSString *thisTable = [tablesListInstance tableName]; NSIndexSet *selectedSet = [relationsTableView selectedRowIndexes]; |