diff options
author | stuconnolly <stuart02@gmail.com> | 2009-08-07 13:32:18 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-08-07 13:32:18 +0000 |
commit | 78a094cff7a98489de2594cda8c56f491b288e88 (patch) | |
tree | fce0008916379213f939c953ab1454adf30d12da /Source | |
parent | 6eb8a2308d7e891cbf5510ec01f5d8721268011b (diff) | |
download | sequelpro-78a094cff7a98489de2594cda8c56f491b288e88.tar.gz sequelpro-78a094cff7a98489de2594cda8c56f491b288e88.tar.bz2 sequelpro-78a094cff7a98489de2594cda8c56f491b288e88.zip |
Make the cancel button on the delete database dialog have the key equivalent of return to be same as remove/truncate table.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 851fc746..320c4d01 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -549,6 +549,12 @@ otherButton:nil informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to delete the database '%@'. This operation cannot be undone.", @"delete database informative message"), [self database]]]; + NSArray *buttons = [alert buttons]; + + // Change the alert's cancel button to have the key equivalent of return + [[buttons objectAtIndex:0] setKeyEquivalent:@""]; + [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; + [alert setAlertStyle:NSCriticalAlertStyle]; [alert beginSheetModalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removedatabase"]; |