adium-1.4 2825:21c1813a173a: When opening for a contact, don't s...
commits at adium.im
commits at adium.im
Thu Nov 26 05:22:22 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/21c1813a173a
revision: 2825:21c1813a173a
author: Zachary West <zacw at adium.im>
date: Thu Nov 26 00:22:17 2009 -0500
When opening for a contact, don't silently switch the search type to "to". Fixes #12001.
This also moves the automatic selection below the "we're now updating for search" line, so that highlighting is applied to the log (since when it's asked to display, there's no search term for it).
diffs (56 lines):
diff -r 0eb39f6eb39c -r 21c1813a173a Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m Wed Nov 25 23:53:28 2009 -0500
+++ b/Source/AILogViewerWindowController.m Thu Nov 26 00:22:17 2009 -0500
@@ -88,6 +88,7 @@
- (void)filterForContact:(AIListContact *)inContact;
- (void)filterForChatName:(NSString *)chatName withAccount:(AIAccount *)account;
- (void)selectCachedIndex;
+- (void)tableViewSelectionDidChangeDelayed;
- (NSAlert *)alertForDeletionOfLogCount:(NSUInteger)logCount;
@@ -447,7 +448,8 @@
[self initLogFiltering];
//Begin our initial search
- [self setSearchMode:LOG_SEARCH_TO];
+ if (!isOpeningForContact)
+ [self setSearchMode:LOG_SEARCH_TO];
[searchField_logs setStringValue:(activeSearchString ? activeSearchString : @"")];
suppressSearchRequests = NO;
@@ -628,6 +630,13 @@
NSInteger count = [currentSearchResults count];
[resultsLock unlock];
AILog(@"refreshResultsSearchIsComplete: %i (count is %i)",searchIsComplete,count);
+
+ if (searchIsComplete &&
+ ((activeSearchID == searchIDToReattemptWhenComplete) && !windowIsClosing)) {
+ searchIDToReattemptWhenComplete = -1;
+ [self startSearchingClearingCurrentResults:NO];
+ }
+
if (!searching || count <= MAX_LOGS_TO_SORT_WHILE_SEARCHING) {
//Sort the logs correctly which will also reload the table
[self resortLogs];
@@ -638,19 +647,13 @@
} else {
BOOL oldAutomaticSearch = automaticSearch;
-
+
//We don't want the above re-selection to change our automaticSearch tracking
//(The only reason automaticSearch should change is in response to user action)
automaticSearch = oldAutomaticSearch;
}
}
- if (searchIsComplete &&
- ((activeSearchID == searchIDToReattemptWhenComplete) && !windowIsClosing)) {
- searchIDToReattemptWhenComplete = -1;
- [self startSearchingClearingCurrentResults:NO];
- }
-
if(deleteOccurred)
[self selectCachedIndex];
More information about the commits
mailing list