diff options
author | bamse16 <marius@marius.me.uk> | 2009-05-25 10:40:43 +0000 |
---|---|---|
committer | bamse16 <marius@marius.me.uk> | 2009-05-25 10:40:43 +0000 |
commit | 1c60ff0331ce7e2a9eb64e1fda988b0bf3448bd2 (patch) | |
tree | 7b93cf3956abee34ca118221e5cbcc124542fc74 | |
parent | 6df5d2147ef4ac72760a8ab776ab8a4d489aebe9 (diff) | |
download | sequelpro-1c60ff0331ce7e2a9eb64e1fda988b0bf3448bd2.tar.gz sequelpro-1c60ff0331ce7e2a9eb64e1fda988b0bf3448bd2.tar.bz2 sequelpro-1c60ff0331ce7e2a9eb64e1fda988b0bf3448bd2.zip |
Replaced check on title with check on menu tag for Copy with Column Names issue #233. Thanks to Ben for suggestion.
-rw-r--r-- | Interfaces/English.lproj/MainMenu.xib | 9 | ||||
-rw-r--r-- | Source/CMCopyTable.h | 2 | ||||
-rw-r--r-- | Source/CMCopyTable.m | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib index 5ec9cfa1..40aee95d 100644 --- a/Interfaces/English.lproj/MainMenu.xib +++ b/Interfaces/English.lproj/MainMenu.xib @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="628"/> + <integer value="926"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -583,6 +583,7 @@ <int key="NSMnemonicLoc">2147483647</int> <reference key="NSOnImage" ref="625762401"/> <reference key="NSMixedImage" ref="315854375"/> + <int key="NSTag">2001</int> </object> <object class="NSMenuItem" id="892596559"> <reference key="NSMenu" ref="71086556"/> @@ -3958,7 +3959,7 @@ <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{476, 497}, {268, 233}}</string> + <string>{{223, 594}, {268, 233}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{654, 613}, {157, 223}}</string> @@ -4168,7 +4169,7 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{434, 537}, {209, 193}}</string> + <string>{{181, 634}, {209, 193}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{180, 535}, {182, 253}}</string> @@ -4560,6 +4561,7 @@ w6gg4oaSIGZhY2FkZV0</string> <string>closeSheet:</string> <string>connect:</string> <string>connectSheetAddToFavorites:</string> + <string>connectSheetShowHelp:</string> <string>connectToDB:</string> <string>copyCreateTableSyntax:</string> <string>editFavorites:</string> @@ -4620,6 +4622,7 @@ w6gg4oaSIGZhY2FkZV0</string> <string>id</string> <string>id</string> <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> diff --git a/Source/CMCopyTable.h b/Source/CMCopyTable.h index a342de01..38d3d472 100644 --- a/Source/CMCopyTable.h +++ b/Source/CMCopyTable.h @@ -88,3 +88,5 @@ - (NSString *)draggedRowsAsTabString:(NSArray *)rows; @end + +extern int MENU_EDIT_COPY_WITH_COLUMN;
\ No newline at end of file diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m index c0a415d5..3a227bd2 100644 --- a/Source/CMCopyTable.m +++ b/Source/CMCopyTable.m @@ -24,6 +24,7 @@ #import "CMCopyTable.h" +int MENU_EDIT_COPY_WITH_COLUMN = 2001; @implementation CMCopyTable @@ -32,7 +33,7 @@ NSString *tmp = nil; BOOL withHeaders = NO; - if([[sender title] isEqualToString:@"Copy with Column Names"]) { + if([sender tag] == MENU_EDIT_COPY_WITH_COLUMN) { withHeaders = YES; } @@ -60,7 +61,7 @@ - (BOOL)validateMenuItem:(NSMenuItem*)anItem { int row = [self selectedRow]; - if ( [[anItem title] isEqualToString:@"Copy"] || [[anItem title] isEqualToString:@"Copy with Column Names"] ) + if ( [[anItem title] isEqualToString:@"Copy"] || [anItem tag] == MENU_EDIT_COPY_WITH_COLUMN ) { if (row < 0 ) { |