diff options
author | stuconnolly <stuart02@gmail.com> | 2011-03-04 22:05:55 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-03-04 22:05:55 +0000 |
commit | 09a49199cd951f2bb8947c7853d357ae53fb51de (patch) | |
tree | 53d6151fe931ae7ac513b629c7f700c5600276f1 | |
parent | 994756398decf77738afb3c599d4cb9238c77cee (diff) | |
download | sequelpro-09a49199cd951f2bb8947c7853d357ae53fb51de.tar.gz sequelpro-09a49199cd951f2bb8947c7853d357ae53fb51de.tar.bz2 sequelpro-09a49199cd951f2bb8947c7853d357ae53fb51de.zip |
Fix more compiler warnings.
-rw-r--r-- | Source/SPAppController.m | 1 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.h | 1 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 2 | ||||
-rw-r--r-- | Source/SPEditorPreferencePane.h | 1 | ||||
-rw-r--r-- | Source/SPEditorPreferencePane.m | 2 | ||||
-rw-r--r-- | Source/SPExportControllerDelegate.m | 9 | ||||
-rw-r--r-- | Source/SPFavoritesPreferencePane.m | 4 | ||||
-rw-r--r-- | Source/SPTableContent.m | 36 | ||||
-rw-r--r-- | Source/SPTableStructureDelegate.m | 2 |
9 files changed, 35 insertions, 23 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index b0daf035..6ffef7aa 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -2073,7 +2073,6 @@ YY_BUFFER_STATE yy_scan_string (const char *); */ - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { - // Manually open a table document [self newWindow:self]; diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h index b22eae94..efc3f25e 100644 --- a/Source/SPDatabaseDocument.h +++ b/Source/SPDatabaseDocument.h @@ -306,6 +306,7 @@ - (IBAction)copyChecksumFromSheet:(id)sender; - (void)setIsSavedInBundle:(BOOL)savedInBundle; - (void)setFileURL:(NSURL *)fileURL; +- (void)connect; - (void)showConsole:(id)sender; - (IBAction)showNavigator:(id)sender; diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 4b7ea526..9e42961b 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -59,6 +59,7 @@ #import "SPDatabaseViewController.h" #import "SPBundleHTMLOutputController.h" #import "SPConnectionDelegate.h" +#import "SPWindowController.h" @interface SPDatabaseDocument (PrivateAPI) @@ -3312,7 +3313,6 @@ */ - (void) updateWindowTitle:(id)sender { - // Ensure a call on the main thread if (![NSThread isMainThread]) return [[self onMainThread] updateWindowTitle:sender]; diff --git a/Source/SPEditorPreferencePane.h b/Source/SPEditorPreferencePane.h index d7cb1eb4..6e94d9eb 100644 --- a/Source/SPEditorPreferencePane.h +++ b/Source/SPEditorPreferencePane.h @@ -63,7 +63,6 @@ } - (IBAction)showCustomQueryFontPanel:(id)sender; -- (IBAction)showGlobalResultTableFontPanel:(id)sender; - (IBAction)setDefaultColors:(id)sender; - (IBAction)exportColorScheme:(id)sender; - (IBAction)importColorScheme:(id)sender; diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m index 05c1d791..0cae1217 100644 --- a/Source/SPEditorPreferencePane.m +++ b/Source/SPEditorPreferencePane.m @@ -517,7 +517,7 @@ static NSString *SPDefaultExportColourSchemeName = @"MyTheme"; } } -- (void)panelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo +- (void)panelDidEnd:(NSOpenPanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { if ([contextInfo isEqualToString:SPExportColorScheme]) { if (returnCode == NSOKButton) { diff --git a/Source/SPExportControllerDelegate.m b/Source/SPExportControllerDelegate.m index 575bb0f9..8f4977a6 100644 --- a/Source/SPExportControllerDelegate.m +++ b/Source/SPExportControllerDelegate.m @@ -24,6 +24,15 @@ // More info at <http://code.google.com/p/sequel-pro/> #import "SPExportControllerDelegate.h" +#import "SPExportFilenameUtilities.h" + +// Defined to suppress warnings +@interface SPExportController (SPExportControllerPrivateAPI) + +- (void)_toggleExportButtonOnBackgroundThread; +- (void)_switchTab; + +@end @implementation SPExportController (SPExportControllerDelegate) diff --git a/Source/SPFavoritesPreferencePane.m b/Source/SPFavoritesPreferencePane.m index 7d108364..a5099f73 100644 --- a/Source/SPFavoritesPreferencePane.m +++ b/Source/SPFavoritesPreferencePane.m @@ -87,7 +87,7 @@ [favoritesTabView setTabViewType:NSNoTabsNoBorder]; // Sort favorites if a sort type has been selected - if (currentSortItem > -1) [self _sortFavorites]; + if ((NSInteger)currentSortItem > -1) [self _sortFavorites]; } #pragma mark - @@ -205,7 +205,7 @@ // Perform sorting [self _sortFavorites]; - if (previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState]; + if ((NSInteger)previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState]; [[[sender menu] itemAtIndex:currentSortItem] setState:NSOnState]; } diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 33d13ca4..4e107570 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -1771,9 +1771,8 @@ /** * Perform the requested row deletion action. */ -- (void)removeRowSheetDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +- (void)removeRowSheetDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { - NSMutableIndexSet *selectedRows = [NSMutableIndexSet indexSet]; NSString *wherePart; NSInteger i, errors; @@ -1783,8 +1782,8 @@ // Order out current sheet to suppress overlapping of sheets [[alert window] orderOut:nil]; - if ( [contextInfo isEqualToString:@"removeallrows"] ) { - if ( returnCode == NSAlertDefaultReturn ) { + if ([contextInfo isEqualToString:@"removeallrows"]) { + if (returnCode == NSAlertDefaultReturn) { // Check if the user is currently editing a row, and revert to ensure a somewhat // consistent state if deletion fails. @@ -1816,8 +1815,9 @@ afterDelay:0.3]; } } - } else if ( [contextInfo isEqualToString:@"removerow"] ) { - if ( returnCode == NSAlertDefaultReturn ) { + } + else if ([contextInfo isEqualToString:@"removerow"]) { + if (returnCode == NSAlertDefaultReturn) { [selectedRows addIndexes:[tableContentView selectedRowIndexes]]; //check if the user is currently editing a row @@ -3481,11 +3481,10 @@ */ - (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(id)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation { - - if(aTableView == filterTableView) { + if (aTableView == filterTableView) { return nil; } - else if(aTableView == tableContentView) { + else if (aTableView == tableContentView) { if([[aCell stringValue] length] < 2 || [tableDocumentInstance isWorking]) return nil; @@ -3552,26 +3551,29 @@ return nil; } + + return nil; } - (NSInteger)numberOfRowsInTableView:(SPCopyTable *)aTableView { - if(aTableView == filterTableView) { - if(filterTableIsSwapped) + if (aTableView == filterTableView) { + if (filterTableIsSwapped) return [filterTableData count]; else return [[[filterTableData objectForKey:[NSNumber numberWithInteger:0]] objectForKey:@"filter"] count]; } - else if(aTableView == tableContentView) { + else if (aTableView == tableContentView) { return tableRowsCount; } + + return 0; } - (id)tableView:(SPCopyTable *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { - - if(aTableView == filterTableView) { - if(filterTableIsSwapped) + if (aTableView == filterTableView) { + if (filterTableIsSwapped) // First column shows the field names if([[aTableColumn identifier] integerValue] == 0) { NSTableHeaderCell *c = [[[NSTableHeaderCell alloc] initTextCell:[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"name"]] autorelease]; @@ -3582,7 +3584,7 @@ return NSArrayObjectAtIndex([[filterTableData objectForKey:[aTableColumn identifier]] objectForKey:@"filter"], rowIndex); } } - else if(aTableView == tableContentView) { + else if (aTableView == tableContentView) { NSUInteger columnIndex = [[aTableColumn identifier] integerValue]; id theValue = nil; @@ -3617,6 +3619,8 @@ return theValue; } + + return nil; } /** diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index 23ac801b..3a46b763 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -98,7 +98,7 @@ currentlyEditingRow = rowIndex; } - NSDictionary *currentRow = [tableFields objectAtIndex:rowIndex]; + NSMutableArray *currentRow = [tableFields objectAtIndex:rowIndex]; // Reset collation if encoding was changed if([[aTableColumn identifier] isEqualToString:@"encoding"]) { |