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 /Source | |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMCopyTable.h | 2 | ||||
-rw-r--r-- | Source/CMCopyTable.m | 5 |
2 files changed, 5 insertions, 2 deletions
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 ) { |