aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authormtvee <emptyvee@gmail.com>2009-05-15 18:00:28 +0000
committermtvee <emptyvee@gmail.com>2009-05-15 18:00:28 +0000
commitf89d0585f3ac7673fab007d50fc40db7e76c58c3 (patch)
treeea7ad0aed5b90928b1b5c1e557cbef27ec905c71 /Source/TablesList.m
parent4984644813df727591c0d7d05fe3b505d67fd69d (diff)
downloadsequelpro-f89d0585f3ac7673fab007d50fc40db7e76c58c3.tar.gz
sequelpro-f89d0585f3ac7673fab007d50fc40db7e76c58c3.tar.bz2
sequelpro-f89d0585f3ac7673fab007d50fc40db7e76c58c3.zip
- attempt fix for alert issues when deleting tables, etc.
- localize relations view dialogs
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 4da85d7f..6c81be4f 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -505,11 +505,13 @@
/**
* Method for alert sheets. Invoked when user wants to delete a table.
*/
-- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+- (void)sheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
{
+
if ( [contextInfo isEqualToString:@"addRow"] ) {
alertSheetOpened = NO;
} else if ( [contextInfo isEqualToString:@"removeRow"] ) {
+ [[sheet window] orderOut:nil];
if ( returnCode == NSAlertDefaultReturn ) {
[self removeTable];
}
@@ -572,7 +574,8 @@
currentIndex = [indexes indexLessThanIndex:currentIndex];
}
- [tablesListView deselectAll:self];
+ //[tablesListView deselectAll:self];
+
//[tableSourceInstance loadTable:nil];
//[tableContentInstance loadTable:nil];
//[tableStatusInstance loadTable:nil];
@@ -583,15 +586,17 @@
[tableDocumentInstance name], [tableDocumentInstance database]]];
if ( error ) {
- /* the first sheet is not closed and we try and run this
NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText]);
- */
+
+ /*
NSRunAlertPanel(NSLocalizedString(@"Error", @"error"),
[NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText],
NSLocalizedString(@"OK", @"OK button"), nil, nil, nil );
+ */
}
-
+
+ [tablesListView deselectAll:self];
}
/**