diff options
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 ) { |