diff options
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]; |