Permalink
Browse files

Fix UI access from background query execution thread.

  • Loading branch information...
stuconnolly committed Oct 9, 2018
1 parent 7fd5341 commit 582885a04c8095b56916c5c88efacd8c0c9da0d4
Showing with 5 additions and 5 deletions.
  1. +5 −5 Source/SPCustomQuery.m
View
@@ -558,9 +558,9 @@ - (IBAction)clearQueryHistory:(id)sender
/* *
* Set font panel's valid modes
*/
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel
{
return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
return NSFontPanelSizeModeMask | NSFontPanelCollectionModeMask;
}
#pragma mark -
@@ -921,7 +921,7 @@ - (void)performQueriesTask:(NSDictionary *)taskArguments
#ifndef SP_CODA /* growl */
// Perform the Growl notification for query completion
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [errorText string]]
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [[errorText onMainThread] string]]
document:tableDocumentInstance
notificationName:@"Query Finished"];
#endif
@@ -951,7 +951,7 @@ - (void)performQueriesTask:(NSDictionary *)taskArguments
#ifndef SP_CODA /* growl */
// Query finished Growl notification
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [errorText string]]
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [[errorText onMainThread] string]]
document:tableDocumentInstance
notificationName:@"Query Finished"];
#endif
@@ -967,7 +967,7 @@ - (void)performQueriesTask:(NSDictionary *)taskArguments
// Restore selection indexes if appropriate
if (selectionIndexToRestore) [customQueryView selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO];
if(reloadingExistingResult) [[tableDocumentInstance parentWindow] makeFirstResponder:customQueryView];
if (reloadingExistingResult) [[tableDocumentInstance parentWindow] makeFirstResponder:customQueryView];
}
}

0 comments on commit 582885a

Please sign in to comment.