Changeset 23581
- Timestamp:
- 05/22/2008 11:04:46 PM (6 months ago)
- Files:
-
- trunk/Frameworks/Adium Framework/Source/AIChatControllerProtocol.h (modified) (1 diff)
- trunk/Frameworks/Adium Framework/Source/AIStatusControllerProtocol.h (modified) (1 diff)
- trunk/Plugins/Dock Icon Badging/AIDockBadger.h (modified) (1 diff)
- trunk/Plugins/Dock Icon Badging/AIDockBadger.m (modified) (5 diffs)
- trunk/Plugins/Status Menu Item/CBStatusMenuItemController.h (modified) (1 diff)
- trunk/Plugins/Status Menu Item/CBStatusMenuItemController.m (modified) (3 diffs)
- trunk/Resources/StatusPreferencesAdvanced.nib/classes.nib (modified) (3 diffs)
- trunk/Resources/StatusPreferencesAdvanced.nib/info.nib (modified) (1 diff)
- trunk/Resources/StatusPreferencesAdvanced.nib/keyedobjects.nib (modified) (previous)
- trunk/Source/AIChatController.m (modified) (1 diff)
- trunk/Source/ESStatusAdvancedPreferences.h (modified) (1 diff)
- trunk/Source/ESStatusAdvancedPreferences.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Frameworks/Adium Framework/Source/AIChatControllerProtocol.h
r23232 r23581 40 40 - (AIChat *)mostRecentUnviewedChat; 41 41 - (int)unviewedContentCount; 42 - (int)unviewedConversationCount; 42 43 - (void)switchChat:(AIChat *)chat toAccount:(AIAccount *)newAccount; 43 44 - (void)switchChat:(AIChat *)chat toListContact:(AIListContact *)inContact usingContactAccount:(BOOL)useContactAccount; trunk/Frameworks/Adium Framework/Source/AIStatusControllerProtocol.h
r23523 r23581 31 31 32 32 #define PREF_GROUP_STATUS_PREFERENCES @"Status Preferences" 33 #define KEY_STATUS_CONVERSATION_COUNT @"Unread Conversations" 33 34 #define KEY_STATUS_REPORT_IDLE @"Report Idle" 34 35 #define KEY_STATUS_REPORT_IDLE_INTERVAL @"Report Idle Interval" trunk/Plugins/Dock Icon Badging/AIDockBadger.h
r20090 r23581 26 26 27 27 BOOL shouldBadge; 28 BOOL showConversationCount; 28 29 } 29 30 trunk/Plugins/Dock Icon Badging/AIDockBadger.m
r17742 r23581 19 19 #import <Adium/AIContactControllerProtocol.h> 20 20 #import <Adium/AIContentControllerProtocol.h> 21 #import <Adium/AIStatusControllerProtocol.h> 21 22 #import "AIDockController.h" 22 23 #import <Adium/AIInterfaceControllerProtocol.h> … … 56 57 //Observe pref changes 57 58 [[adium preferenceController] registerPreferenceObserver:self forGroup:PREF_GROUP_APPEARANCE]; 59 60 // Register as an observer of the status preferences for unread conversation count 61 [[adium preferenceController] registerPreferenceObserver:self 62 forGroup:PREF_GROUP_STATUS_PREFERENCES]; 58 63 } 59 64 … … 98 103 object:(AIListObject *)object preferenceDict:(NSDictionary *)prefDict firstTime:(BOOL)firstTime 99 104 { 100 if ( !key || [key isEqualToString:KEY_BADGE_DOCK_ICON]) {105 if ([group isEqualToString:PREF_GROUP_APPEARANCE] && (!key || [key isEqualToString:KEY_BADGE_DOCK_ICON])) { 101 106 BOOL newShouldBadge = [[prefDict objectForKey:KEY_BADGE_DOCK_ICON] boolValue]; 102 107 if (newShouldBadge != shouldBadge) { … … 121 126 } 122 127 } 128 129 if ([group isEqualToString:PREF_GROUP_STATUS_PREFERENCES]) { 130 showConversationCount = [[prefDict objectForKey:KEY_STATUS_CONVERSATION_COUNT] boolValue]; 131 } 123 132 } 124 133 … … 186 195 - (void)_setOverlay 187 196 { 188 int contentCount = [[adium chatController] unviewedContentCount]; 197 int contentCount = (showConversationCount ? 198 [[adium chatController] unviewedConversationCount] : [[adium chatController] unviewedContentCount]); 189 199 190 200 if (contentCount != lastUnviewedContentCount) { trunk/Plugins/Status Menu Item/CBStatusMenuItemController.h
r23580 r23581 46 46 NSTimer *unviewedContentFlash; 47 47 48 BOOL showConversationCount; 49 48 50 BOOL showBadge; 49 51 BOOL showUnreadCount; trunk/Plugins/Status Menu Item/CBStatusMenuItemController.m
r23580 r23581 136 136 [[adium contactController] registerListObjectObserver:self]; 137 137 138 // Register as an observer of the preference group so we can update our "show offlinecontacts" option138 // Register as an observer of the preference group so we can update our "show groups contacts" option 139 139 [[adium preferenceController] registerPreferenceObserver:self 140 140 forGroup:PREF_GROUP_CONTACT_LIST_DISPLAY]; 141 141 142 // Register as an observer of the status preferences for unread conversation count 143 [[adium preferenceController] registerPreferenceObserver:self 144 forGroup:PREF_GROUP_STATUS_PREFERENCES]; 145 142 146 // Register as an observer of our own preference group 143 147 [[adium preferenceController] registerPreferenceObserver:self 144 forGroup:PREF_GROUP_STATUS_MENU_ITEM]; 148 forGroup:PREF_GROUP_STATUS_MENU_ITEM]; 145 149 146 150 //Register to recieve active state changed notifications … … 250 254 - (void)updateUnreadCount 251 255 { 252 int unreadCount = [[adium chatController] unviewedContentCount]; 256 int unreadCount = (showConversationCount ? 257 [[adium chatController] unviewedConversationCount] : [[adium chatController] unviewedContentCount]); 253 258 254 259 // Only show if enabled and greater-than zero; otherwise, set to nil. … … 843 848 [self updateStatusItemLength]; 844 849 } 850 851 if ([group isEqualToString:PREF_GROUP_STATUS_PREFERENCES]) { 852 showConversationCount = [[prefDict objectForKey:KEY_STATUS_CONVERSATION_COUNT] boolValue]; 853 } 845 854 } 846 855 trunk/Resources/StatusPreferencesAdvanced.nib/classes.nib
r22227 r23581 15 15 <dict> 16 16 <key>CLASS</key> 17 <string>RBSplitView</string> 18 <key>LANGUAGE</key> 19 <string>ObjC</string> 20 <key>OUTLETS</key> 21 <dict> 22 <key>delegate</key> 23 <string>id</string> 24 </dict> 25 <key>SUPERCLASS</key> 26 <string>RBSplitSubview</string> 27 </dict> 28 <dict> 29 <key>CLASS</key> 17 30 <string>NSTextField</string> 18 31 <key>LANGUAGE</key> … … 30 43 </dict> 31 44 <dict> 45 <key>CLASS</key> 46 <string>RBSplitSubview</string> 47 <key>LANGUAGE</key> 48 <string>ObjC</string> 49 <key>SUPERCLASS</key> 50 <string>NSView</string> 51 </dict> 52 <dict> 32 53 <key>ACTIONS</key> 33 54 <dict> 34 55 <key>adiumPrint</key> 35 56 <string>id</string> 57 <key>didAdjustSubviews</key> 58 <string>RBSplitView</string> 36 59 <key>prefsWindowWillClose</key> 37 60 <string>SS_PrefsController</string> 61 <key>toggleFindPanel</key> 62 <string>id</string> 63 <key>willAdjustSubviews</key> 64 <string>RBSplitView</string> 38 65 </dict> 39 66 <key>CLASS</key> … … 127 154 <string>NSButton</string> 128 155 <key>checkBox_statusWindowHideInBackground</key> 156 <string>NSButton</string> 157 <key>checkBox_unreadConversations</key> 129 158 <string>NSButton</string> 130 159 <key>label_quitConfirmation</key> trunk/Resources/StatusPreferencesAdvanced.nib/info.nib
r22227 r23581 14 14 </array> 15 15 <key>IBSystem Version</key> 16 <string>9 B18</string>16 <string>9C7010</string> 17 17 <key>targetFramework</key> 18 18 <string>IBCocoaFramework</string> trunk/Source/AIChatController.m
r23557 r23581 720 720 721 721 /*! 722 * @brief Gets the total number of conversations with unviewed messages 723 * 724 * @result The number of conversations with unviewed messages 725 */ 726 - (int)unviewedConversationCount 727 { 728 int count = 0; 729 AIChat *chat; 730 NSEnumerator *enumerator; 731 732 enumerator = [[self openChats] objectEnumerator]; 733 while ((chat = [enumerator nextObject])) { 734 if ([chat unviewedContentCount] > 0) 735 count++; 736 } 737 return count; 738 } 739 740 /*! 722 741 * @brief Is the passed contact in a group chat? 723 742 * trunk/Source/ESStatusAdvancedPreferences.h
r21551 r23581 9 9 10 10 @interface ESStatusAdvancedPreferences : AIAdvancedPreferencePane { 11 IBOutlet NSButton *checkBox_unreadConversations; 12 11 13 IBOutlet NSTextField *label_statusWindow; 12 14 IBOutlet NSButton *checkBox_statusWindowHideInBackground; trunk/Source/ESStatusAdvancedPreferences.m
r21551 r23581 51 51 - (void)viewDidLoad 52 52 { 53 [checkBox_unreadConversations setLocalizedString:AILocalizedString(@"Count unread conversations instead of unread messages", nil)]; 54 53 55 [label_statusWindow setLocalizedString:AILocalizedString(@"Away Status Window", nil)]; 54 56 [checkBox_statusWindowHideInBackground setLocalizedString:AILocalizedString(@"Hide the status window when Adium is not active", nil)];