From b7875e8fdbdc5980c12a847997cc9631979dd4d3 Mon Sep 17 00:00:00 2001 From: Abhi Beckert Date: Sun, 10 Apr 2016 14:11:47 +1000 Subject: fix warnings --- Source/SPBundleEditorController.m | 2 +- Source/SPConnectionController.m | 22 ++++++++++++++++++++++ Source/SPConnectionControllerDelegate.m | 19 ------------------- Source/SPDatabaseStructure.m | 6 ++---- 4 files changed, 25 insertions(+), 24 deletions(-) (limited to 'Source') diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m index 9986fa98..e95c5d8c 100644 --- a/Source/SPBundleEditorController.m +++ b/Source/SPBundleEditorController.m @@ -701,7 +701,7 @@ if ([commandsOutlineView numberOfSelectedRows] != 1) return; [[NSWorkspace sharedWorkspace] selectFile:[NSString stringWithFormat:@"%@/%@.%@/%@", - bundlePath, [[self _currentSelectedObject] objectForKey:kBundleNameKey], SPUserBundleFileExtension, SPBundleFileName] inFileViewerRootedAtPath:nil]; + bundlePath, [[self _currentSelectedObject] objectForKey:kBundleNameKey], SPUserBundleFileExtension, SPBundleFileName] inFileViewerRootedAtPath:@""]; } /** diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index f2d1ce7a..4a509796 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -2049,6 +2049,28 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [super dealloc]; } +#ifndef SP_CODA + +/** + * Called by the favorites exporter when the export completes. + */ +- (void)favoritesExportCompletedWithError:(NSError *)error +{ + if (error) { + NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Favorites export error", @"favorites export error message") + defaultButton:NSLocalizedString(@"OK", @"OK") + alternateButton:nil + otherButton:nil + informativeTextWithFormat:NSLocalizedString(@"The following error occurred during the export process:\n\n%@", @"favorites export error informative message"), [error localizedDescription]]; + + [alert beginSheetModalForWindow:[dbDocument parentWindow] + modalDelegate:self + didEndSelector:NULL + contextInfo:NULL]; + } +} +#endif + @end #pragma mark - diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m index 99af9e35..4ec0148a 100644 --- a/Source/SPConnectionControllerDelegate.m +++ b/Source/SPConnectionControllerDelegate.m @@ -679,25 +679,6 @@ static NSString *SPQuickConnectImageWhite = @"quick-connect-icon-white.pdf"; #ifndef SP_CODA -/** - * Called by the favorites exporter when the export completes. - */ -- (void)favoritesExportCompletedWithError:(NSError *)error -{ - if (error) { - NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Favorites export error", @"favorites export error message") - defaultButton:NSLocalizedString(@"OK", @"OK") - alternateButton:nil - otherButton:nil - informativeTextWithFormat:NSLocalizedString(@"The following error occurred during the export process:\n\n%@", @"favorites export error informative message"), [error localizedDescription]]; - - [alert beginSheetModalForWindow:[dbDocument parentWindow] - modalDelegate:self - didEndSelector:NULL - contextInfo:NULL]; - } -} - /** * Called by the favorites importer when the imported data is available. */ diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m index b1bed3c9..f6b449e2 100644 --- a/Source/SPDatabaseStructure.m +++ b/Source/SPDatabaseStructure.m @@ -152,8 +152,7 @@ if([[NSThread currentThread] isCancelled]) goto cleanup_thread_and_pool; // This thread is now first on the stack, and about to process the structure. -#warning Should not set delegate as the notification source object - [[NSNotificationCenter defaultCenter] postNotificationName:@"SPDBStructureIsUpdating" object:delegate]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"SPDBStructureIsUpdating" object:self]; NSString *connectionID = ([delegate respondsToSelector:@selector(connectionID)])? [NSString stringWithString:[delegate connectionID]] : @"_"; @@ -390,8 +389,7 @@ update_globals_and_cleanup: if(structureWasUpdated) { // Notify that the structure querying has been performed -#warning Should not set delegate as the notification source object - [[NSNotificationCenter defaultCenter] postNotificationName:@"SPDBStructureWasUpdated" object:delegate]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"SPDBStructureWasUpdated" object:self]; } cleanup_thread_and_pool: -- cgit v1.2.3