From 78a094cff7a98489de2594cda8c56f491b288e88 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 7 Aug 2009 13:32:18 +0000 Subject: Make the cancel button on the delete database dialog have the key equivalent of return to be same as remove/truncate table. --- Source/TableDocument.m | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source') 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"]; -- cgit v1.2.3