adium 2624:a6d98b00c3cb: We registered as an observer, we should...

commits at adium.im commits at adium.im
Mon Aug 24 18:08:36 UTC 2009


details:	http://hg.adium.im/adium/rev/a6d98b00c3cb
revision:	2624:a6d98b00c3cb
author:		Stephen Holt <sholt at adium.im>
date:		Mon Aug 24 14:13:56 2009 -0400

We registered as an observer, we should unregester ourselves, too.
Subject: adium 2625:c08df21fa1b5: We don't need these AILogs here.

details:	http://hg.adium.im/adium/rev/c08df21fa1b5
revision:	2625:c08df21fa1b5
author:		Stephen Holt <sholt at adium.im>
date:		Mon Aug 24 14:13:59 2009 -0400

We don't need these AILogs here.

diffs (35 lines):

diff -r 80d3d47e02b0 -r c08df21fa1b5 Source/AIMentionEventPlugin.m
--- a/Source/AIMentionEventPlugin.m	Sat Aug 22 23:10:25 2009 -0400
+++ b/Source/AIMentionEventPlugin.m	Mon Aug 24 14:13:59 2009 -0400
@@ -52,6 +52,7 @@
 - (void)uninstallPlugin
 {
 	[adium.contentController unregisterContentFilter:self];
+	[adium.preferenceController unregisterPreferenceObserver:self];
 }
 
 #pragma mark -
@@ -89,7 +90,6 @@
 				[chat incrementUnviewedMentionCount];
 			}
 			[message addDisplayClass:@"mention"];
-			AILog(@"MENTIONED!");
 			break;
 		}
 	}
@@ -112,7 +112,6 @@
 - (void)preferencesChangedForGroup:(NSString *)group key:(NSString *)key object:(AIListObject *)object preferenceDict:(NSDictionary *)prefDict firstTime:(BOOL)firstTime
 {
 	if(firstTime || [key isEqualToString:PREF_KEY_MENTIONS]) {
-		AILog(@"building mentions...");
 		NSArray *allMentions = [adium.preferenceController preferenceForKey:PREF_KEY_MENTIONS group:PREF_GROUP_GENERAL];
 		NSMutableArray *predicates = [NSMutableArray arrayWithCapacity:[allMentions count]];
 		NSPredicate *regexPredicate = [NSPredicate predicateWithFormat:@"SELF MATCHES '/.*/'"];
@@ -121,7 +120,6 @@
 			if([regexPredicate evaluateWithObject:mention]) {
 				[predicates addObject:[NSPredicate predicateWithFormat:@"SELF MATCHES[cd] %@", [NSString stringWithFormat:@".*%@.*", [mention substringWithRange:NSMakeRange(1, [mention length]-2)]]]];
 			} else {
-				AILog(@"%@ -> %@", mention, [mention stringByEscapingForRegexp]);
 				[predicates addObject:[NSPredicate predicateWithFormat:@"SELF MATCHES[cd] %@", [NSString stringWithFormat:@".*\\b%@\\b.*", [mention stringByEscapingForRegexp]]]];
 			}
 		}




More information about the commits mailing list