diff options
author | sqlprodev <sqlprodev@northofthree.com> | 2012-03-27 21:02:15 +0000 |
---|---|---|
committer | sqlprodev <sqlprodev@northofthree.com> | 2012-03-27 21:02:15 +0000 |
commit | 0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919 (patch) | |
tree | 338bb0a6805d74566ae074c5db7ae6e443e9ed30 /Source/SPCopyTable.m | |
parent | 611dc52b10ecace3bc95df5645701fd23f165d37 (diff) | |
download | sequelpro-0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919.tar.gz sequelpro-0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919.tar.bz2 sequelpro-0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919.zip |
tweaks to compile on Xcode 4 / 10.6 SDK for SP_REFACTOR
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r-- | Source/SPCopyTable.m | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 79fc89e6..637c3913 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -36,7 +36,11 @@ #import "SPBundleEditorController.h" #import "SPAppController.h" #import "SPTablesList.h" +#ifndef SP_REFACTOR #import "SPMySQL.h" +#else +#import <SPMySQL/SPMySQL.h> +#endif NSInteger SPEditMenuCopy = 2001; NSInteger SPEditMenuCopyWithColumns = 2002; @@ -112,6 +116,15 @@ static const NSInteger kBlobAsImageFile = 4; #endif } +#ifdef SP_REFACTOR + +- (void)delete:(id)sender +{ + [tableInstance removeRow:self]; +} + +#endif + /** * Get selected rows a string of newline separated lines of tab separated fields * the value in each field is from the objects description method @@ -979,6 +992,16 @@ static const NSInteger kBlobAsImageFile = 4; return (columnDefinitions != nil && [self numberOfSelectedRows] > 0); } #endif +#ifdef SP_REFACTOR + if ( [anItem action] == @selector(selectAll:) ) + return YES; + + if ( [anItem action] == @selector(delete:) ) + { + if ( [self numberOfSelectedRows] > 0 ) + return YES; + } +#endif return NO; } @@ -1158,7 +1181,18 @@ static const NSInteger kBlobAsImageFile = 4; { // Retrieve the column definition +#if SP_REFACTOR + NSDictionary *columnDefinition; + + if ( [[self delegate] isKindOfClass:[SPTableContent class]] ) + columnDefinition = [[(SPTableContent*)[self delegate] dataColumnDefinitions] objectAtIndex:colIndex]; + + else if ( [[self delegate] isKindOfClass:[SPCustomQuery class]] ) + columnDefinition = [[(SPCustomQuery*)[self delegate] dataColumnDefinitions] objectAtIndex:colIndex]; +#else NSDictionary *columnDefinition = [[[self delegate] dataColumnDefinitions] objectAtIndex:colIndex]; +#endif + NSString *columnType = [columnDefinition objectForKey:@"typegrouping"]; // Return YES if the multiple line editing button is enabled - triggers sheet editing on all cells. |