aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r--Source/SPQueryController.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index c8906477..538e880b 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -594,7 +594,7 @@ static SPQueryController *sharedQueryController = nil;
{
// Check for multiple instance of the same document.
// Remove it if only one instance was registerd.
- NSArray *allDocs = [[NSDocumentController sharedDocumentController] documents];
+ NSArray *allDocs = [[NSApp delegate] orderedDocuments];
NSMutableArray *allURLs = [NSMutableArray array];
for(id doc in allDocs) {
if (![doc fileURL]) continue;
@@ -635,7 +635,7 @@ static SPQueryController *sharedQueryController = nil;
[historyContainer setObject:historyArray forKey:[fileURL absoluteString]];
// Inform all opened documents to update the history list
- for(id doc in [[NSDocumentController sharedDocumentController] documents])
+ for(id doc in [[NSApp delegate] orderedDocuments])
if([[doc valueForKeyPath:@"customQueryInstance"] respondsToSelector:@selector(historyItemsHaveBeenUpdated:)])
[[doc valueForKeyPath:@"customQueryInstance"] performSelectorOnMainThread:@selector(historyItemsHaveBeenUpdated:) withObject:self waitUntilDone:NO];