adium-1.4 2766:67be3e959a78: Don't base focus application on con...

commits at adium.im commits at adium.im
Tue Nov 10 15:57:10 UTC 2009


details:	http://hg.adium.im/adium-1.4/rev/67be3e959a78
revision:	2766:67be3e959a78
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.

diffs (45 lines):

diff -r 9596a7e49707 -r 67be3e959a78 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