adium 2319:2b5f4cdecaf4: Keep track of when an account is in a c...
commits at adium.im
commits at adium.im
Mon May 25 17:10:13 UTC 2009
details: http://hg.adium.im/adium/rev/2b5f4cdecaf4
revision: 2319:2b5f4cdecaf4
author: Zachary West <zacw at adium.im>
date: Mon May 25 13:09:58 2009 -0400
Keep track of when an account is in a chat, displaying this status for the chat's tab icon. Fixes #12064.
diffstat:
ChangeLogs/Changes Between Betas.txt | 1 +
Frameworks/Adium Framework/Source/AIChat.h | 1 -
Frameworks/Adium Framework/Source/AIChat.m | 6 ------
Plugins/Dual Window Interface/AIMessageTabViewItem.m | 6 +++---
Plugins/Purple Service/CBPurpleAccount.m | 4 ++--
Plugins/Twitter Plugin/AITwitterAccount.m | 2 ++
6 files changed, 8 insertions(+), 12 deletions(-)
diffs (96 lines):
diff -r eb4e00ea03d8 -r 2b5f4cdecaf4 ChangeLogs/Changes Between Betas.txt
--- a/ChangeLogs/Changes Between Betas.txt Mon May 25 12:39:32 2009 -0400
+++ b/ChangeLogs/Changes Between Betas.txt Mon May 25 13:09:58 2009 -0400
@@ -3,6 +3,7 @@
* Moved the Status Menu Item and Dock preferences to a new "Message Alerts" advanced preference.
* Clarified the option to only count the number of highlights/mentions in the dock/status menu item in its wording. (#12080)
* Status icon packs can now specify "Idle And Away" icons to use for contacts. (#872)
+ * Changed the status icon for group chats to be Available when joined, and Offline when parted. (#12064)
* Fixed dragging and dropping emoticon packs to reorder them. (#12099)
* Fixed removing contacts when groups are disabled. (#12136?)
* Fixed the voiceover for certain fields in the authorization requests window.
diff -r eb4e00ea03d8 -r 2b5f4cdecaf4 Frameworks/Adium Framework/Source/AIChat.h
--- a/Frameworks/Adium Framework/Source/AIChat.h Mon May 25 12:39:32 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIChat.h Mon May 25 13:09:58 2009 -0400
@@ -130,7 +130,6 @@
+ (id)chatForAccount:(AIAccount *)inAccount;
@property (readwrite, nonatomic, retain) AIAccount *account;
-- (void)accountDidJoinChat;
@property (readonly, nonatomic) NSDate *dateOpened;
@property (readwrite, nonatomic, retain) NSDictionary *chatCreationDictionary;
diff -r eb4e00ea03d8 -r 2b5f4cdecaf4 Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m Mon May 25 12:39:32 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIChat.m Mon May 25 13:09:58 2009 -0400
@@ -168,12 +168,6 @@
notify:NotifyNever];
}
-- (void)accountDidJoinChat
-{
- [self willChangeValueForKey:@"actionMenu"];
- [self didChangeValueForKey:@"actionMenu"];
-}
-
@synthesize hasSentOrReceivedContent, isOpen, dateOpened;
//Status ---------------------------------------------------------------------------------------------------------------
diff -r eb4e00ea03d8 -r 2b5f4cdecaf4 Plugins/Dual Window Interface/AIMessageTabViewItem.m
--- a/Plugins/Dual Window Interface/AIMessageTabViewItem.m Mon May 25 12:39:32 2009 -0400
+++ b/Plugins/Dual Window Interface/AIMessageTabViewItem.m Mon May 25 13:09:58 2009 -0400
@@ -176,7 +176,7 @@
NSArray *keys = [[notification userInfo] objectForKey:@"Keys"];
//If the display name changed, we resize the tabs
- if (notification == nil || [keys containsObject:@"Display Name"]) {
+ if (notification == nil || [keys containsObject:@"Display Name"] || [keys containsObject:@"Account Joined"]) {
[self setLabel:[self label]];
[self updateTabStatusIcon];
} else if ([keys containsObject:@"UnviewedContent"]) {
@@ -286,10 +286,10 @@
//Multi-user chats won't have status icons
if (!image && messageViewController.chat.isGroupChat) {
- BOOL accountOnline = messageViewController.chat.account.online;
+ BOOL displayOnline = messageViewController.chat.account.online && [messageViewController.chat boolValueForProperty:@"Account Joined"];
image = [AIStatusIcons statusIconForStatusName:nil
- statusType:accountOnline ? AIAvailableStatusType : AIOfflineStatusType
+ statusType:displayOnline ? AIAvailableStatusType : AIOfflineStatusType
iconType:AIStatusIconTab
direction:AIIconNormal];
} else if (!image) {
diff -r eb4e00ea03d8 -r 2b5f4cdecaf4 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m Mon May 25 12:39:32 2009 -0400
+++ b/Plugins/Purple Service/CBPurpleAccount.m Mon May 25 13:09:58 2009 -0400
@@ -934,7 +934,7 @@
[adium.interfaceController openChat:chat];
- [chat accountDidJoinChat];
+ [chat setValue:[NSNumber numberWithBool:YES] forProperty:@"Account Joined" notify:NotifyNow];
}
//Open a chat for Adium
@@ -1066,7 +1066,7 @@
*/
- (void)leftChat:(AIChat *)chat
{
- AILogWithSignature(@"Chat left - something should happen here!");
+ [chat setValue:nil forProperty:@"Account Joined" notify:NotifyNow];
}
- (void)updateTopic:(NSString *)inTopic forChat:(AIChat *)chat withSource:(NSString *)source
diff -r eb4e00ea03d8 -r 2b5f4cdecaf4 Plugins/Twitter Plugin/AITwitterAccount.m
--- a/Plugins/Twitter Plugin/AITwitterAccount.m Mon May 25 12:39:32 2009 -0400
+++ b/Plugins/Twitter Plugin/AITwitterAccount.m Mon May 25 13:09:58 2009 -0400
@@ -301,6 +301,8 @@
*/
- (BOOL)openChat:(AIChat *)chat
{
+ [chat setValue:[NSNumber numberWithBool:YES] forProperty:@"Account Joined" notify:NotifyNow];
+
return YES;
}
More information about the commits
mailing list