diff options
author | rowanbeentje <rowan@beent.je> | 2011-08-14 14:45:25 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-08-14 14:45:25 +0000 |
commit | aee5bc25beb877fb6484031c087b4f93096394eb (patch) | |
tree | b28856cc4bba76c8b6de5f64b398ae2f4822bef5 /Source/SPTablesList.m | |
parent | 8fa65d0924287314ae74948698ecba9d978a7612 (diff) | |
download | sequelpro-aee5bc25beb877fb6484031c087b4f93096394eb.tar.gz sequelpro-aee5bc25beb877fb6484031c087b4f93096394eb.tar.bz2 sequelpro-aee5bc25beb877fb6484031c087b4f93096394eb.zip |
- Review changes made in r3376 and revert a number of regressions
Diffstat (limited to 'Source/SPTablesList.m')
-rw-r--r-- | Source/SPTablesList.m | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index 9b92763a..9fc396d5 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -367,7 +367,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; NSArray *engines = [databaseDataInstance getDatabaseStorageEngines]; // Add default menu item - [tableTypeButton addItemWithTitle:@"Default"]; + [tableTypeButton addItemWithTitle:NSLocalizedString(@"Default",@"New Table Sheet : Table Engine Dropdown : Default")]; [[tableTypeButton menu] addItem:[NSMenuItem separatorItem]]; for (NSDictionary *engine in engines) @@ -377,7 +377,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; // Populate the table encoding popup button with a default menu item [tableEncodingButton removeAllItems]; - [tableEncodingButton addItemWithTitle:@"Default"]; + [tableEncodingButton addItemWithTitle:NSLocalizedString(@"Default",@"New Table Sheet : Table Encoding Dropdown : Default")]; // Retrieve the server-supported encodings and add them to the menu NSArray *encodings = [databaseDataInstance getDatabaseCharacterSetEncodings]; @@ -793,13 +793,8 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; NSIndexSet *indexes = [tablesListView selectedRowIndexes]; // Update the selected table name and type if (selectedTableName) [selectedTableName release]; + selectedTableName = nil; - if ([indexes count]) { - selectedTableName = [[NSString alloc] initWithString:@""]; - } - else { - selectedTableName = nil; - } #ifndef SP_REFACTOR /* ui manipulation */ // Set gear menu items Remove/Duplicate table/view according to the table types @@ -1578,8 +1573,12 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; if ([tablesListView numberOfSelectedRows] != 1) { // Ensure the state is cleared - if ([tableDocumentInstance table]) [tableDocumentInstance loadTable:nil ofType:SPTableTypeNone]; - else [self setSelectionState:nil]; + if ([tableDocumentInstance table]) { + [tableDocumentInstance loadTable:nil ofType:SPTableTypeNone]; + } else { + [self setSelectionState:nil]; + [tableInfoInstance tableChanged:nil]; + } if (selectedTableName) [selectedTableName release], selectedTableName = nil; selectedTableType = SPTableTypeNone; return; @@ -2143,7 +2142,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [alert addButtonWithTitle:NSLocalizedString(@"Stop", @"stop button")]; } [alert setMessageText:NSLocalizedString(@"Error", @"error")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Couldn't delete '%@'.\nMySQL said: %@", @"message of panel when an item cannot be deleted"), [tables objectAtIndex:currentIndex], [mySQLConnection getLastErrorMessage]]]; + [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Couldn't delete '%@'.\n\nMySQL said: %@", @"message of panel when an item cannot be deleted"), [filteredTables objectAtIndex:currentIndex], [mySQLConnection getLastErrorMessage]]]; [alert setAlertStyle:NSWarningAlertStyle]; if ([indexes indexLessThanIndex:currentIndex] == NSNotFound) { [alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:nil contextInfo:nil]; |