diff options
author | stuconnolly <stuart02@gmail.com> | 2010-09-24 10:23:12 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-09-24 10:23:12 +0000 |
commit | c5b9f95e0ba0cb0ef7bfa045b3e1a771674f01c1 (patch) | |
tree | be7e2c0c8b454e962fdf43bf070665697c4895f9 | |
parent | 71f121cfdc7593759289f2e6ae6990958d8d224f (diff) | |
download | sequelpro-c5b9f95e0ba0cb0ef7bfa045b3e1a771674f01c1.tar.gz sequelpro-c5b9f95e0ba0cb0ef7bfa045b3e1a771674f01c1.tar.bz2 sequelpro-c5b9f95e0ba0cb0ef7bfa045b3e1a771674f01c1.zip |
Change the comment fomat used when displaying and copying the create syntaxes for multiple tables to '--' from '#'. Implements issue #842.
-rw-r--r-- | Source/SPDatabaseDocument.m | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index d22de2a3..ae37cabe 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -1772,7 +1772,6 @@ */ - (IBAction)showCreateTableSyntax:(id)sender { - NSInteger colOffs = 1; NSString *query = nil; NSString *typeString = @""; @@ -1832,7 +1831,7 @@ } NSString *tableSyntax; - if( type == SPTableTypeProc ) + if (type == SPTableTypeProc) tableSyntax = [NSString stringWithFormat:@"DELIMITER ;;\n%@;;\nDELIMITER ", [[theResult fetchRowAsArray] objectAtIndex:colOffs]]; else tableSyntax = [[theResult fetchRowAsArray] objectAtIndex:colOffs]; @@ -1849,7 +1848,7 @@ } if([indexes count] > 1) - header = [NSString stringWithFormat:@"# Create syntax for %@ '%@'\n", typeString, [items objectAtIndex:counter]]; + header = [NSString stringWithFormat:@"-- Create syntax for %@ '%@'\n", typeString, [items objectAtIndex:counter]]; [createSyntax appendFormat:@"%@%@;%@", header, (type == SPTableTypeView) ? [tableSyntax createViewSyntaxPrettifier] : tableSyntax, (counter < [indexes count]-1) ? @"\n\n" : @""]; @@ -1862,7 +1861,7 @@ // copy to the clipboard if sender was self, otherwise // show syntax(es) in sheet - if(sender == self) { + if (sender == self) { NSPasteboard *pb = [NSPasteboard generalPasteboard]; [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; [pb setString:createSyntax forType:NSStringPboardType]; @@ -1877,7 +1876,7 @@ } - if([indexes count] == 1) + if ([indexes count] == 1) [createTableSyntaxTextField setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Create syntax for %@ '%@'", @"Create syntax label"), typeString, [self table]]]; else [createTableSyntaxTextField setStringValue:NSLocalizedString(@"Create syntaxes for selected items", @"Create syntaxes for selected items label")]; @@ -1903,10 +1902,9 @@ */ - (IBAction)copyCreateTableSyntax:(id)sender { - [self showCreateTableSyntax:self]; + return; - } /** @@ -1914,7 +1912,6 @@ */ - (IBAction)checkTable:(id)sender { - NSArray *selectedItems = [tablesListInstance selectedTableItems]; id message = nil; |