adium 4518:c03db1b36e32: -logContentIndex blocks until the index...

commits at adium.im commits at adium.im
Tue Jan 17 12:23:56 UTC 2012


details:	http://hg.adium.im/adium/rev/c03db1b36e32
revision:	4518:c03db1b36e32
branch:		(none)
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Tue Jan 17 13:23:41 2012 +0100

-logContentIndex blocks until the index has been created. Move this call here so the waiting doesn't happen on the main thread.

Also, prettify some debug messages.

diffs (38 lines):

diff -r 1c62031359a1 -r c03db1b36e32 Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m	Mon Jan 16 20:21:03 2012 -0500
+++ b/Source/AILogViewerWindowController.m	Tue Jan 17 13:23:41 2012 +0100
@@ -1240,7 +1240,6 @@
 		[NSNumber numberWithInteger:activeSearchID], @"ID",
 		[NSNumber numberWithInteger:searchMode], @"Mode",
 		activeSearchString, @"String",
-		[plugin logContentIndex], @"SearchIndex",
 		nil];
     [NSThread detachNewThreadSelector:@selector(filterLogsWithSearch:) toTarget:self withObject:searchDict];
     
@@ -1714,7 +1713,7 @@
 
     if (searchID == activeSearchID) { //If we're still supposed to go
 		searching = YES;
-		AILog(@"filterLogsWithSearch (search ID %i): %@",searchID,searchInfoDict);
+		AILogWithSignature(@"Search ID %i: %@", searchID, searchInfoDict);
 		//Search
 		if (searchString && [searchString length]) {
 			switch (mode) {
@@ -1728,7 +1727,7 @@
 				case LOG_SEARCH_CONTENT:
 					[self _logContentFilter:searchString
 								   searchID:searchID
-							  onSearchIndex:(SKIndexRef)[searchInfoDict objectForKey:@"SearchIndex"]];
+							  onSearchIndex:[plugin logContentIndex]];
 					break;
 			}
 		} else {
@@ -1740,7 +1739,7 @@
 		//Refresh
 		searching = NO;
 		[self performSelectorOnMainThread:@selector(searchComplete) withObject:nil waitUntilDone:NO];
-		AILog(@"filterLogsWithSearch (search ID %i): finished",searchID);
+		AILogWithSignature(@"Search ID %i): finished", searchID);
     }
 	
     //Cleanup




More information about the commits mailing list