aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDBActionCommons.h12
-rw-r--r--Source/SPDBActionCommons.m3
-rw-r--r--Source/SPDatabaseCopy.m4
-rw-r--r--Source/SPDatabaseInfo.m2
-rw-r--r--Source/SPDatabaseRename.m4
-rw-r--r--Source/SPTableCopy.m2
-rw-r--r--Source/TableDocument.m4
7 files changed, 12 insertions, 19 deletions
diff --git a/Source/SPDBActionCommons.h b/Source/SPDBActionCommons.h
index 042fd5dc..334b0c78 100644
--- a/Source/SPDBActionCommons.h
+++ b/Source/SPDBActionCommons.h
@@ -32,8 +32,7 @@
@interface SPDBActionCommons : NSObject {
MCPConnection *connection;
- NSObject *parent;
- NSDocument *messageDocument;
+ NSWindow *messageWindow;
}
/**
@@ -42,13 +41,8 @@
@property (retain) MCPConnection *connection;
/**
- * @property the parent object that issues the action, needs to provide stuff like tableWindow for messages
+ * @property the NSWindow instance to send message sheets to
*/
-@property (retain) NSObject *parent;
-
-/**
- * @property the NSDocument instance to send message sheets to
- */
-@property (retain) NSDocument *messageDocument;
+@property (assign) NSWindow *messageWindow;
@end
diff --git a/Source/SPDBActionCommons.m b/Source/SPDBActionCommons.m
index c0580622..977b3b5d 100644
--- a/Source/SPDBActionCommons.m
+++ b/Source/SPDBActionCommons.m
@@ -30,7 +30,6 @@
@implementation SPDBActionCommons
@synthesize connection;
-@synthesize parent;
-@synthesize messageDocument;
+@synthesize messageWindow;
@end
diff --git a/Source/SPDatabaseCopy.m b/Source/SPDatabaseCopy.m
index e5daae0c..6fc52ae8 100644
--- a/Source/SPDatabaseCopy.m
+++ b/Source/SPDatabaseCopy.m
@@ -36,13 +36,13 @@
} else {
dbInfo = [[SPDatabaseInfo alloc] init];
[dbInfo setConnection:[self connection]];
- [dbInfo setParent:[self parent]];
+ [dbInfo setMessageWindow:messageWindow];
}
return dbInfo;
}
- (NSObject *)getTableWindow {
- return [NSApp mainWindow];
+ return messageWindow;
}
- (BOOL)copyDatabaseFrom: (NSString *)sourceDatabaseName to: (NSString *)targetDatabaseName withContent:(BOOL)copyWithContent {
diff --git a/Source/SPDatabaseInfo.m b/Source/SPDatabaseInfo.m
index 9dbf2098..6c5b3f66 100644
--- a/Source/SPDatabaseInfo.m
+++ b/Source/SPDatabaseInfo.m
@@ -28,7 +28,7 @@
@implementation SPDatabaseInfo
- (NSObject *)getTableWindow {
- return [NSApp mainWindow];
+ return messageWindow;
}
-(BOOL)databaseExists:(NSString *)databaseName {
diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m
index 75478412..aa3a401a 100644
--- a/Source/SPDatabaseRename.m
+++ b/Source/SPDatabaseRename.m
@@ -37,13 +37,13 @@
} else {
dbInfo = [[SPDatabaseInfo alloc] init];
[dbInfo setConnection:[self connection]];
- [dbInfo setParent:[self parent]];
+ [dbInfo setMessageWindow:messageWindow];
}
return dbInfo;
}
- (NSObject *)getTableWindow {
- return [NSApp mainWindow];
+ return messageWindow;
}
- (BOOL)renameDatabaseFrom: (NSString *)sourceDatabaseName to: (NSString *)targetDatabaseName {
diff --git a/Source/SPTableCopy.m b/Source/SPTableCopy.m
index 6a73bb20..19bff7c2 100644
--- a/Source/SPTableCopy.m
+++ b/Source/SPTableCopy.m
@@ -28,7 +28,7 @@
@implementation SPTableCopy
- (NSObject *)getTableWindow {
- return [NSApp mainWindow];
+ return messageWindow;
}
- (NSString *)getCreateTableStatementFor: (NSString *)tableName inDB: (NSString *)sourceDB {
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 724afca6..7b5c3d2f 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -4146,7 +4146,7 @@
}
SPDatabaseCopy *dbActionCopy = [[SPDatabaseCopy alloc] init];
[dbActionCopy setConnection: [self getConnection]];
- [dbActionCopy setParent: self];
+ [dbActionCopy setMessageWindow: tableWindow];
BOOL copyWithContent = [copyOnlyStructureButton state] == NSOffState;
@@ -4166,7 +4166,7 @@
}
SPDatabaseRename *dbActionRename = [[SPDatabaseRename alloc] init];
[dbActionRename setConnection: [self getConnection]];
- [dbActionRename setParent: self];
+ [dbActionRename setMessageWindow: tableWindow];
[dbActionRename renameDatabaseFrom: [self database]
to: [databaseRenameNameField stringValue]];