From e188d1d53a1b1f8cf96d8ce82221f2013e63c23b Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 4 May 2012 14:42:34 +0000 Subject: Rename database action class. --- Source/SPDBActionCommons.h | 51 ---------------------------------------------- Source/SPDBActionCommons.m | 33 ------------------------------ Source/SPDatabaseAction.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++ Source/SPDatabaseAction.m | 33 ++++++++++++++++++++++++++++++ Source/SPDatabaseCopy.h | 4 ++-- Source/SPDatabaseCopy.m | 1 - Source/SPDatabaseRename.h | 4 ++-- Source/SPDatabaseRename.m | 1 - Source/SPTableCopy.h | 4 ++-- Source/SPTableCopy.m | 1 - Source/SPViewCopy.h | 4 +++- Source/SPViewCopy.m | 1 - 12 files changed, 93 insertions(+), 95 deletions(-) delete mode 100644 Source/SPDBActionCommons.h delete mode 100644 Source/SPDBActionCommons.m create mode 100644 Source/SPDatabaseAction.h create mode 100644 Source/SPDatabaseAction.m (limited to 'Source') diff --git a/Source/SPDBActionCommons.h b/Source/SPDBActionCommons.h deleted file mode 100644 index 5b467e1d..00000000 --- a/Source/SPDBActionCommons.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// $Id$ -// -// SPDBActionCommons.h -// sequel-pro -// -// Created by David Rekowski on Apr 29, 2010 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// More info at - -#import - -@class SPTablesList; - -@interface SPDBActionCommons : NSObject -{ - NSWindow *messageWindow; - SPTablesList *tablesList; - SPMySQLConnection *connection; -} - -/** - * @property connection References the SPMySQL.framework MySQL connection; it has to be set. - */ -@property (readwrite, assign) SPMySQLConnection *connection; - -/** - * @property messageWindow The NSWindow instance to send message sheets to. - */ -@property (readwrite, assign) NSWindow *messageWindow; - -/** - * @property tablesList - */ -@property (readwrite, assign) SPTablesList *tablesList; - -@end diff --git a/Source/SPDBActionCommons.m b/Source/SPDBActionCommons.m deleted file mode 100644 index c12751cf..00000000 --- a/Source/SPDBActionCommons.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// $Id$ -// -// SPDBActionCommons.m -// sequel-pro -// -// Created by David Rekowski on Apr 29, 2010 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// More info at - -#import "SPDBActionCommons.h" - -@implementation SPDBActionCommons - -@synthesize connection; -@synthesize messageWindow; -@synthesize tablesList; - -@end diff --git a/Source/SPDatabaseAction.h b/Source/SPDatabaseAction.h new file mode 100644 index 00000000..a5d27218 --- /dev/null +++ b/Source/SPDatabaseAction.h @@ -0,0 +1,51 @@ +// +// $Id$ +// +// SPDBActionCommons.h +// sequel-pro +// +// Created by David Rekowski on Apr 29, 2010 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import + +@class SPTablesList; + +@interface SPDatabaseAction : NSObject +{ + NSWindow *messageWindow; + SPTablesList *tablesList; + SPMySQLConnection *connection; +} + +/** + * @property connection References the SPMySQL.framework MySQL connection; it has to be set. + */ +@property (readwrite, assign) SPMySQLConnection *connection; + +/** + * @property messageWindow The NSWindow instance to send message sheets to. + */ +@property (readwrite, assign) NSWindow *messageWindow; + +/** + * @property tablesList + */ +@property (readwrite, assign) SPTablesList *tablesList; + +@end diff --git a/Source/SPDatabaseAction.m b/Source/SPDatabaseAction.m new file mode 100644 index 00000000..83509360 --- /dev/null +++ b/Source/SPDatabaseAction.m @@ -0,0 +1,33 @@ +// +// $Id$ +// +// SPDBActionCommons.m +// sequel-pro +// +// Created by David Rekowski on Apr 29, 2010 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import "SPDatabaseAction.h" + +@implementation SPDatabaseAction + +@synthesize connection; +@synthesize messageWindow; +@synthesize tablesList; + +@end diff --git a/Source/SPDatabaseCopy.h b/Source/SPDatabaseCopy.h index 41a22ff0..392c6081 100644 --- a/Source/SPDatabaseCopy.h +++ b/Source/SPDatabaseCopy.h @@ -22,12 +22,12 @@ // // More info at -#import "SPDBActionCommons.h" +#import "SPDatabaseAction.h" /** * The SPDatabaseCopy class povides functionality to create a copy of a database. */ -@interface SPDatabaseCopy : SPDBActionCommons +@interface SPDatabaseCopy : SPDatabaseAction /** * This method clones an existing database. diff --git a/Source/SPDatabaseCopy.m b/Source/SPDatabaseCopy.m index 130f5d99..1425a4ee 100644 --- a/Source/SPDatabaseCopy.m +++ b/Source/SPDatabaseCopy.m @@ -22,7 +22,6 @@ // // More info at -#import "SPDBActionCommons.h" #import "SPDatabaseCopy.h" #import "SPTableCopy.h" diff --git a/Source/SPDatabaseRename.h b/Source/SPDatabaseRename.h index e097c741..d81f9618 100644 --- a/Source/SPDatabaseRename.h +++ b/Source/SPDatabaseRename.h @@ -22,12 +22,12 @@ // // More info at -#import "SPDBActionCommons.h" +#import "SPDatabaseAction.h" /** * The SPDatabaseRename class povides functionality to rename a database. */ -@interface SPDatabaseRename : SPDBActionCommons +@interface SPDatabaseRename : SPDatabaseAction /** * This method renames an existing database. diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m index 85763c7f..83fa7d07 100644 --- a/Source/SPDatabaseRename.m +++ b/Source/SPDatabaseRename.m @@ -22,7 +22,6 @@ // // More info at -#import "SPDBActionCommons.h" #import "SPDatabaseRename.h" #import "SPTableCopy.h" #import "SPViewCopy.h" diff --git a/Source/SPTableCopy.h b/Source/SPTableCopy.h index e32560aa..df6aaaa7 100644 --- a/Source/SPTableCopy.h +++ b/Source/SPTableCopy.h @@ -22,12 +22,12 @@ // // More info at -#import "SPDBActionCommons.h" +#import "SPDatabaseAction.h" /** * The SPTableCopy class povides functionality to copy tables between databases. */ -@interface SPTableCopy : SPDBActionCommons +@interface SPTableCopy : SPDatabaseAction /** * This method copies a table structure from one db to another. diff --git a/Source/SPTableCopy.m b/Source/SPTableCopy.m index e629e481..60869b9b 100644 --- a/Source/SPTableCopy.m +++ b/Source/SPTableCopy.m @@ -22,7 +22,6 @@ // // More info at -#import "SPDBActionCommons.h" #import "SPTableCopy.h" #import diff --git a/Source/SPViewCopy.h b/Source/SPViewCopy.h index 6f1be956..add4af77 100644 --- a/Source/SPViewCopy.h +++ b/Source/SPViewCopy.h @@ -30,7 +30,9 @@ // // More info at -@interface SPViewCopy : SPDBActionCommons +#import "SPDatabaseAction.h" + +@interface SPViewCopy : SPDatabaseAction - (BOOL)moveView:(NSString *)view from:(NSString *)sourceDatabase to:(NSString *)targetDatabase; diff --git a/Source/SPViewCopy.m b/Source/SPViewCopy.m index b7fde195..b32a08e4 100644 --- a/Source/SPViewCopy.m +++ b/Source/SPViewCopy.m @@ -30,7 +30,6 @@ // // More info at -#import "SPDBActionCommons.h" #import "SPViewCopy.h" #import -- cgit v1.2.3