aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authordrx777 <david.rekowski@gmx.de>2010-04-29 19:51:43 +0000
committerdrx777 <david.rekowski@gmx.de>2010-04-29 19:51:43 +0000
commit2cd8213451d16c37c465a30cc5bd9bdc90b4ee31 (patch)
tree6db4aec767000a070e5f8cc75dea52e9b60b4ac7 /Source/TableDocument.m
parent11124c3e957a4501e71446e24d0de590f1bc37c1 (diff)
downloadsequelpro-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/TableDocument.m')
-rw-r--r--Source/TableDocument.m8
1 files changed, 5 insertions, 3 deletions
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]