From 73dbec26f56cf166b44524c33c56d0bd2869022b Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 11 Apr 2010 13:47:30 +0000 Subject: Add a 'Show Create Syntax...' menu item to the tables list context menu and 'gear' menu. --- Interfaces/English.lproj/DBView.xib | 231 +++++++++++++++++++++++++++-- Interfaces/English.lproj/MainMenu.xib | 266 +++------------------------------- Source/TablesList.h | 8 +- Source/TablesList.m | 71 ++++++--- 4 files changed, 298 insertions(+), 278 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 16099b30..72c845e8 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -3,7 +3,7 @@ 1050 10D573 - 740 + 762 1038.29 460.00 @@ -16,15 +16,14 @@ YES - 740 - 740 - 1.2.2 + 762 + 762 + 1.2.5 YES - - + YES @@ -786,8 +785,31 @@ _popUpItemAction: + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + Show Create Table Syntax... + + 2147483647 + + + _popUpItemAction: + + + 6 YES 1 YES @@ -1694,6 +1716,7 @@ NO NO NO + NO 0.0 0.0 @@ -11884,6 +11907,24 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + + YES + YES + + + 2147483647 + + + + + + Show Create Table Syntax... + + 2147483647 + + + @@ -16298,6 +16339,54 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 6921 + + + showCreateTableSyntax: + + + + 6925 + + + + showCreateTableSyntax: + + + + 6928 + + + + showCreateSyntaxContextMenuItem + + + + 6929 + + + + showCreateSyntaxMenuItem + + + + 6930 + + + + separatorTableMenuItem2 + + + + 6931 + + + + separatorTableContextMenuItem2 + + + + 6932 + @@ -20979,6 +21068,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + @@ -21064,6 +21155,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + Table List Menu @@ -22927,6 +23020,26 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + 6922 + + + + + 6923 + + + + + 6926 + + + + + 6927 + + + @@ -24313,6 +24426,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 6915.IBPluginDependency 6916.IBPluginDependency 6917.IBPluginDependency + 6922.IBPluginDependency + 6923.IBPluginDependency + 6926.IBPluginDependency + 6927.IBPluginDependency 711.IBPluginDependency 711.ImportedFromIB2 713.IBPluginDependency @@ -25122,11 +25239,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{77, 206}, {944, 550}} + {{489, 357}, {944, 550}} com.apple.InterfaceBuilder.CocoaPlugin - {{77, 206}, {944, 550}} + {{489, 357}, {944, 550}} {{62, 352}, {845, 504}} @@ -25719,7 +25836,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.brandonwalkin.BWToolkit com.brandonwalkin.BWToolkit com.brandonwalkin.BWToolkit - {{300, 100}, {157, 98}} + {{508, 255}, {208, 125}} com.brandonwalkin.BWToolkit com.brandonwalkin.BWToolkit @@ -25781,7 +25898,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.brandonwalkin.BWToolkit com.brandonwalkin.BWToolkit - {{623, 397}, {171, 93}} + {{774, 479}, {241, 123}} com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -25827,7 +25944,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {{735, 570}, {233, 53}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{898, 501}, {228, 113}} + {{926, 501}, {228, 113}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -26316,6 +26433,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -26458,7 +26579,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - 6921 + 6932 @@ -27514,6 +27635,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 focusOnTableContentFilter: focusOnTableListFilter: import: + importFromClipboard: openCurrentConnectionInNewWindow: optimizeTable: removeDatabase: @@ -27584,6 +27706,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 id id id + id @@ -27797,6 +27920,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 importFieldsEscapedField importFieldsTerminatedField importFormatPopup + importFromClipboardAccessoryView + importFromClipboardSheet + importFromClipboardTextView importLinesTerminatedField multiCSVFullStreamingSwitch multiXMLFullStreamingSwitch @@ -27853,6 +27979,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 NSPopUpButton id id + NSTextView + id + id id id id @@ -28037,7 +28166,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 renameTableContextMenuItem renameTableMenuItem separatorTableContextMenuItem + separatorTableContextMenuItem2 separatorTableMenuItem + separatorTableMenuItem2 + showCreateSyntaxContextMenuItem + showCreateSyntaxMenuItem spHistoryControllerInstance tabView tableContentInstance @@ -28081,6 +28214,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 NSMenuItem NSMenuItem NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem SPHistoryController id id @@ -29103,6 +29240,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -29118,5 +29256,74 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 YES ../../sequel-pro.xcodeproj 3 + + YES + + YES + NSActionTemplate + NSAddTemplate + NSAdvanced + NSApplicationIcon + NSGoLeftTemplate + NSGoRightTemplate + NSLeftFacingTriangleTemplate + NSListViewTemplate + NSMenuCheckmark + NSMenuMixedState + NSRefreshTemplate + NSRightFacingTriangleTemplate + NSSwitch + button_action + button_add + button_bar_spacer + button_duplicate + button_edit + button_edit_mode + button_edit_mode_selected + button_left + button_pagination + button_pane_hide_icon + button_pane_show_icon + button_refresh + button_remove + button_right + grabber-horizontal + selectall + selectnone + + + YES + {10, 10} + {8, 8} + {32, 32} + {128, 128} + {9, 9} + {9, 9} + {9, 9} + {11, 10} + {9, 8} + {7, 2} + {10, 12} + {9, 9} + {15, 15} + {32, 23} + {32, 23} + {10, 23} + {33, 23} + {32, 23} + {32, 23} + {32, 23} + {32, 23} + {32, 23} + {11, 10} + {11, 10} + {32, 23} + {32, 23} + {32, 23} + {10, 8} + {14, 17} + {14, 17} + + diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib index f4361457..b32ce64a 100644 --- a/Interfaces/English.lproj/MainMenu.xib +++ b/Interfaces/English.lproj/MainMenu.xib @@ -3,16 +3,16 @@ 1050 10D573 - 740 + 762 1038.29 460.00 com.apple.InterfaceBuilder.CocoaPlugin - 740 + 762 YES - + YES @@ -1678,7 +1678,7 @@ - Show Create Table Syntax + Show Create Table Syntax... s 1572864 2147483647 @@ -4944,7 +4944,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{564, 345}, {255, 203}} + {{472, 271}, {255, 203}} com.apple.InterfaceBuilder.CocoaPlugin {{312, 683}, {231, 153}} @@ -5013,7 +5013,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{517, 403}, {279, 233}} + {{553, 241}, {292, 233}} com.apple.InterfaceBuilder.CocoaPlugin {{829, 663}, {268, 173}} com.apple.InterfaceBuilder.CocoaPlugin @@ -5898,6 +5898,7 @@ focusOnTableContentFilter: focusOnTableListFilter: import: + importFromClipboard: openCurrentConnectionInNewWindow: optimizeTable: removeDatabase: @@ -5968,6 +5969,7 @@ id id id + id @@ -6127,244 +6129,6 @@ - - TableDocument - NSDocument - - YES - - YES - addConnectionToFavorites: - addDatabase: - analyzeTable: - backForwardInHistory: - cancelTask: - checkTable: - checksumTable: - chooseDatabase: - chooseEncoding: - closePanelSheet: - closePasswordSheet: - closeSheet: - copyChecksumFromSheet: - copyCreateTableSyntax: - copyCreateTableSyntaxFromSheet: - export: - exportMultipleTables: - exportTable: - flushPrivileges: - flushTable: - focusOnTableContentFilter: - focusOnTableListFilter: - import: - importFromClipboard: - openCurrentConnectionInNewWindow: - optimizeTable: - removeDatabase: - repairTable: - saveConnectionSheet: - saveCreateSyntax: - setDatabases: - showConsole: - showCreateTableSyntax: - showMySQLHelp: - showNavigator: - showServerProcesses: - showServerVariables: - showUserManager: - toggleNavigator: - validateSaveConnectionAccessory: - viewContent: - viewQuery: - viewRelations: - viewStatus: - viewStructure: - viewTriggers: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addDatabaseButton - chooseDatabaseButton - connectionErrorDialog - contentViewSplitter - createTableSyntaxTextField - createTableSyntaxTextView - createTableSyntaxWindow - customQueryInstance - customQueryTextView - databaseDataInstance - databaseEncodingButton - databaseNameField - databaseSheet - dbTablesTableView - encodingPopUp - exportControllerInstance - extendedTableInfoInstance - favoritesButton - historyControl - inputTextWindow - inputTextWindowHeader - inputTextWindowMessage - inputTextWindowSecureTextField - listFilterField - queryProgressBar - saveConnectionAccessory - saveConnectionAutoConnect - saveConnectionEncrypt - saveConnectionEncryptString - saveConnectionIncludeData - saveConnectionIncludeQuery - saveConnectionSavePassword - saveConnectionSavePasswordAlert - sidebarGrabber - spHistoryControllerInstance - statusTableAccessoryView - statusTableCopyChecksum - statusTableView - statusValues - tableContentInstance - tableDataInstance - tableDumpInstance - tableInfoCollapseButton - tableInfoTable - tableListSplitter - tableRelationsInstance - tableSourceInstance - tableTabView - tableTriggersInstance - tableWindow - tablesListInstance - taskCancelButton - taskCancellationCallbackObject - taskDescriptionText - taskProgressIndicator - taskProgressLayer - titleAccessoryView - titleImageView - titleStringView - userManagerInstance - - - YES - id - id - NSWindow - NSSplitView - NSTextField - NSTextView - NSWindow - id - NSTextView - id - id - id - id - NSTableView - NSPopUpButton - id - id - id - id - id - id - id - id - NSSearchField - id - id - id - id - NSSecureTextField - id - id - id - id - id - id - id - id - id - id - id - id - id - NSButton - NSTableView - NSSplitView - id - id - NSTabView - id - id - id - NSButton - id - id - id - NSBox - id - id - id - SPUserManager - - - - IBDocumentRelativeSource - ../../Source/TableDocument.h - - YES @@ -7182,6 +6946,7 @@ 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -7197,5 +6962,18 @@ YES ../../sequel-pro.xcodeproj 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + diff --git a/Source/TablesList.h b/Source/TablesList.h index 12ea61e3..5c6ccf96 100644 --- a/Source/TablesList.h +++ b/Source/TablesList.h @@ -74,17 +74,23 @@ IBOutlet NSSearchField *listFilterField; + // Table list 'gear' menu items IBOutlet NSMenuItem *removeTableMenuItem; IBOutlet NSMenuItem *duplicateTableMenuItem; IBOutlet NSMenuItem *renameTableMenuItem; IBOutlet NSMenuItem *separatorTableMenuItem; - + IBOutlet NSMenuItem *showCreateSyntaxMenuItem; + IBOutlet NSMenuItem *separatorTableMenuItem2; + MCPConnection *mySQLConnection; + // Table list context menu items IBOutlet NSMenuItem *removeTableContextMenuItem; IBOutlet NSMenuItem *duplicateTableContextMenuItem; IBOutlet NSMenuItem *renameTableContextMenuItem; IBOutlet NSMenuItem *separatorTableContextMenuItem; + IBOutlet NSMenuItem *showCreateSyntaxContextMenuItem; + IBOutlet NSMenuItem *separatorTableContextMenuItem2; NSMutableArray *tables; NSMutableArray *filteredTables; diff --git a/Source/TablesList.m b/Source/TablesList.m index bced6366..7d7eb586 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -756,37 +756,43 @@ // Update the selected table name and type if (selectedTableName) [selectedTableName release]; + if ([indexes count]) { selectedTableName = [[NSString alloc] initWithString:@""]; - } else { + } + else { selectedTableName = nil; } + selectedTableType = SPTableTypeNone; [tableSourceInstance loadTable:nil]; [tableContentInstance loadTable:nil]; [extendedTableInfoInstance loadTable:nil]; + structureLoaded = NO; contentLoaded = NO; statusLoaded = NO; // Set gear menu items Remove/Duplicate table/view according to the table types // if at least one item is selected - if([indexes count]) { + if ([indexes count]) { + NSUInteger currentIndex = [indexes lastIndex]; BOOL areTableTypeEqual = YES; NSInteger lastType = [[filteredTableTypes objectAtIndex:currentIndex] integerValue]; + while (currentIndex != NSNotFound) { - if ([[filteredTableTypes objectAtIndex:currentIndex] integerValue] != lastType) - { + if ([[filteredTableTypes objectAtIndex:currentIndex] integerValue] != lastType) { areTableTypeEqual = NO; break; } + currentIndex = [indexes indexLessThanIndex:currentIndex]; } - if (areTableTypeEqual) - { + + if (areTableTypeEqual) { switch (lastType) { case SPTableTypeTable: [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Tables", @"remove tables menu title")]; @@ -823,15 +829,21 @@ [truncateTableContextButton setHidden:YES]; } } + + // Context menu [renameTableContextMenuItem setHidden:YES]; [duplicateTableContextMenuItem setHidden:YES]; [separatorTableContextMenuItem setHidden:YES]; + [separatorTableContextMenuItem2 setHidden:YES]; + [showCreateSyntaxContextMenuItem setHidden:YES]; + // 'Gear' menu [renameTableMenuItem setHidden:YES]; [duplicateTableMenuItem setHidden:YES]; [separatorTableMenuItem setHidden:YES]; - [separatorTableContextMenuItem setHidden:YES]; - + [separatorTableMenuItem2 setHidden:YES]; + [showCreateSyntaxMenuItem setHidden:YES]; + NSMenu *tableSubMenu = [[[NSApp mainMenu] itemWithTitle:@"Table"] submenu]; [[tableSubMenu itemAtIndex:6] setTitle:NSLocalizedString(@"Check Selected Items", @"check selected items menu item")]; @@ -880,18 +892,23 @@ // Reset the table information caches [tableDataInstance resetAllData]; + // Show menu separatoes [separatorTableMenuItem setHidden:NO]; [separatorTableContextMenuItem setHidden:NO]; - + [separatorTableMenuItem2 setHidden:NO]; + [separatorTableContextMenuItem2 setHidden:NO]; + // Set gear menu items Remove/Duplicate table/view and mainMenu > Table items // according to the table types NSMenu *tableSubMenu = [[[NSApp mainMenu] itemWithTitle:@"Table"] submenu]; - if(selectedTableType == SPTableTypeView) + // Enable/disable the various menu items depending on the selected item. Also update their titles. + // Note, that this should ideally be moved to menu item validation as opposed to using fixed item positions. + if (selectedTableType == SPTableTypeView) { // Change mainMenu > Table > ... according to table type [[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create View Syntax", @"copy create view syntax menu item")]; - [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create View Syntax", @"show create view syntax menu item")]; + [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")]; [[tableSubMenu itemAtIndex:5] setHidden:NO]; // Divider [[tableSubMenu itemAtIndex:6] setHidden:NO]; [[tableSubMenu itemAtIndex:6] setTitle:NSLocalizedString(@"Check View", @"check view menu item")]; @@ -909,6 +926,7 @@ [duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")]; [truncateTableButton setHidden:YES]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove View", @"remove view menu title")]; + [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")]; [renameTableContextMenuItem setHidden:NO]; // we don't have to check the mysql version [renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename View...", @"rename view menu title")]; @@ -916,10 +934,11 @@ [duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")]; [truncateTableContextButton setHidden:YES]; [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove View", @"remove view menu title")]; + [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")]; } - else if(selectedTableType == SPTableTypeTable) { + else if (selectedTableType == SPTableTypeTable) { [[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create Table Syntax", @"copy create table syntax menu item")]; - [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Table Syntax", @"show create table syntax menu item")]; + [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")]; [[tableSubMenu itemAtIndex:5] setHidden:NO]; // divider [[tableSubMenu itemAtIndex:6] setHidden:NO]; [[tableSubMenu itemAtIndex:6] setTitle:NSLocalizedString(@"Check Table", @"check table menu item")]; @@ -942,6 +961,8 @@ [truncateTableButton setHidden:NO]; [truncateTableButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Table", @"remove table menu title")]; + [showCreateSyntaxMenuItem setHidden:NO]; + [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")]; [renameTableContextMenuItem setHidden:NO]; [renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Table...", @"rename table menu title")]; @@ -950,11 +971,12 @@ [truncateTableContextButton setHidden:NO]; [truncateTableContextButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")]; [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Table", @"remove table menu title")]; - + [showCreateSyntaxContextMenuItem setHidden:NO]; + [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")]; } - else if(selectedTableType == SPTableTypeProc) { + else if (selectedTableType == SPTableTypeProc) { [[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create Procedure Syntax", @"copy create proc syntax menu item")]; - [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Procedure Syntax", @"show create proc syntax menu item")]; + [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")]; [[tableSubMenu itemAtIndex:5] setHidden:YES]; // divider [[tableSubMenu itemAtIndex:6] setHidden:YES]; // copy columns [[tableSubMenu itemAtIndex:7] setHidden:YES]; // divider @@ -970,18 +992,21 @@ [duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")]; [truncateTableButton setHidden:YES]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Procedure", @"remove proc menu title")]; - + [showCreateSyntaxMenuItem setHidden:NO]; + [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")]; + [renameTableContextMenuItem setHidden:NO]; [renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Procedure...", @"rename proc menu title")]; [duplicateTableContextMenuItem setHidden:NO]; [duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")]; [truncateTableContextButton setHidden:YES]; [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Procedure", @"remove proc menu title")]; - + [showCreateSyntaxContextMenuItem setHidden:NO]; + [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")]; } - else if(selectedTableType == SPTableTypeFunc) { + else if (selectedTableType == SPTableTypeFunc) { [[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create Function Syntax", @"copy create func syntax menu item")]; - [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Function Syntax", @"show create func syntax menu item")]; + [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")]; [[tableSubMenu itemAtIndex:5] setHidden:YES]; // divider [[tableSubMenu itemAtIndex:6] setHidden:YES]; // copy columns [[tableSubMenu itemAtIndex:7] setHidden:YES]; // divider @@ -997,13 +1022,17 @@ [duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")]; [truncateTableButton setHidden:YES]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Function", @"remove func menu title")]; - + [showCreateSyntaxMenuItem setHidden:NO]; + [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")]; + [renameTableContextMenuItem setHidden:NO]; [renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Function...", @"rename func menu title")]; [duplicateTableContextMenuItem setHidden:NO]; [duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")]; [truncateTableContextButton setHidden:YES]; [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Function", @"remove func menu title")]; + [showCreateSyntaxContextMenuItem setHidden:NO]; + [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")]; } // set window title -- cgit v1.2.3