adium 3135:44d8be01e8ab: Since this is operation based now, we d...
commits at adium.im
commits at adium.im
Thu Feb 18 17:32:30 UTC 2010
details: http://hg.adium.im/adium/rev/44d8be01e8ab
revision: 3135:44d8be01e8ab
author: Stephen Holt <sholt at adium.im>
date: Thu Feb 18 12:25:54 2010 -0500
Since this is operation based now, we don't ever really need to pause indexing, cancelling we may do though.
diffs (82 lines):
diff -r 715dc09cdcb5 -r 44d8be01e8ab Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m Thu Feb 18 10:40:30 2010 -0500
+++ b/Source/AILogViewerWindowController.m Thu Feb 18 12:25:54 2010 -0500
@@ -370,7 +370,7 @@
[super windowDidLoad];
- [plugin pauseIndexing];
+ [plugin cancelIndexing];
[[self window] setTitle:AILocalizedString(@"Chat Transcript Viewer",nil)];
[textField_progress setStringValue:@""];
@@ -465,8 +465,6 @@
[tableView_results setAutosaveName:@"LogViewerResults"];
[tableView_results setAutosaveTableColumns:YES];
-
- [plugin resumeIndexing];
}
-(void)rebuildIndices
@@ -1602,7 +1600,6 @@
searching = YES;
AILog(@"filterLogsWithSearch (search ID %i): %@",searchID,searchInfoDict);
//Search
- [plugin pauseIndexing];
if (searchString && [searchString length]) {
switch (mode) {
case LOG_SEARCH_FROM:
@@ -1626,7 +1623,6 @@
//Refresh
searching = NO;
- [plugin resumeIndexing];
[self performSelectorOnMainThread:@selector(searchComplete) withObject:nil waitUntilDone:NO];
AILog(@"filterLogsWithSearch (search ID %i): finished",searchID);
}
diff -r 715dc09cdcb5 -r 44d8be01e8ab Source/AILoggerPlugin.h
--- a/Source/AILoggerPlugin.h Thu Feb 18 10:40:30 2010 -0500
+++ b/Source/AILoggerPlugin.h Thu Feb 18 12:25:54 2010 -0500
@@ -78,8 +78,7 @@
- (void)markLogDirtyAtPath:(NSString *)path;
- (BOOL)getIndexingProgress:(NSUInteger *)complete outOf:(NSUInteger *)total;
-- (void)pauseIndexing;
-- (void)resumeIndexing;
+- (void)cancelIndexing;
- (void)removePathsFromIndex:(NSSet *)paths;
diff -r 715dc09cdcb5 -r 44d8be01e8ab Source/AILoggerPlugin.m
--- a/Source/AILoggerPlugin.m Thu Feb 18 10:40:30 2010 -0500
+++ b/Source/AILoggerPlugin.m Thu Feb 18 12:25:54 2010 -0500
@@ -1489,25 +1489,16 @@
}
}
-- (void)pauseIndexing
+- (void)cancelIndexing
{
if (logsToIndex) {
indexingAllowed = NO;
+ [[[self class] operationQueue] cancelAllOperations];
logsToIndex = 0;
- AILogWithSignature(@"Paused Indexing");
+ AILogWithSignature(@"Canceling indexing operations.");
}
}
-- (void)resumeIndexing
-{
- AILogWithSignature(@"Told to resume indexing");
- indexingAllowed = YES;
- [[[self class] operationQueue] addOperation:
- [[NSInvocationOperation alloc] initWithTarget:self
- selector:@selector(cleanDirtyLogs)
- object:nil]];
-}
-
- (void)_cleanDirtyLogsThread:(SKIndexRef)searchIndex
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
More information about the commits
mailing list