aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseRename.m
diff options
context:
space:
mode:
authordrx777 <david.rekowski@gmx.de>2010-04-29 18:31:39 +0000
committerdrx777 <david.rekowski@gmx.de>2010-04-29 18:31:39 +0000
commit230f6295f5c6a80201410bc0347e83920df08bfe (patch)
tree117a1b34368d5c007b564438012f13e9c3db4e63 /Source/SPDatabaseRename.m
parente2810ccbe30371974a7df888dc5656ac9311677f (diff)
downloadsequelpro-230f6295f5c6a80201410bc0347e83920df08bfe.tar.gz
sequelpro-230f6295f5c6a80201410bc0347e83920df08bfe.tar.bz2
sequelpro-230f6295f5c6a80201410bc0347e83920df08bfe.zip
Cleanup/simplification: using messageWindow property directly instead of the getTableWindow method; removed the latter
Diffstat (limited to 'Source/SPDatabaseRename.m')
-rw-r--r--Source/SPDatabaseRename.m12
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m
index aa3a401a..448b2690 100644
--- a/Source/SPDatabaseRename.m
+++ b/Source/SPDatabaseRename.m
@@ -42,10 +42,6 @@
return dbInfo;
}
-- (NSObject *)getTableWindow {
- return messageWindow;
-}
-
- (BOOL)renameDatabaseFrom: (NSString *)sourceDatabaseName to: (NSString *)targetDatabaseName {
SPDatabaseInfo *databaseInfo = [self getDBInfoObject];
@@ -59,7 +55,7 @@
tables = [connection listTablesFromDB:sourceDatabaseName];
} else {
SPBeginAlertSheet(NSLocalizedString(@"Cannot create existing database", @"create database exists error message"),
- NSLocalizedString(@"OK", @"OK button"), nil, nil, [self getTableWindow], self, nil, nil, nil,
+ NSLocalizedString(@"OK", @"OK button"), nil, nil, messageWindow, self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to create the target database.\n\nDatabase %@ already exists.",
@"create database error informative message"),
targetDatabaseName]);
@@ -82,7 +78,7 @@
[self dropDatabase:sourceDatabaseName];
} else {
SPBeginAlertSheet(NSLocalizedString(@"Failed to delete database", @"delete database error message"),
- NSLocalizedString(@"OK", @"OK button"), nil, nil, [self getTableWindow], self, nil, nil, nil,
+ NSLocalizedString(@"OK", @"OK button"), nil, nil, messageWindow, self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"Database %@ not empty, skipping drop database.",
@"delete database not empty error informative message"),
sourceDatabaseName]);
@@ -95,7 +91,7 @@
[connection queryString:createStatement];
if ([connection queryErrored]) {
SPBeginAlertSheet(NSLocalizedString(@"Failed to create database", @"create database error message"),
- NSLocalizedString(@"OK", @"OK button"), nil, nil, [self getTableWindow], self, nil, nil, nil,
+ NSLocalizedString(@"OK", @"OK button"), nil, nil, messageWindow, self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to create a database.\n\nMySQL said: %@",
@"create database error informative message"),
[connection getLastErrorMessage]]);
@@ -111,7 +107,7 @@
[connection queryString:dropStatement];
if ([connection queryErrored]) {
SPBeginAlertSheet(NSLocalizedString(@"Failed to drop database", @"drop database error message"),
- NSLocalizedString(@"OK", @"OK button"), nil, nil, [self getTableWindow], self, nil, nil, nil,
+ NSLocalizedString(@"OK", @"OK button"), nil, nil, messageWindow, self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to drop a database.\n\nMySQL said: %@",
@"drop database error informative message"),
[connection getLastErrorMessage]]);