adium 2962:8776101641d6: Store a per-chat preference for show/jo...
commits at adium.im
commits at adium.im
Wed Nov 25 23:10:14 UTC 2009
details: http://hg.adium.im/adium/rev/8776101641d6
revision: 2962:8776101641d6
author: Evan Schoenberg
date: Wed Nov 25 17:11:53 2009 -0600
Store a per-chat preference for show/join leave notices. This is uniqued only by the chat name, but I think that's appropriate; the preference will then apply to the same room regardless of the account with which you connect to it. Fixes #12034
Subject: adium 2963:6f3ccdb7caa1: String comments
details: http://hg.adium.im/adium/rev/6f3ccdb7caa1
revision: 2963:6f3ccdb7caa1
author: Evan Schoenberg
date: Wed Nov 25 17:12:06 2009 -0600
String comments
diffs (46 lines):
diff -r 2b43e083a20f -r 6f3ccdb7caa1 Plugins/Twitter Plugin/AITwitterAccount.m
--- a/Plugins/Twitter Plugin/AITwitterAccount.m Tue Nov 24 07:25:54 2009 -0800
+++ b/Plugins/Twitter Plugin/AITwitterAccount.m Wed Nov 25 17:12:06 2009 -0600
@@ -620,7 +620,7 @@
[menuItem setRepresentedObject:inContact];
[menuItemArray addObject:menuItem];
- menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:AILocalizedString(@"Enable device notifications for %@",nil), inContact.UID]
+ menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:AILocalizedString(@"Enable device notifications for %@", "Enable sending Twitter notifications to your phone (device)"), inContact.UID]
target:self
action:@selector(enableOrDisableNotifications:)
keyEquivalent:@""] autorelease];
@@ -629,7 +629,7 @@
[menuItem setRepresentedObject:inContact];
[menuItemArray addObject:menuItem];
- menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:AILocalizedString(@"Disable device notifications for %@",nil), inContact.UID]
+ menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:AILocalizedString(@"Disable device notifications for %@", "Disable sending Twitter notifications to your phone"), inContact.UID]
target:self
action:@selector(enableOrDisableNotifications:)
keyEquivalent:@""] autorelease];
diff -r 2b43e083a20f -r 6f3ccdb7caa1 Source/AIChatController.m
--- a/Source/AIChatController.m Tue Nov 24 07:25:54 2009 -0800
+++ b/Source/AIChatController.m Wed Nov 25 17:12:06 2009 -0600
@@ -413,7 +413,9 @@
chat.identifier = identifier;
chat.isGroupChat = YES;
chat.chatCreationDictionary = chatCreationInfo;
-
+ /* Negative preference so (default == NO) -> showing join/leave messages */
+ chat.showJoinLeave = ![[adium preferenceController] preferenceForKey:[NSString stringWithFormat:@"HideJoinLeave-%@", name]
+ group:PREF_GROUP_STATUS_PREFERENCES];
[openChats addObject:chat];
AILog(@"chatWithName:%@ identifier:%@ onAccount:%@ added <<%@>> [%@] [%@]",name,identifier,account,chat,openChats,chatCreationInfo);
@@ -844,6 +846,10 @@
}
chat.showJoinLeave = !chat.showJoinLeave;
+
+ [[adium preferenceController] setPreference:[NSNumber numberWithBool:!chat.showJoinLeave]
+ forKey:[NSString stringWithFormat:@"HideJoinLeave-%@", chat.name]
+ group:PREF_GROUP_STATUS_PREFERENCES];
}
/*!
More information about the commits
mailing list