Skip to content

Commit 582885a

Browse files
committed
Fix UI access from background query execution thread.
1 parent 7fd5341 commit 582885a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Source/SPCustomQuery.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,9 @@ - (IBAction)clearQueryHistory:(id)sender
558558
/* *
559559
* Set font panel's valid modes
560560
*/
561-
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
561+
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel
562562
{
563-
return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
563+
return NSFontPanelSizeModeMask | NSFontPanelCollectionModeMask;
564564
}
565565

566566
#pragma mark -
@@ -921,7 +921,7 @@ - (void)performQueriesTask:(NSDictionary *)taskArguments
921921
#ifndef SP_CODA /* growl */
922922
// Perform the Growl notification for query completion
923923
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
924-
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [errorText string]]
924+
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [[errorText onMainThread] string]]
925925
document:tableDocumentInstance
926926
notificationName:@"Query Finished"];
927927
#endif
@@ -951,7 +951,7 @@ - (void)performQueriesTask:(NSDictionary *)taskArguments
951951
#ifndef SP_CODA /* growl */
952952
// Query finished Growl notification
953953
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
954-
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [errorText string]]
954+
description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [[errorText onMainThread] string]]
955955
document:tableDocumentInstance
956956
notificationName:@"Query Finished"];
957957
#endif
@@ -967,7 +967,7 @@ - (void)performQueriesTask:(NSDictionary *)taskArguments
967967
// Restore selection indexes if appropriate
968968
if (selectionIndexToRestore) [customQueryView selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO];
969969

970-
if(reloadingExistingResult) [[tableDocumentInstance parentWindow] makeFirstResponder:customQueryView];
970+
if (reloadingExistingResult) [[tableDocumentInstance parentWindow] makeFirstResponder:customQueryView];
971971
}
972972
}
973973

0 commit comments

Comments
 (0)