diff options
author | drx777 <david.rekowski@gmx.de> | 2010-04-29 19:51:43 +0000 |
---|---|---|
committer | drx777 <david.rekowski@gmx.de> | 2010-04-29 19:51:43 +0000 |
commit | 2cd8213451d16c37c465a30cc5bd9bdc90b4ee31 (patch) | |
tree | 6db4aec767000a070e5f8cc75dea52e9b60b4ac7 /Source | |
parent | 11124c3e957a4501e71446e24d0de590f1bc37c1 (diff) | |
download | sequelpro-2cd8213451d16c37c465a30cc5bd9bdc90b4ee31.tar.gz sequelpro-2cd8213451d16c37c465a30cc5bd9bdc90b4ee31.tar.bz2 sequelpro-2cd8213451d16c37c465a30cc5bd9bdc90b4ee31.zip |
Changed appearance of copy/rename DB to match that of copyTable.
Added the to be copied/renamed database name to the name input sheet. Added necessary outlets. Added the current db name as preset value in the rename input field.
Renamed databaseNewSheet to databaseCopySheet and copyOnlyStructureButton to copyDatabaseDataButton and inverted behaviour of the button.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.h | 13 | ||||
-rw-r--r-- | Source/TableDocument.m | 8 |
2 files changed, 14 insertions, 7 deletions
diff --git a/Source/TableDocument.h b/Source/TableDocument.h index 8eb6cb4b..b3cbb6e7 100644 --- a/Source/TableDocument.h +++ b/Source/TableDocument.h @@ -65,7 +65,7 @@ IBOutlet id titleStringView; IBOutlet id databaseSheet; - IBOutlet id databaseNewSheet; + IBOutlet id databaseCopySheet; IBOutlet id databaseRenameSheet; IBOutlet id queryProgressBar; @@ -77,13 +77,18 @@ IBOutlet id favoritesButton; IBOutlet id databaseNameField; - IBOutlet id databaseCopyNameField; - IBOutlet id databaseRenameNameField; IBOutlet id databaseEncodingButton; - IBOutlet id copyOnlyStructureButton; IBOutlet id addDatabaseButton; + + IBOutlet id databaseCopyNameField; + IBOutlet id copyDatabaseDataButton; + IBOutlet id copyDatabaseMessageField; IBOutlet id copyDatabaseButton; + + IBOutlet id databaseRenameNameField; + IBOutlet id renameDatabaseMessageField; IBOutlet id renameDatabaseButton; + IBOutlet id chooseDatabaseButton; IBOutlet id historyControl; IBOutlet NSTabView *tableTabView; diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 49f30030..a5dc87b4 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -940,8 +940,9 @@ if (![tablesListInstance selectionShouldChangeInTableView:nil]) return; [databaseCopyNameField setStringValue:@""]; + [copyDatabaseMessageField setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Duplicate database '%@' to:", @"duplicate database message"), selectedDatabase]]; - [NSApp beginSheet:databaseNewSheet + [NSApp beginSheet:databaseCopySheet modalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) @@ -955,7 +956,8 @@ { if (![tablesListInstance selectionShouldChangeInTableView:nil]) return; - [databaseRenameNameField setStringValue:@""]; + [databaseRenameNameField setStringValue:selectedDatabase]; + [renameDatabaseMessageField setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Rename database '%@' to:", @"rename database message"), selectedDatabase]]; [NSApp beginSheet:databaseRenameSheet modalForWindow:tableWindow @@ -4158,7 +4160,7 @@ [dbActionCopy setConnection: [self getConnection]]; [dbActionCopy setMessageWindow: tableWindow]; - BOOL copyWithContent = [copyOnlyStructureButton state] == NSOffState; + BOOL copyWithContent = [copyDatabaseDataButton state] == NSOnState; if ([dbActionCopy copyDatabaseFrom: [self database] to: [databaseCopyNameField stringValue] |