adium 2116:28fc1065ee4a: Set the IsExpanded default for groups (...
commits at adium.im
commits at adium.im
Thu May 7 16:30:41 UTC 2009
details: http://hg.adium.im/adium/rev/28fc1065ee4a
revision: 2116:28fc1065ee4a
author: Evan Schoenberg
date: Thu May 07 12:28:11 2009 -0400
Set the IsExpanded default for groups (which use the contact list preference group) to YES. Fixes #11992.
This won't change metacontact behavior, as they store the preference under the same key but a different group (the status object status cache). Hooray for correct behavior as a result of past counterintuitive decisions.
Subject: adium 2117:91299ee797cb: `#define` cleanup
details: http://hg.adium.im/adium/rev/91299ee797cb
revision: 2117:91299ee797cb
author: Evan Schoenberg
date: Thu May 07 12:29:45 2009 -0400
`#define` cleanup
diffstat:
Frameworks/Adium Framework/Source/AIContactControllerProtocol.h | 14 +++++++
Frameworks/Adium Framework/Source/AIInterfaceControllerProtocol.h | 1 -
Frameworks/Adium Framework/Source/AIListGroup.m | 2 +-
Frameworks/Adium Framework/Source/AIMetaContact.m | 2 -
Resources/ContactListDefaults.plist | 4 +-
Source/AIContactController.h | 12 ------
Source/AIContactController.m | 2 +-
Source/AIListWindowController.m | 2 -
Source/AILogViewerWindowController.m | 1 -
Source/AISCLViewPlugin.h | 2 -
Source/AISCLViewPlugin.m | 2 +-
Source/CBContactCountingDisplayPlugin.m | 2 -
12 files changed, 20 insertions(+), 26 deletions(-)
diffs (174 lines):
diff -r 699ae94cb727 -r 91299ee797cb Frameworks/Adium Framework/Source/AIContactControllerProtocol.h
--- a/Frameworks/Adium Framework/Source/AIContactControllerProtocol.h Wed May 06 21:56:53 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIContactControllerProtocol.h Thu May 07 12:29:45 2009 -0400
@@ -31,6 +31,20 @@
#define PREF_GROUP_ADDRESSBOOK @"Address Book"
#define PREF_GROUP_ALWAYS_VISIBLE @"Always Visible"
+#define KEY_EXPANDED @"IsExpanded"
+
+#define KEY_HIDE_CONTACTS @"Hide Contacts"
+#define KEY_SHOW_OFFLINE_CONTACTS @"Show Offline Contacts"
+#define KEY_SHOW_BLOCKED_CONTACTS @"Show Blocked Contacts"
+#define KEY_SHOW_IDLE_CONTACTS @"Show Idle Contacts"
+#define KEY_SHOW_MOBILE_CONTACTS @"Show Mobile Contacts"
+#define KEY_SHOW_AWAY_CONTACTS @"Show Away Contacts"
+#define KEY_HIDE_ACCOUNT_CONTACTS @"Hide Account Contacts"
+
+#define KEY_USE_OFFLINE_GROUP @"Use Offline Group"
+#define KEY_HIDE_CONTACT_LIST_GROUPS @"Hide Contact List Groups"
+#define PREF_GROUP_CONTACT_LIST_DISPLAY @"Contact List Display"
+#define PREF_GROUP_CONTACT_LIST @"Contact List"
typedef enum {
AIUserInfoLabelValuePair = 0 /* default */,
diff -r 699ae94cb727 -r 91299ee797cb Frameworks/Adium Framework/Source/AIInterfaceControllerProtocol.h
--- a/Frameworks/Adium Framework/Source/AIInterfaceControllerProtocol.h Wed May 06 21:56:53 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIInterfaceControllerProtocol.h Thu May 07 12:29:45 2009 -0400
@@ -36,7 +36,6 @@
#define KEY_SAVE_CONTAINERS @"Save Containers On Quit"
#define KEY_CONTAINERS @"Containers"
-#define PREF_GROUP_CONTACT_LIST @"Contact List"
#define KEY_CL_WINDOW_LEVEL @"Window Level"
#define KEY_CL_HIDE @"Hide While in Background"
#define KEY_CL_EDGE_SLIDE @"Hide On Screen Edges"
diff -r 699ae94cb727 -r 91299ee797cb Frameworks/Adium Framework/Source/AIListGroup.m
--- a/Frameworks/Adium Framework/Source/AIListGroup.m Wed May 06 21:56:53 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIListGroup.m Thu May 07 12:29:45 2009 -0400
@@ -314,7 +314,7 @@
{
if (!loadedExpanded) {
loadedExpanded = YES;
- expanded = [[self preferenceForKey:@"IsExpanded" group:@"Contact List"] boolValue];
+ expanded = [[self preferenceForKey:KEY_EXPANDED group:PREF_GROUP_CONTACT_LIST] boolValue];
}
return expanded;
diff -r 699ae94cb727 -r 91299ee797cb Frameworks/Adium Framework/Source/AIMetaContact.m
--- a/Frameworks/Adium Framework/Source/AIMetaContact.m Wed May 06 21:56:53 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIMetaContact.m Thu May 07 12:29:45 2009 -0400
@@ -30,8 +30,6 @@
#define OBJECT_STATUS_CACHE @"Object Status Cache"
-#define KEY_EXPANDED @"IsExpanded"
-
@interface AIListContact ()
@property (readwrite, nonatomic, assign) AIMetaContact *metaContact;
- (void)setContainingObject:(AIListGroup *)inGroup;
diff -r 699ae94cb727 -r 91299ee797cb Resources/ContactListDefaults.plist
--- a/Resources/ContactListDefaults.plist Wed May 06 21:56:53 2009 -0700
+++ b/Resources/ContactListDefaults.plist Thu May 07 12:29:45 2009 -0400
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Window Level</key>
@@ -16,5 +16,7 @@
<true/>
<key>Window Has Shadow</key>
<true/>
+ <key>IsExpanded</key>
+ <true/>
</dict>
</plist>
diff -r 699ae94cb727 -r 91299ee797cb Source/AIContactController.h
--- a/Source/AIContactController.h Wed May 06 21:56:53 2009 -0700
+++ b/Source/AIContactController.h Thu May 07 12:29:45 2009 -0400
@@ -17,18 +17,6 @@
#import <Adium/AIContactControllerProtocol.h>
#import "AIContactObserverManager.h"
-#define KEY_HIDE_CONTACTS @"Hide Contacts"
-#define KEY_SHOW_OFFLINE_CONTACTS @"Show Offline Contacts"
-#define KEY_SHOW_BLOCKED_CONTACTS @"Show Blocked Contacts"
-#define KEY_SHOW_IDLE_CONTACTS @"Show Idle Contacts"
-#define KEY_SHOW_MOBILE_CONTACTS @"Show Mobile Contacts"
-#define KEY_SHOW_AWAY_CONTACTS @"Show Away Contacts"
-#define KEY_HIDE_ACCOUNT_CONTACTS @"Hide Account Contacts"
-
-#define KEY_USE_OFFLINE_GROUP @"Use Offline Group"
-#define KEY_HIDE_CONTACT_LIST_GROUPS @"Hide Contact List Groups"
-#define PREF_GROUP_CONTACT_LIST_DISPLAY @"Contact List Display"
-
@class AISortController, AdiumAuthorization, AIContactHidingController, AIContactObserverManager;
@interface AIContactController : NSObject <AIContactController, AIListObjectObserver> {
diff -r 699ae94cb727 -r 91299ee797cb Source/AIContactController.m
--- a/Source/AIContactController.m Wed May 06 21:56:53 2009 -0700
+++ b/Source/AIContactController.m Thu May 07 12:29:45 2009 -0400
@@ -223,7 +223,7 @@
{
for (AIListGroup *listGroup in [groupDict objectEnumerator]) {
[listGroup setPreference:[NSNumber numberWithBool:[listGroup isExpanded]]
- forKey:@"IsExpanded"
+ forKey:KEY_EXPANDED
group:PREF_GROUP_CONTACT_LIST];
}
diff -r 699ae94cb727 -r 91299ee797cb Source/AIListWindowController.m
--- a/Source/AIListWindowController.m Wed May 06 21:56:53 2009 -0700
+++ b/Source/AIListWindowController.m Thu May 07 12:29:45 2009 -0400
@@ -41,8 +41,6 @@
#import "AISearchFieldCell.h"
-#define PREF_GROUP_CONTACT_LIST @"Contact List"
-
#define KEY_HIDE_CONTACT_LIST_GROUPS @"Hide Contact List Groups"
#define SLIDE_ALLOWED_RECT_EDGE_MASK (AIMinXEdgeMask | AIMaxXEdgeMask) /* Screen edges on which sliding is allowde */
diff -r 699ae94cb727 -r 91299ee797cb Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m Wed May 06 21:56:53 2009 -0700
+++ b/Source/AILogViewerWindowController.m Thu May 07 12:29:45 2009 -0400
@@ -43,7 +43,6 @@
#import <AIUtilities/AIDividedAlternatingRowOutlineView.h>
#define KEY_LOG_VIEWER_WINDOW_FRAME @"Log Viewer Frame"
-#define PREF_GROUP_CONTACT_LIST @"Contact List"
#define KEY_LOG_VIEWER_GROUP_STATE @"Log Viewer Group State" //Expand/Collapse state of groups
#define TOOLBAR_LOG_VIEWER @"Log Viewer Toolbar"
diff -r 699ae94cb727 -r 91299ee797cb Source/AISCLViewPlugin.h
--- a/Source/AISCLViewPlugin.h Wed May 06 21:56:53 2009 -0700
+++ b/Source/AISCLViewPlugin.h Thu May 07 12:29:45 2009 -0400
@@ -23,8 +23,6 @@
#define KEY_LIST_THEME_NAME @"List Theme Name"
#define KEY_LIST_DETACHABLE @"List Detachable"
-#define CONTACT_LIST_DEFAULTS @"ContactListDefaults"
-
#define DetachedContactListIsEmpty @"DetachedContactListIsEmpty"
@class AIListWindowController, AICLPreferences, AIListContact, ESContactListAdvancedPreferences;
diff -r 699ae94cb727 -r 91299ee797cb Source/AISCLViewPlugin.m
--- a/Source/AISCLViewPlugin.m Wed May 06 21:56:53 2009 -0700
+++ b/Source/AISCLViewPlugin.m Thu May 07 12:29:45 2009 -0400
@@ -123,7 +123,7 @@
object:nil];
//Now register our other defaults
- [adium.preferenceController registerDefaults:[NSDictionary dictionaryNamed:CONTACT_LIST_DEFAULTS
+ [adium.preferenceController registerDefaults:[NSDictionary dictionaryNamed:@"ContactListDefaults"
forClass:[self class]]
forGroup:PREF_GROUP_CONTACT_LIST];
diff -r 699ae94cb727 -r 91299ee797cb Source/CBContactCountingDisplayPlugin.m
--- a/Source/CBContactCountingDisplayPlugin.m Wed May 06 21:56:53 2009 -0700
+++ b/Source/CBContactCountingDisplayPlugin.m Thu May 07 12:29:45 2009 -0400
@@ -30,12 +30,10 @@
#define SHOW_COUNT_VISIBLE_CONTACTS_TITLE AILocalizedString(@"Show Group Visible Count", nil)
#define SHOW_COUNT_ALL_CONTACTS_TITLE AILocalizedString(@"Show Group Total Count", nil)
-#define PREF_GROUP_CONTACT_LIST @"Contact List"
#define KEY_COUNT_ALL_CONTACTS @"Count All Contacts"
#define KEY_COUNT_VISIBLE_CONTACTS @"Count Online Contacts" //Kept as "Online" to preserve preferences
#define KEY_HIDE_CONTACT_LIST_GROUPS @"Hide Contact List Groups"
-#define PREF_GROUP_CONTACT_LIST_DISPLAY @"Contact List Display"
/*!
* @class CBContactCountingDisplayPlugin
More information about the commits
mailing list