diff options
-rw-r--r-- | Source/SPCreateDatabaseInfo.h | 42 | ||||
-rw-r--r-- | Source/SPCreateDatabaseInfo.m | 49 | ||||
-rw-r--r-- | Source/SPDatabaseAction.h | 17 | ||||
-rw-r--r-- | Source/SPDatabaseAction.m | 24 | ||||
-rw-r--r-- | Source/SPDatabaseCopy.h | 1 | ||||
-rw-r--r-- | Source/SPDatabaseCopy.m | 10 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.h | 2 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 72 | ||||
-rw-r--r-- | Source/SPDatabaseRename.h | 1 | ||||
-rw-r--r-- | Source/SPDatabaseRename.m | 16 | ||||
-rw-r--r-- | Source/SPTableCopy.h | 3 | ||||
-rw-r--r-- | Source/SPTableCopy.m | 9 | ||||
-rw-r--r-- | Source/SPTablesList.h | 91 | ||||
-rw-r--r-- | Source/SPTablesList.m | 172 | ||||
-rw-r--r-- | sequel-pro.xcodeproj/project.pbxproj | 50 |
15 files changed, 357 insertions, 202 deletions
diff --git a/Source/SPCreateDatabaseInfo.h b/Source/SPCreateDatabaseInfo.h new file mode 100644 index 00000000..8ddc6268 --- /dev/null +++ b/Source/SPCreateDatabaseInfo.h @@ -0,0 +1,42 @@ +// +// SPCreateDatabaseInfo.m +// sequel-pro +// +// Created by David Rekowski on April 29, 2010. +// Copyright (c) 2010 David Rekowski. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at <https://github.com/sequelpro/sequelpro> + +@interface SPCreateDatabaseInfo : NSObject +{ + NSString *databaseName; + NSString *defaultEncoding; + NSString *defaultCollation; +} + +@property (readwrite, retain) NSString *databaseName; +@property (readwrite, retain) NSString *defaultEncoding; +@property (readwrite, retain) NSString *defaultCollation; + +@end diff --git a/Source/SPCreateDatabaseInfo.m b/Source/SPCreateDatabaseInfo.m new file mode 100644 index 00000000..0dc4c123 --- /dev/null +++ b/Source/SPCreateDatabaseInfo.m @@ -0,0 +1,49 @@ +// +// SPCreateDatabaseInfo.m +// sequel-pro +// +// Created by David Rekowski on April 29, 2010. +// Copyright (c) 2010 David Rekowski. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at <https://github.com/sequelpro/sequelpro> + +#import "SPCreateDatabaseInfo.h" + +@implementation SPCreateDatabaseInfo + +@synthesize databaseName; +@synthesize defaultEncoding; +@synthesize defaultCollation; + +- (void)dealloc +{ + if (databaseName) SPClear(databaseName); + if (defaultEncoding) SPClear(defaultEncoding); + if (defaultCollation) SPClear(defaultCollation); + + [super dealloc]; +} + +@end + diff --git a/Source/SPDatabaseAction.h b/Source/SPDatabaseAction.h index 7ca8d402..98143ad8 100644 --- a/Source/SPDatabaseAction.h +++ b/Source/SPDatabaseAction.h @@ -30,19 +30,7 @@ @class SPTablesList; @class SPMySQLConnection; - -@interface SPCreateDatabaseInfo : NSObject -{ - NSString *databaseName; - NSString *defaultEncoding; - NSString *defaultCollation; -} - -@property (readwrite,retain) NSString *databaseName; -@property (readwrite,retain) NSString *defaultEncoding; -@property (readwrite,retain) NSString *defaultCollation; - -@end +@class SPCreateDatabaseInfo; @interface SPDatabaseAction : NSObject { @@ -70,7 +58,9 @@ * This method creates a new database. * * @param dbInfo database name/charset/collation (charset, collation may be nil) + * * @return success + * * @see createDatabase:withEncoding:collation: */ - (BOOL)createDatabase:(SPCreateDatabaseInfo *)dbInfo; @@ -81,6 +71,7 @@ * @param database name of the new database to be created * @param encoding charset of the new database (can be nil to skip) * @param collation sorting collation of the new database (can be nil) + * * @return YES on success, otherwise NO */ - (BOOL)createDatabase:(NSString *)database withEncoding:(NSString *)encoding collation:(NSString *)collation; diff --git a/Source/SPDatabaseAction.m b/Source/SPDatabaseAction.m index 413e2378..ad96fed1 100644 --- a/Source/SPDatabaseAction.m +++ b/Source/SPDatabaseAction.m @@ -29,25 +29,10 @@ // More info at <https://github.com/sequelpro/sequelpro> #import "SPDatabaseAction.h" +#import "SPCreateDatabaseInfo.h" #import <SPMySQL/SPMySQL.h> -@implementation SPCreateDatabaseInfo - -@synthesize databaseName; -@synthesize defaultEncoding; -@synthesize defaultCollation; - -- (void)dealloc -{ - [self setDatabaseName:nil]; - [self setDefaultEncoding:nil]; - [self setDefaultCollation:nil]; - [super dealloc]; -} - -@end - #pragma mark - @implementation SPDatabaseAction @@ -65,17 +50,18 @@ - (BOOL)createDatabase:(NSString *)database withEncoding:(NSString *)encoding collation:(NSString *)collation { - if(![database length]) { + if (![database length]) { SPLog(@"'database' should not be nil or empty!"); return NO; } NSMutableString *query = [NSMutableString stringWithFormat:@"CREATE DATABASE %@", [database backtickQuotedString]]; - if([encoding length]) { // [nil length] == 0 + if ([encoding length]) { // [nil length] == 0 [query appendFormat:@" DEFAULT CHARACTER SET = %@",[encoding backtickQuotedString]]; } - if([collation length]) { + + if ([collation length]) { [query appendFormat:@" DEFAULT COLLATE = %@",[collation backtickQuotedString]]; } diff --git a/Source/SPDatabaseCopy.h b/Source/SPDatabaseCopy.h index 3adf7fa0..57f29653 100644 --- a/Source/SPDatabaseCopy.h +++ b/Source/SPDatabaseCopy.h @@ -40,6 +40,7 @@ * * @param sourceDatabase information tuple about source database * @param targetDatabaseName the name of the target database + * * @result success */ - (BOOL)copyDatabaseFrom:(SPCreateDatabaseInfo *)sourceDatabase to:(NSString *)targetDatabaseName withContent:(BOOL)copyWithContent; diff --git a/Source/SPDatabaseCopy.m b/Source/SPDatabaseCopy.m index 94a5e896..976bd809 100644 --- a/Source/SPDatabaseCopy.m +++ b/Source/SPDatabaseCopy.m @@ -30,6 +30,7 @@ #import "SPDatabaseCopy.h" #import "SPTableCopy.h" +#import "SPCreateDatabaseInfo.h" #import <SPMySQL/SPMySQL.h> @@ -38,10 +39,11 @@ - (BOOL)copyDatabaseFrom:(SPCreateDatabaseInfo *)sourceDatabase to:(NSString *)targetDatabaseName withContent:(BOOL)copyWithContent { NSArray *tables = nil; - - // Check whether the source database exists and the target database doesn't. - BOOL sourceExists = [[connection databases] containsObject:[sourceDatabase databaseName]]; - BOOL targetExists = [[connection databases] containsObject:targetDatabaseName]; + NSArray *databases = [connection databases]; + + // Check whether the source database exists and the target database doesn't + BOOL sourceExists = [databases containsObject:[sourceDatabase databaseName]]; + BOOL targetExists = [databases containsObject:targetDatabaseName]; if (!sourceExists || targetExists) return NO; diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h index 6596ca8c..fc00f647 100644 --- a/Source/SPDatabaseDocument.h +++ b/Source/SPDatabaseDocument.h @@ -269,7 +269,9 @@ NSArray *statusValues; + // Alert return codes NSInteger saveDocPrefSheetStatus; + NSInteger confirmCopyDatabaseReturnCode; // Properties SPWindowController *parentWindowController; diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 3548c284..128ec297 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -90,14 +90,18 @@ enum { #import "SPCharsetCollationHelper.h" #import "SPGotoDatabaseController.h" #import "SPFunctions.h" +#import "SPCreateDatabaseInfo.h" #import <SPMySQL/SPMySQL.h> #include <libkern/OSAtomic.h> // Constants +static NSString *SPCopyDatabaseAction = @"SPCopyDatabase"; +static NSString *SPConfirmCopyDatabaseAction = @"SPConfirmCopyDatabase"; static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; + static int64_t SPDatabaseDocumentInstanceCounter = 0; @interface SPDatabaseDocument () @@ -592,7 +596,7 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; * * @return The document's connection */ -- (SPMySQLConnection *) getConnection +- (SPMySQLConnection *)getConnection { return mySQLConnection; } @@ -600,9 +604,9 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; /** * Sets this connection's Keychain ID. */ -- (void)setKeychainID:(NSString *)theID +- (void)setKeychainID:(NSString *)theId { - keyChainID = [[NSString stringWithString:theID] retain]; + keyChainID = [[NSString stringWithString:theId] retain]; } #pragma mark - @@ -868,7 +872,25 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; - (IBAction)copyDatabase:(id)sender { if (![tablesListInstance selectionShouldChangeInTableView:nil]) return; - + + // Inform the user that we don't support copying objects other than tables and ask them if they'd like to proceed + if ([tablesListInstance hasNonTableObjects]) { + [SPAlertSheets beginWaitingAlertSheetWithTitle:@"" + defaultButton:NSLocalizedString(@"Continue", "continue button") + alternateButton:NSLocalizedString(@"Cancel", @"cancel button") + otherButton:nil + alertStyle:NSAlertStyleWarning + docWindow:parentWindow + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:SPConfirmCopyDatabaseAction + msg:NSLocalizedString(@"Only Partially Supported", @"partial copy database support message") + infoText:[NSString stringWithFormat:NSLocalizedString(@"Duplicating the database '%@' is only partially supported as it contains objects other tables (i.e. views, procedures, functions, etc.), which will not be copied.\n\nWould you like to continue?", @"partial copy database support informative message"), selectedDatabase] + returnCode:&confirmCopyDatabaseReturnCode]; + + if (confirmCopyDatabaseReturnCode == NSAlertAlternateReturn) return; + } + [databaseCopyNameField setStringValue:selectedDatabase]; [copyDatabaseMessageField setStringValue:selectedDatabase]; @@ -876,16 +898,29 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; modalForWindow:parentWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:@"copyDatabase"]; + contextInfo:SPCopyDatabaseAction]; } #endif /** - * opens the rename database sheet and renames the databsae + * Opens the rename database sheet and renames the databsae. */ - (IBAction)renameDatabase:(id)sender { if (![tablesListInstance selectionShouldChangeInTableView:nil]) return; + + // We currently don't support moving any objects other than tables (i.e. views, functions, procs, etc.) from one database to another + // so inform the user and don't allow them to proceed. Copy/duplicate is more appropriate in this case, but with the same limitation. + if ([tablesListInstance hasNonTableObjects]) { + SPOnewayAlertSheet( + NSLocalizedString(@"Database Rename Unsupported", @"databsse rename unsupported message"), + parentWindow, + [NSString stringWithFormat:NSLocalizedString( + @"Ranaming the database '%@' is currently unsupported as it contains objects other than tables (i.e. views, procedures, functions, etc.).\n\nIf you would like to rename a database please use the 'Duplicate Database', move any non-table objects manually then drop the old database.", + @"databsse rename unsupported informative message"), selectedDatabase] + ); + return; + } [databaseRenameNameField setStringValue:selectedDatabase]; [renameDatabaseMessageField setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Rename database '%@' to:", @"rename database message"), selectedDatabase]]; @@ -912,8 +947,8 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Delete database '%@'?", @"delete database message"), [self database]] defaultButton:NSLocalizedString(@"Delete", @"delete button") alternateButton:NSLocalizedString(@"Cancel", @"cancel button") - otherButton:nil - informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to delete the database '%@'? This operation cannot be undone.", @"delete database informative message"), [self database]]; + otherButton:nil + informativeTextWithFormat: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]; @@ -1022,26 +1057,29 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; /** * Alert sheet method. Invoked when an alert sheet is dismissed. - * - * if contextInfo == removeDatabase -> Remove the selected database - * if contextInfo == addDatabase -> Add a new database - * if contextInfo == copyDatabase -> Duplicate the selected database - * if contextInfo == renameDatabase -> Rename the selected database */ - (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { #ifndef SP_CODA - if([contextInfo isEqualToString:@"saveDocPrefSheetStatus"]) { + + // Those that are just setting a return code and don't need to order out the sheet. See SPAlertSheets+beginWaitingAlertSheetWithTitle: + if ([contextInfo isEqualToString:@"saveDocPrefSheetStatus"]) { saveDocPrefSheetStatus = returnCode; return; } + else if ([contextInfo isEqualToString:SPConfirmCopyDatabaseAction]) { + confirmCopyDatabaseReturnCode = returnCode; + return; + } #endif // Order out current sheet to suppress overlapping of sheets - if ([sheet respondsToSelector:@selector(orderOut:)]) + if ([sheet respondsToSelector:@selector(orderOut:)]) { [sheet orderOut:nil]; - else if ([sheet respondsToSelector:@selector(window)]) + } + else if ([sheet respondsToSelector:@selector(window)]) { [[sheet window] orderOut:nil]; + } // Remove the current database if ([contextInfo isEqualToString:@"removeDatabase"]) { @@ -1081,7 +1119,7 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; } } #ifndef SP_CODA - else if ([contextInfo isEqualToString:@"copyDatabase"]) { + else if ([contextInfo isEqualToString:SPCopyDatabaseAction]) { if (returnCode == NSOKButton) { [self _copyDatabase]; } diff --git a/Source/SPDatabaseRename.h b/Source/SPDatabaseRename.h index becf460e..678fd962 100644 --- a/Source/SPDatabaseRename.h +++ b/Source/SPDatabaseRename.h @@ -40,6 +40,7 @@ * * @param sourceDatabase information tuple about the source database * @param targetDatabase the name of the target database + * * @result success */ - (BOOL)renameDatabaseFrom:(SPCreateDatabaseInfo *)sourceDatabase to:(NSString *)targetDatabase; diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m index a6b393be..0c980384 100644 --- a/Source/SPDatabaseRename.m +++ b/Source/SPDatabaseRename.m @@ -32,6 +32,7 @@ #import "SPTableCopy.h" #import "SPViewCopy.h" #import "SPTablesList.h" +#import "SPCreateDatabaseInfo.h" #import <SPMySQL/SPMySQL.h> @@ -46,6 +47,9 @@ @implementation SPDatabaseRename +/** + * Note that this doesn't currently support moving any non-table objects (i.e. views, proc, functions, events, etc). + */ - (BOOL)renameDatabaseFrom:(SPCreateDatabaseInfo *)sourceDatabase to:(NSString *)targetDatabase { // Check, whether the source database exists and the target database doesn't @@ -55,23 +59,13 @@ if (!sourceExists || targetExists) return NO; NSArray *tables = [tablesList allTableNames]; -// NSArray *views = [tablesList allViewNames]; // TODO: handle views when renaming database - + BOOL success = [self createDatabase:targetDatabase withEncoding:[sourceDatabase defaultEncoding] collation:[sourceDatabase defaultCollation]]; [self _moveTables:tables fromDatabase:[sourceDatabase databaseName] toDatabase:targetDatabase]; -#warning Section disabled because it might destroy data (views, functions, events, ...) -/* - tables = [connection tablesFromDatabase:[sourceDatabase databaseName]]; - - if ([tables count] == 0) { - [self _dropDatabase:[sourceDatabase databaseName]]; - } -*/ - return success; } diff --git a/Source/SPTableCopy.h b/Source/SPTableCopy.h index c0d87929..eba968c6 100644 --- a/Source/SPTableCopy.h +++ b/Source/SPTableCopy.h @@ -41,6 +41,7 @@ * @param name name of the table in the source database * @param sourceDB name of the source database * @param targetDB name of the target database + * * @return YES on success, NO on any kind of error (unspecified) */ - (BOOL)copyTable:(NSString *)name from:(NSString *)sourceDB to:(NSString *)targetDB; @@ -61,6 +62,7 @@ * @param sourceDB name of the source database * @param targetDB name of the target database * @param copyWithContent whether to copy the content too, otherwise only structure + * * @return YES on success, NO on any kind of error (unspecified) */ - (BOOL)copyTable:(NSString *)tableName from:(NSString *)sourceDB to: (NSString *)targetDB withContent:(BOOL)copyWithContent; @@ -72,6 +74,7 @@ * @param sourceDB name of the source database * @param targetDB name of the target database * @param copyWithContent whether to copy the content too, otherwise only structure + * * @return YES on success, NO on any kind of error (unspecified) * * This method is able to copy InnoDB tables with foreign key constraints. diff --git a/Source/SPTableCopy.m b/Source/SPTableCopy.m index 07f03846..bc13bc5c 100644 --- a/Source/SPTableCopy.m +++ b/Source/SPTableCopy.m @@ -117,7 +117,7 @@ success = NO; } - // re-enable id creation + // Re-enable id creation [connection queryString:@"/*!40101 SET SQL_MODE=@OLD_SQL_MODE */"]; if ([connection queryErrored]) { @@ -147,11 +147,12 @@ { NSString *showCreateTableStatment = [NSString stringWithFormat:@"SHOW CREATE TABLE %@.%@", [sourceDatabase backtickQuotedString], [tableName backtickQuotedString]]; - SPMySQLResult *theResult = [connection queryString:showCreateTableStatment]; + SPMySQLResult *result = [connection queryString:showCreateTableStatment]; - if([theResult numberOfRows] > 0) return [[theResult getRowAsArray] objectAtIndex:1]; + if ([result numberOfRows] > 0) return [[result getRowAsArray] objectAtIndex:1]; - NSLog(@"query <%@> failed to return the expected result.\n Error state: %@ (%lu)",showCreateTableStatment,[connection lastErrorMessage],[connection lastErrorID]); + SPLog(@"query <%@> failed to return the expected result.\n Error state: %@ (%lu)", showCreateTableStatment, [connection lastErrorMessage], [connection lastErrorID]); + return nil; } diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h index 433879ea..e299654c 100644 --- a/Source/SPTablesList.h +++ b/Source/SPTablesList.h @@ -38,52 +38,43 @@ @class SPTableContent; @class SPSplitView; @class SPCharsetCollationHelper; - -#ifdef SP_CODA -@class SQLSidebarViewController; -#endif +@class SPCustomQuery; +@class SPTableImport; +@class SPTableData; +@class SPTableInfo; +@class SPTableTriggers; +@class SPExtendedTableInfo; @interface SPTablesList : NSObject <NSTextFieldDelegate, NSTableViewDelegate> { - IBOutlet SPDatabaseDocument* tableDocumentInstance; - IBOutlet SPTableStructure* tableSourceInstance; - IBOutlet SPTableContent* tableContentInstance; -#ifndef SP_CODA /* ivars */ - IBOutlet id customQueryInstance; - IBOutlet id tableDumpInstance; - IBOutlet id tableDataInstance; - IBOutlet id extendedTableInfoInstance; -#endif - IBOutlet SPDatabaseData* databaseDataInstance; -#ifndef SP_CODA /* ivars */ - IBOutlet id tableInfoInstance; - IBOutlet id tableTriggersInstance; + IBOutlet SPDatabaseDocument *tableDocumentInstance; + IBOutlet SPTableStructure *tableSourceInstance; + IBOutlet SPTableContent *tableContentInstance; + IBOutlet SPDatabaseData *databaseDataInstance; IBOutlet SPHistoryController *spHistoryControllerInstance; + IBOutlet SPCustomQuery *customQueryInstance; + IBOutlet SPTableImport *tableDumpInstance; + IBOutlet SPTableData *tableDataInstance; + IBOutlet SPExtendedTableInfo *extendedTableInfoInstance; + IBOutlet SPTableInfo *tableInfoInstance; + IBOutlet SPTableTriggers *tableTriggersInstance; IBOutlet id copyTableSheet; -#endif IBOutlet SPTableView *tablesListView; -#ifndef SP_CODA /* ivars */ IBOutlet id copyTableButton; IBOutlet id copyTableNameField; IBOutlet id copyTableMessageField; IBOutlet NSButton *copyTableContentSwitch; -#endif IBOutlet id tableSheet; IBOutlet id tableNameField; IBOutlet id tableEncodingButton; IBOutlet id tableCollationButton; IBOutlet id tableTypeButton; IBOutlet id toolbarAddButton; -#ifdef SP_CODA - id toolbarDeleteButton; -#endif -#ifndef SP_CODA + IBOutlet id toolbarActionsButton; -#endif IBOutlet id toolbarReloadButton; IBOutlet id addTableButton; -#ifndef SP_CODA IBOutlet id truncateTableButton; IBOutlet SPSplitView *tableListSplitView; IBOutlet SPSplitView *tableListFilterSplitView; @@ -101,11 +92,9 @@ IBOutlet NSMenuItem *copyCreateSyntaxMenuItem; IBOutlet NSMenuItem *separatorTableMenuItem2; IBOutlet NSMenuItem *separatorTableMenuItem3; -#endif SPMySQLConnection *mySQLConnection; - -#ifndef SP_CODA /* ivars */ + // Table list context menu items IBOutlet NSMenuItem *removeTableContextMenuItem; IBOutlet NSMenuItem *duplicateTableContextMenuItem; @@ -118,7 +107,6 @@ IBOutlet NSMenuItem *copyCreateSyntaxContextMenuItem; IBOutlet NSMenuItem *separatorTableContextMenuItem2; IBOutlet NSMenuItem *separatorTableContextMenuItem3; -#endif NSMutableArray *tables; NSMutableArray *filteredTables; @@ -131,13 +119,7 @@ BOOL tableListContainsViews; BOOL alertSheetOpened; -#ifndef SP_CODA /* ivars */ NSFont *smallSystemFont; -#endif - -#ifdef SP_CODA - SQLSidebarViewController* sidebarViewController; -#endif SPCharsetCollationHelper *addTableCharsetHelper; } @@ -147,25 +129,20 @@ - (IBAction)addTable:(nullable id)sender; - (IBAction)closeSheet:(nullable id)sender; - (IBAction)removeTable:(nullable id)sender; - -#ifndef SP_CODA /* method decls */ - (IBAction)copyTable:(nullable id)sender; - (IBAction)renameTable:(nullable id)sender; - (IBAction)truncateTable:(nullable id)sender; - (IBAction)openTableInNewTab:(nullable id)sender; - (IBAction)openTableInNewWindow:(nullable id)sender; - (IBAction)togglePaneCollapse:(nullable id)sender; -#endif +- (IBAction)updateFilter:(nullable id)sender; // Additional methods - (void)setConnection:(nonnull SPMySQLConnection *)theConnection; - (void)setSelectionState:(nullable NSDictionary *)selectionDetails; - -#ifndef SP_CODA /* method decls */ - (void)selectTableAtIndex:(nullable NSNumber *)row; - (void)makeTableListFilterHaveFocus; - (void)makeTableListHaveFocus; -#endif // Getters - (nonnull NSArray *)selectedTableNames; @@ -184,18 +161,20 @@ - (nonnull NSArray *)allDatabaseNames; - (nonnull NSArray *)allSystemDatabaseNames; - (nullable NSString *)selectedDatabase; +- (BOOL)hasViews; +- (BOOL)hasFunctions; +- (BOOL)hasProcedures; +- (BOOL)hasEvents; +- (BOOL)hasNonTableObjects; // Setters - (BOOL)selectItemWithName:(nullable NSString *)theName; -#ifndef SP_CODA /* method decls */ - (BOOL)selectItemsWithNames:(nonnull NSArray *)theNames; // Table list filter interaction - (void)showFilter; - (void)hideFilter; - (void)clearFilter; -#endif -- (IBAction) updateFilter:(nullable id)sender; // Task interaction - (void)startDocumentTaskForTab:(nullable NSNotification *)aNotification; @@ -203,28 +182,6 @@ - (void)setTableListSelectability:(BOOL)isSelectable; - (BOOL)isTableNameValid:(nullable NSString *)tableName forType:(SPTableType)tableType; - (BOOL)isTableNameValid:(nullable NSString *)tableName forType:(SPTableType)tableType ignoringSelectedTable:(BOOL)ignoreSelectedTable; - -#ifdef SP_CODA /* method decls */ -@property (assign) SPTableStructure* tableSourceInstance; -@property (assign) SPTableContent* tableContentInstance; -@property (assign) id toolbarAddButton; -@property (assign) id toolbarDeleteButton; -@property (assign) id toolbarReloadButton; -@property (assign) id tableSheet; -@property (assign) id tableNameField; -@property (assign) id tableEncodingButton; -@property (assign) id tableTypeButton; -@property (assign) id databaseDataInstance; -@property (assign) id addTableButton; -@property (assign) SPTableView* tablesListView; -@property (assign) SQLSidebarViewController* sidebarViewController; - -- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView; -- (void)setDatabaseDocument:(SPDatabaseDocument*)val; -- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex; - -#endif - - (BOOL)selectionShouldChangeInTableView:(nullable NSTableView *)aTableView; @end diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index b82a44e3..c9c60908 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -34,39 +34,24 @@ #import "SPTableStructure.h" #import "SPDatabaseStructure.h" #import "SPDatabaseViewController.h" - -#ifndef SP_CODA /* headers */ #import "SPTableContent.h" -#endif #import "SPTableData.h" -#ifndef SP_CODA /* headers */ #import "SPTableInfo.h" #import "SPDataImport.h" #import "SPTableView.h" #import "ImageAndTextCell.h" #import "RegexKitLite.h" -#endif #import "SPDatabaseData.h" #import "SPAlertSheets.h" -#ifndef SP_CODA /* headers */ #import "SPNavigatorController.h" #import "SPHistoryController.h" -#endif #import "SPServerSupport.h" -#ifndef SP_CODA /* headers */ #import "SPWindowController.h" #import "SPAppController.h" #import "SPSplitView.h" -#endif #import "SPThreadAdditions.h" #import "SPFunctions.h" - -#ifdef SP_CODA -#import "SQLSidebarViewController.h" -#endif - #import "SPCharsetCollationHelper.h" - #import "SPWindowManagement.h" #import <SPMySQL/SPMySQL.h> @@ -75,50 +60,31 @@ static NSString *SPAddRow = @"SPAddRow"; static NSString *SPAddNewTable = @"SPAddNewTable"; static NSString *SPRemoveTable = @"SPRemoveTable"; -#ifndef SP_CODA static NSString *SPTruncateTable = @"SPTruncateTable"; static NSString *SPDuplicateTable = @"SPDuplicateTable"; -#endif @interface SPTablesList () -#ifndef SP_CODA - (void)_removeTable:(NSNumber *)force; - (void)_truncateTable; -#endif - (void)_addTable; -#ifndef SP_CODA - (void)_copyTable; -#endif - (void)_renameTableOfType:(SPTableType)tableType from:(NSString *)oldTableName to:(NSString *)newTableName; - (void)_duplicateConnectionToFrontTab; - (NSMutableArray *)_allSchemaObjectsOfType:(SPTableType)type; +- (BOOL)_databaseHasObjectOfType:(SPTableType)type; + @end @implementation SPTablesList -#ifdef SP_CODA -@synthesize sidebarViewController; -@synthesize databaseDataInstance; -@synthesize toolbarAddButton; -@synthesize toolbarDeleteButton; -@synthesize toolbarReloadButton; -@synthesize tableSourceInstance; -@synthesize tableContentInstance; -@synthesize tableSheet; -@synthesize tableNameField; -@synthesize tableEncodingButton; -@synthesize tableTypeButton; -@synthesize addTableButton; -@synthesize tablesListView; -#endif - #pragma mark - #pragma mark Initialisation - (id)init { if ((self = [super init])) { + tables = [[NSMutableArray alloc] init]; filteredTables = tables; tableTypes = [[NSMutableArray alloc] init]; @@ -128,11 +94,11 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; tableListContainsViews = NO; selectedTableType = SPTableTypeNone; selectedTableName = nil; -#ifndef SP_CODA + [tables addObject:NSLocalizedString(@"TABLES", @"header for table list")]; smallSystemFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; -#endif + addTableCharsetHelper = nil; //initialized in awakeFromNib } @@ -141,8 +107,6 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; - (void)awakeFromNib { -#ifndef SP_CODA - // Configure the table information pane [tableListSplitView setCollapsibleSubviewIndex:1]; @@ -157,22 +121,20 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; // Disable tab edit behaviour in the tables list [tablesListView setTabEditingDisabled:YES]; -#endif // Add observers for document task activity [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startDocumentTaskForTab:) name:SPDocumentTaskStartNotification object:tableDocumentInstance]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(endDocumentTaskForTab:) name:SPDocumentTaskEndNotification object:tableDocumentInstance]; -#ifndef SP_CODA [tablesListView registerForDraggedTypes:@[SPNavigatorTableDataPasteboardDragType]]; -#endif - + //create the charset helper addTableCharsetHelper = [[SPCharsetCollationHelper alloc] initWithCharsetButton:tableEncodingButton CollationButton:tableCollationButton]; } @@ -1273,57 +1235,66 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } /** - * Database tables accessors for a given table type + * Database tables accessors for a given table type. */ - (NSArray *)allTableAndViewNames { NSMutableArray *returnArray = [NSMutableArray array]; - NSUInteger i; - NSUInteger cnt = [[self tables] count]; - for(i=0; i<cnt; i++) { - SPTableType tt = (SPTableType)[NSArrayObjectAtIndex([self tableTypes],i) integerValue]; - if(tt == SPTableTypeTable || tt == SPTableTypeView) + + for (NSUInteger i = 0; i < [[self tables] count]; i++) + { + SPTableType tt = (SPTableType)[NSArrayObjectAtIndex([self tableTypes], i) integerValue]; + + if (tt == SPTableTypeTable || tt == SPTableTypeView) { [returnArray addObject:NSArrayObjectAtIndex([self tables], i)]; + } } + return returnArray; } +/** + * Returns an array of all table names. + */ - (NSArray *)allTableNames { return [self _allSchemaObjectsOfType:SPTableTypeTable]; } +/** + * Returns an array of view names. + */ - (NSArray *)allViewNames { NSMutableArray *returnArray = [self _allSchemaObjectsOfType:SPTableTypeView]; + [returnArray sortUsingSelector:@selector(compare:)]; + return returnArray; } +/** + * Returns an array of all procedure names. + */ - (NSArray *)allProcedureNames { return [self _allSchemaObjectsOfType:SPTableTypeProc]; } + +/** + * Returns an array of all function names. + */ - (NSArray *)allFunctionNames { return [self _allSchemaObjectsOfType:SPTableTypeFunc]; } +/** + * Returns an array of event names. + */ - (NSArray *)allEventNames { - return [self _allSchemaObjectsOfType:SPTableTypeEvent]; -} - -- (NSMutableArray *)_allSchemaObjectsOfType:(SPTableType)type -{ - NSMutableArray *returnArray = [NSMutableArray array]; - NSInteger i; - NSInteger cnt = [[self tables] count]; - for(i=0; i<cnt; i++) { - if([NSArrayObjectAtIndex([self tableTypes],i) integerValue] == type) - [returnArray addObject:NSArrayObjectAtIndex([self tables], i)]; - } - return returnArray; + return [self _allSchemaObjectsOfType:SPTableTypeEvent]; } /** @@ -1355,6 +1326,46 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; return tableTypes; } +/** + * Returns whether or not the current database contains any views. + */ +- (BOOL)hasViews +{ + return [self _databaseHasObjectOfType:SPTableTypeView]; +} + +/** + * Returns whether or not the current database contains any functions. + */ +- (BOOL)hasFunctions +{ + return [self _databaseHasObjectOfType:SPTableTypeFunc]; +} + +/** + * Returns whether or not the current database has any procedures. + */ +- (BOOL)hasProcedures +{ + return [self _databaseHasObjectOfType:SPTableTypeProc]; +} + +/** + * Returns whether or not the current database has any events. + */ +- (BOOL)hasEvents +{ + return [self _databaseHasObjectOfType:SPTableTypeEvent]; +} + +/** + * Returns whether or not the current database has any non-table objects. + */ +- (BOOL)hasNonTableObjects +{ + return [self hasViews] || [self hasProcedures] || [self hasFunctions] || [self hasEvents]; +} + #pragma mark - #pragma mark Setter methods @@ -2740,6 +2751,35 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [NSException raise:@"Object of unknown type" format:NSLocalizedString(@"An error occured while renaming. '%@' is of an unknown type.", @"rename error - don't know what type the renamed thing is"), oldTableName]; } +- (NSMutableArray *)_allSchemaObjectsOfType:(SPTableType)type +{ + NSMutableArray *returnArray = [NSMutableArray array]; + + for (NSUInteger i = 0; i < [[self tables] count]; i++) + { + if ([NSArrayObjectAtIndex([self tableTypes], i) integerValue] == type) { + [returnArray addObject:NSArrayObjectAtIndex([self tables], i)]; + } + } + + return returnArray; +} + +- (BOOL)_databaseHasObjectOfType:(SPTableType)type +{ + BOOL hasObjectOfType = NO; + + for (NSUInteger i = 0; i < [[self tables] count]; i++) + { + if ([NSArrayObjectAtIndex([self tableTypes], i) integerValue] == type) { + hasObjectOfType = YES; + break; + } + } + + return hasObjectOfType; +} + #pragma mark - - (void)dealloc @@ -2748,12 +2788,10 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; SPClear(tables); SPClear(tableTypes); -#ifndef SP_CODA + if (isTableListFiltered && filteredTables) SPClear(filteredTables); if (isTableListFiltered && filteredTableTypes) SPClear(filteredTableTypes); -#endif if (selectedTableName) SPClear(selectedTableName); - if (addTableCharsetHelper) SPClear(addTableCharsetHelper); [super dealloc]; diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index 4ddaedf3..35620aac 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -102,6 +102,18 @@ 17AD35F51E79888D000F213E /* button_clear@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17AD35F41E79888D000F213E /* button_clear@2x.png */; }; 17AED4161888BD67008E380F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5EAC0FC0EC87FF900CC579C /* Security.framework */; }; 17AF787B11FC41C00073D043 /* SPExportFilenameUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */; }; + 17B548631E81FFA600175D5A /* SPCreateDatabaseInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B548621E81FFA600175D5A /* SPCreateDatabaseInfo.m */; }; + 17B548711E82B02100175D5A /* button_bar_handle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B548661E82B02100175D5A /* button_bar_handle@2x.png */; }; + 17B548721E82B02100175D5A /* button_duplicate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B548671E82B02100175D5A /* button_duplicate@2x.png */; }; + 17B548731E82B02100175D5A /* button_edit_mode_selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B548681E82B02100175D5A /* button_edit_mode_selected@2x.png */; }; + 17B548741E82B02100175D5A /* button_edit_mode@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B548691E82B02100175D5A /* button_edit_mode@2x.png */; }; + 17B548751E82B02100175D5A /* button_edit@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5486A1E82B02100175D5A /* button_edit@2x.png */; }; + 17B548761E82B02100175D5A /* button_left@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5486B1E82B02100175D5A /* button_left@2x.png */; }; + 17B548771E82B02100175D5A /* button_pagination@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5486C1E82B02100175D5A /* button_pagination@2x.png */; }; + 17B548781E82B02100175D5A /* button_remove@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5486D1E82B02100175D5A /* button_remove@2x.png */; }; + 17B548791E82B02100175D5A /* button_right@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5486E1E82B02100175D5A /* button_right@2x.png */; }; + 17B5487A1E82B02100175D5A /* button_select_all@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5486F1E82B02100175D5A /* button_select_all@2x.png */; }; + 17B5487B1E82B02100175D5A /* button_select_none@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B548701E82B02100175D5A /* button_select_none@2x.png */; }; 17BA2A3215275D8600389803 /* SPExportInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17BA2A3115275D8600389803 /* SPExportInterfaceController.m */; }; 17C058880FC9FC390077E9CF /* SPNarrowDownCompletion.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C058870FC9FC390077E9CF /* SPNarrowDownCompletion.m */; }; 17CC97F310B4ABE90034CD7A /* SPAboutController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17CC97F210B4ABE90034CD7A /* SPAboutController.m */; }; @@ -806,6 +818,19 @@ 17AD35F41E79888D000F213E /* button_clear@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_clear@2x.png"; sourceTree = "<group>"; }; 17AF787911FC41C00073D043 /* SPExportFilenameUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportFilenameUtilities.h; sourceTree = "<group>"; }; 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportFilenameUtilities.m; sourceTree = "<group>"; }; + 17B548611E81FFA600175D5A /* SPCreateDatabaseInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPCreateDatabaseInfo.h; sourceTree = "<group>"; }; + 17B548621E81FFA600175D5A /* SPCreateDatabaseInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPCreateDatabaseInfo.m; sourceTree = "<group>"; }; + 17B548661E82B02100175D5A /* button_bar_handle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_bar_handle@2x.png"; sourceTree = "<group>"; }; + 17B548671E82B02100175D5A /* button_duplicate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_duplicate@2x.png"; sourceTree = "<group>"; }; + 17B548681E82B02100175D5A /* button_edit_mode_selected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_edit_mode_selected@2x.png"; sourceTree = "<group>"; }; + 17B548691E82B02100175D5A /* button_edit_mode@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_edit_mode@2x.png"; sourceTree = "<group>"; }; + 17B5486A1E82B02100175D5A /* button_edit@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_edit@2x.png"; sourceTree = "<group>"; }; + 17B5486B1E82B02100175D5A /* button_left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_left@2x.png"; sourceTree = "<group>"; }; + 17B5486C1E82B02100175D5A /* button_pagination@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_pagination@2x.png"; sourceTree = "<group>"; }; + 17B5486D1E82B02100175D5A /* button_remove@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_remove@2x.png"; sourceTree = "<group>"; }; + 17B5486E1E82B02100175D5A /* button_right@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_right@2x.png"; sourceTree = "<group>"; }; + 17B5486F1E82B02100175D5A /* button_select_all@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_select_all@2x.png"; sourceTree = "<group>"; }; + 17B548701E82B02100175D5A /* button_select_none@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_select_none@2x.png"; sourceTree = "<group>"; }; 17B7B591101602AE00F057DE /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = /usr/lib/libssl.dylib; sourceTree = "<absolute>"; }; 17BA2A3015275D8600389803 /* SPExportInterfaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportInterfaceController.h; sourceTree = "<group>"; }; 17BA2A3115275D8600389803 /* SPExportInterfaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportInterfaceController.m; sourceTree = "<group>"; }; @@ -1455,6 +1480,8 @@ 11C2109D1180E70800758039 /* SPDatabaseRename.m */, 11B55BFC1189E3B2009EF465 /* SPDatabaseAction.h */, 11B55BFD1189E3B2009EF465 /* SPDatabaseAction.m */, + 17B548611E81FFA600175D5A /* SPCreateDatabaseInfo.h */, + 17B548621E81FFA600175D5A /* SPCreateDatabaseInfo.m */, ); name = "Database Actions"; sourceTree = "<group>"; @@ -2178,6 +2205,17 @@ isa = PBXGroup; children = ( 17BFC80D10D3FF5200A3B112 /* Icons */, + 17B548661E82B02100175D5A /* button_bar_handle@2x.png */, + 17B548671E82B02100175D5A /* button_duplicate@2x.png */, + 17B548681E82B02100175D5A /* button_edit_mode_selected@2x.png */, + 17B548691E82B02100175D5A /* button_edit_mode@2x.png */, + 17B5486A1E82B02100175D5A /* button_edit@2x.png */, + 17B5486B1E82B02100175D5A /* button_left@2x.png */, + 17B5486C1E82B02100175D5A /* button_pagination@2x.png */, + 17B5486D1E82B02100175D5A /* button_remove@2x.png */, + 17B5486E1E82B02100175D5A /* button_right@2x.png */, + 17B5486F1E82B02100175D5A /* button_select_all@2x.png */, + 17B548701E82B02100175D5A /* button_select_none@2x.png */, C9AD7C8116761B3300234EEE /* button_action.png */, C9AD7C8216761B3300234EEE /* button_action@2x.png */, 582E93F5168298C6003459FD /* button_add_folder.png */, @@ -3003,6 +3041,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 17B548731E82B02100175D5A /* button_edit_mode_selected@2x.png in Resources */, 17E641D10EF02036001BC333 /* grabber-horizontal.png in Resources */, 17E641D20EF02036001BC333 /* grabber-vertical.png in Resources */, 17E641F20EF02036001BC333 /* toolbar-switch-to-structure.png in Resources */, @@ -3013,12 +3052,14 @@ 3876E1501CC0B26000D85154 /* button_add@2x.png in Resources */, 17E641FD0EF02088001BC333 /* sequel-pro.scriptTerminology in Resources */, 1761FD480EF03A6F00331368 /* MainMenu.xib in Resources */, + 17B548711E82B02100175D5A /* button_bar_handle@2x.png in Resources */, B5E2C5FA0F2353B5007446E0 /* table-property.png in Resources */, 58186D210F4CB38900851FE9 /* ConnectionErrorDialog.xib in Resources */, 5885940F0F7AEE6000ED0E67 /* sparkle-public-key.pem in Resources */, B5E92F190F75B2D100012500 /* ExportDialog.xib in Resources */, B57747D20F7A891A003B34F9 /* Preferences.xib in Resources */, B57748420F7A8B57003B34F9 /* database.png in Resources */, + 17B548751E82B02100175D5A /* button_edit@2x.png in Resources */, B58731280F838C9E00087794 /* PreferenceDefaults.plist in Resources */, B52460DB0F8EF93B00171639 /* Console.xib in Resources */, BC2C8E220FA8C2DB008468C7 /* SPMySQLHelpTemplate.html in Resources */, @@ -3033,10 +3074,12 @@ 588B2CC90FE5641E00EC5FC0 /* ssh-connecting.png in Resources */, 588B2CCA0FE5641E00EC5FC0 /* ssh-disconnected.png in Resources */, 5822CAE110011C8000DCC3D6 /* ConnectionView.xib in Resources */, + 17B548761E82B02100175D5A /* button_left@2x.png in Resources */, BCA6F631100FA7D700E80253 /* FieldEditorSheet.xib in Resources */, 58D2E22E101222870063EF1D /* link-arrow-clicked.png in Resources */, 58D2E22F101222870063EF1D /* link-arrow-highlighted-clicked.png in Resources */, 58D2E230101222870063EF1D /* link-arrow.png in Resources */, + 17B548781E82B02100175D5A /* button_remove@2x.png in Resources */, 581068B61015411B0068C6E2 /* link-arrow-highlighted.png in Resources */, 581069B410167EC10068C6E2 /* SequelProTunnelAssistant in Resources */, 4D90B7A2101E0D1500D116A1 /* UserManagerView.xib in Resources */, @@ -3078,6 +3121,8 @@ BC09D7E012A786FB0030DB64 /* cancel-highlighted.png in Resources */, BC09D7E112A786FB0030DB64 /* cancel-hovered-highlighted.png in Resources */, BC09D7E212A786FB0030DB64 /* cancel-hovered.png in Resources */, + 17B548721E82B02100175D5A /* button_duplicate@2x.png in Resources */, + 17B548791E82B02100175D5A /* button_right@2x.png in Resources */, BC09D7E312A786FB0030DB64 /* cancel.png in Resources */, 58F48AA3161D03C6008536A1 /* quick-connect-icon.pdf in Resources */, 58F48B2E161D08C0008536A1 /* quick-connect-icon-white.pdf in Resources */, @@ -3088,6 +3133,7 @@ C9F92710162D38D70051CB2E /* toolbar-switch-to-table-info@2x.png in Resources */, C9F92712162D39E60051CB2E /* toolbar-switch-to-browse.png in Resources */, C9F92714162D39FE0051CB2E /* toolbar-switch-to-browse@2x.png in Resources */, + 17B5487B1E82B02100175D5A /* button_select_none@2x.png in Resources */, C9AD7C781676138000234EEE /* database-small@2x.png in Resources */, C9AD7C7B1676158C00234EEE /* toolbar-switch-to-sql.png in Resources */, C9AD7C7C1676158C00234EEE /* toolbar-switch-to-sql@2x.png in Resources */, @@ -3101,6 +3147,7 @@ C9AD7C8B1676204300234EEE /* button_info_pane_show.png in Resources */, C9AD7C8C1676204300234EEE /* button_info_pane_show@2x.png in Resources */, 58FEEF3D1676D14B009CD478 /* appIcon.icns in Resources */, + 17B5487A1E82B02100175D5A /* button_select_all@2x.png in Resources */, 58FEEF451676D160009CD478 /* Generic.icns in Resources */, 58FEEF461676D160009CD478 /* SPF.icns in Resources */, 58FEEF471676D160009CD478 /* SQL.icns in Resources */, @@ -3111,6 +3158,7 @@ C9C994461678A5CD001F5DA8 /* button_pane_show@2x.png in Resources */, C9C994491678B3E6001F5DA8 /* table-small-square.png in Resources */, C9C9944A1678B3E6001F5DA8 /* table-small-square@2x.png in Resources */, + 17B548741E82B02100175D5A /* button_edit_mode@2x.png in Resources */, C9C9944D1678BCFA001F5DA8 /* table-small.png in Resources */, C9C9944E1678BCFA001F5DA8 /* table-small@2x.png in Resources */, 582E939D168296F3003459FD /* link-arrow-clicked@2x.png in Resources */, @@ -3143,6 +3191,7 @@ 582E9488168380D6003459FD /* sync_arrows_06.png in Resources */, 582E948F168383F0003459FD /* table-view-small-square.png in Resources */, 582E9490168383F0003459FD /* table-view-small.png in Resources */, + 17B548771E82B02100175D5A /* button_pagination@2x.png in Resources */, 582E94A816839AD5003459FD /* toolbar-preferences-autoupdate.png in Resources */, 582E94AA16839AEF003459FD /* toolbar-preferences-general.png in Resources */, 582E94AE16839C4A003459FD /* toolbar-preferences-notifications.png in Resources */, @@ -3315,6 +3364,7 @@ B52460D80F8EF92300171639 /* SPTextViewAdditions.m in Sources */, 296DC8B60F909194002A3258 /* MGTemplateEngine.m in Sources */, 296DC8B70F909194002A3258 /* RegexKitLite.m in Sources */, + 17B548631E81FFA600175D5A /* SPCreateDatabaseInfo.m in Sources */, 296DC8B80F909194002A3258 /* ICUTemplateMatcher.m in Sources */, 296DC8B90F909194002A3258 /* MGTemplateStandardMarkers.m in Sources */, 296DC8BA0F909194002A3258 /* NSArray_DeepMutableCopy.m in Sources */, |