adium 2905:a432d0b79552: Don't base focus application on content...
commits at adium.im
commits at adium.im
Tue Nov 10 15:57:49 UTC 2009
details: http://hg.adium.im/adium/rev/a432d0b79552
revision: 2905:a432d0b79552
author: Zachary West <zacw at adium.im>
date: Tue Nov 10 10:56:52 2009 -0500
Don't base focus application on content tracking, since status messages aren't tracked. Base it on whether or not the content is post-processed (i.e., logged). Refs #13356.
(transplanted from 67be3e959a785b176e106f36ef39c42c367ffc33)
diffs (45 lines):
diff -r 32b94cf58806 -r a432d0b79552 Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m Mon Nov 09 14:15:48 2009 -0500
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m Tue Nov 10 10:56:52 2009 -0500
@@ -676,26 +676,23 @@
[topicElement setInnerHTML:[messageStyle completedTemplateForContent:content similar:similar]];
} else {
- if (content.trackContent) {
- // Mark the current location (the start of this element) if it's a mention.
- if ([content.displayClasses containsObject:@"mention"]) {
- [self markCurrentLocation];
+ // Mark the current location (the start of this element) if it's a mention.
+ if (content.trackContent && [content.displayClasses containsObject:@"mention"]) {
+ [self markCurrentLocation];
+ }
+
+ if (content.postProcessContent && adium.interfaceController.activeChat != content.chat) {
+ if (nextMessageFocus) {
+ [self.markedScroller addMarkAt:[self.currentOffsetHeight integerValue] withIdentifier:@"focus" withColor:[NSColor redColor]];
+
+ // Add a class for "first content to lose focus"
+ [content addDisplayClass:@"firstFocus"];
+
+ nextMessageFocus = NO;
}
- // Apply focus classes appropriately.
- if (adium.interfaceController.activeChat != content.chat) {
- if (nextMessageFocus) {
- [self.markedScroller addMarkAt:[self.currentOffsetHeight integerValue] withIdentifier:@"focus" withColor:[NSColor redColor]];
-
- // Add a class for "first content to lose focus"
- [content addDisplayClass:@"firstFocus"];
-
- nextMessageFocus = NO;
- }
-
- // Add a class for "this content received while out of focus"
- [content addDisplayClass:@"focus"];
- }
+ // Add a class for "this content received while out of focus"
+ [content addDisplayClass:@"focus"];
}
//Add the content object
More information about the commits
mailing list