adium 3548:2102fa4f5663: Backed out changeset 2cafa270320d

commits at adium.im commits at adium.im
Wed Nov 17 20:42:15 UTC 2010


details:	http://hg.adium.im/adium/rev/2102fa4f5663
revision:	3548:2102fa4f5663
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Wed Nov 17 14:29:34 2010 +0100

Backed out changeset 2cafa270320d

kbotc has found the real fix, instead of this ugly hack.
Subject: adium 3549:bba1ae824895: Merged.

details:	http://hg.adium.im/adium/rev/bba1ae824895
revision:	3549:bba1ae824895
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Wed Nov 17 14:30:04 2010 +0100

Merged.
Subject: adium 3550:079eb7a72de8: Patch from kbotc which properly fixes the overreleased properties on meta-contacts.

details:	http://hg.adium.im/adium/rev/079eb7a72de8
revision:	3550:079eb7a72de8
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Wed Nov 17 21:34:19 2010 +0100

Patch from kbotc which properly fixes the overreleased properties on meta-contacts.

diffs (142 lines):

diff -r 2cafa270320d -r 079eb7a72de8 Frameworks/Adium Framework/Source/AIMetaContact.m
--- a/Frameworks/Adium Framework/Source/AIMetaContact.m	Tue Nov 16 17:25:29 2010 +0100
+++ b/Frameworks/Adium Framework/Source/AIMetaContact.m	Wed Nov 17 21:34:19 2010 +0100
@@ -51,7 +51,6 @@
 @property (readonly, nonatomic) NSArray *visibleListContacts;
 
 + (NSArray *)_forwardedProperties;
-+ (NSArray *)_notForwardedProperties;
 @end
 
 @implementation AIMetaContact
@@ -688,22 +687,7 @@
 	if (properties == nil) {
 		properties = [[NSArray alloc] initWithObjects:@"isOnline", @"isEvent", @"isBlocked",
 					  @"isIdle", @"notAStranger", @"isMobile", @"signedOff", @"signedOn",
-					  @"unviewedContent", @"unviewedMention", @"idle", @"idleSince", @"formattedUID",
-					  @"listObjectStatusMessage", @"textProfile", nil];
-	}
-	return properties;
-}
-
-+ (NSArray *)_notForwardedProperties
-{
-	static NSArray *properties = nil;
-	
-	if (properties == nil) {
-		properties = [[NSArray alloc] initWithObjects:@"serverDisplayName", @"listStatusIcon",
-					  @"listStateIcon", @"imageOpacity", @"textColor", @"invertedTextColor",
-					  @"extendedStatus", @"labelColor", @"ABUniqueID", @"listObjectStatusType",
-					  @"listObjectStatusName", @"alwaysVisible", @"webKitUserIconPath",
-					  @"idleReadable", nil];
+					  @"alwaysOnline", @"unviewedContent", @"unviewedMention", nil];
 	}
 	return properties;
 }
@@ -714,8 +698,6 @@
 	
 	if ([[[self class] _forwardedProperties] containsObject:key]) {
 		ret = [self.preferredContact valueForProperty:key];
-	} else if ([[[self class] _notForwardedProperties] containsObject:key]) {
-		ret = [super valueForProperty:key];
 	} else {
 		ret = [super valueForProperty:key] ?: [self.preferredContact valueForProperty:key];
 	}
@@ -729,8 +711,6 @@
 	
 	if ([[[self class] _forwardedProperties] containsObject:key]) {
 		ret = [self.preferredContact integerValueForProperty:key];
-	} else if ([[[self class] _notForwardedProperties] containsObject:key]) {
-		ret = [super integerValueForProperty:key];
 	} else {
 		ret = [super integerValueForProperty:key] ?: [self.preferredContact integerValueForProperty:key];
 	}
@@ -744,8 +724,6 @@
 	
 	if ([[[self class] _forwardedProperties] containsObject:key]) {
 		ret = [self.preferredContact intValueForProperty:key];
-	} else if ([[[self class] _notForwardedProperties] containsObject:key]) {
-		ret = [super intValueForProperty:key];
 	} else {
 		ret = [super intValueForProperty:key] ?: [self.preferredContact intValueForProperty:key];
 	}
@@ -759,8 +737,6 @@
 	
 	if ([[[self class] _forwardedProperties] containsObject:key]) {
 		ret = [self.preferredContact boolValueForProperty:key];
-	} else if ([[[self class] _notForwardedProperties] containsObject:key]) {
-		ret = [super boolValueForProperty:key];
 	} else {
 		ret = [super boolValueForProperty:key] ?: [self.preferredContact boolValueForProperty:key];
 	}
diff -r 2cafa270320d -r 079eb7a72de8 Frameworks/Adium Framework/Source/ESObjectWithProperties.m
--- a/Frameworks/Adium Framework/Source/ESObjectWithProperties.m	Tue Nov 16 17:25:29 2010 +0100
+++ b/Frameworks/Adium Framework/Source/ESObjectWithProperties.m	Wed Nov 17 21:34:19 2010 +0100
@@ -22,6 +22,7 @@
 
 @interface ESObjectWithProperties (AIPrivate)
 - (void)_applyDelayedProperties:(NSDictionary *)infoDict;
+- (id)_valueForProperty:(NSString *)key;
 @end
 
 /*!
@@ -72,11 +73,11 @@
 - (void)setValue:(id)value forProperty:(NSString *)key notify:(NotifyTiming)notify
 {
     NSParameterAssert(key != nil);
-    id oldValue = [self valueForProperty:key];
-    if ((!oldValue && !value) ||
-        (value && [value isEqual:oldValue])) //No need to do all this work just to stay the same
+    id oldValue = [self _valueForProperty:key];
+    if (value == oldValue) { //No need to do all this work just to stay the same
         return;
-
+    }
+        
     [self willChangeValueForKey:key];
     	
 	Ivar ivar = class_getInstanceVariable([self class], [key UTF8String]);
@@ -208,10 +209,19 @@
 @synthesize properties = propertiesDictionary;
 
 /*!
+ * @brief Compatibility class
+ * @result A call to the private class here for safety's sake.
+ */
+- (id)valueForProperty:(NSString *)key
+{
+    return [self _valueForProperty:key];
+}
+
+/*!
  * @brief Value for a property
  * @result The value associated with the passed key, or nil if none has been set.
  */
-- (id)valueForProperty:(NSString *)key
+- (id)_valueForProperty:(NSString *)key
 {
 	id ret = nil;
 	id value = nil;
diff -r 2cafa270320d -r 079eb7a72de8 Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m	Tue Nov 16 17:25:29 2010 +0100
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m	Wed Nov 17 21:34:19 2010 +0100
@@ -703,14 +703,16 @@
 			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"];
+				// Add a class for "first content to lose focus" if this is a group chat
+				if (content.chat.isGroupChat)
+					[content addDisplayClass:@"firstFocus"];
 				
 				nextMessageFocus = NO;
 			}
 
 			// Add a class for "this content received while out of focus"
-			[content addDisplayClass:@"focus"];
+			if (content.chat.isGroupChat)
+				[content addDisplayClass:@"focus"];
 		}
 		
 		//Add the content object




More information about the commits mailing list