adium 2295:feae24a10fb6: Move the Status Menu Item and Dock Cont...
commits at adium.im
commits at adium.im
Sun May 24 04:16:36 UTC 2009
details: http://hg.adium.im/adium/rev/feae24a10fb6
revision: 2295:feae24a10fb6
author: Zachary West <zacw at adium.im>
date: Sun May 24 00:16:25 2009 -0400
Move the Status Menu Item and Dock Controller options from "Status" to "Message Alerts" advanced preference pane.
This also renames the "count unread mention" preference to "Only count number of highlights and mentions for group chats". Fixes #12080.
diffstat:
Adium.xcodeproj/project.pbxproj | 10 +
Resources/AIMessageAlertsAdvancedPreferences.nib/classes.nib | 219 +++++++++
Resources/AIMessageAlertsAdvancedPreferences.nib/info.nib | 20 +
Resources/AIMessageAlertsAdvancedPreferences.nib/keyedobjects.nib |
Resources/StatusPreferencesAdvanced.nib/classes.nib | 14 -
Resources/StatusPreferencesAdvanced.nib/keyedobjects.nib |
Source/AIAdvancedPreferencesPlugin.h | 3 +-
Source/AIAdvancedPreferencesPlugin.m | 4 +
Source/AIMessageAlertsAdvancedPreferences.h | 28 +
Source/AIMessageAlertsAdvancedPreferences.m | 94 ++++
Source/ESStatusAdvancedPreferences.h | 11 +-
Source/ESStatusAdvancedPreferences.m | 23 +-
12 files changed, 380 insertions(+), 46 deletions(-)
diffs (568 lines):
diff -r af82f4f86cc5 -r feae24a10fb6 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj Sat May 23 23:33:08 2009 -0400
+++ b/Adium.xcodeproj/project.pbxproj Sun May 24 00:16:25 2009 -0400
@@ -143,6 +143,8 @@
11879DF80F6FFC0B00CACFB1 /* OAuthConsumer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11879DF70F6FFC0B00CACFB1 /* OAuthConsumer.framework */; };
11879E0A0F6FFC1000CACFB1 /* OAuthConsumer.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 11879DF70F6FFC0B00CACFB1 /* OAuthConsumer.framework */; };
11945F400F7935A2002A54B3 /* Ignore.png in Resources */ = {isa = PBXBuildFile; fileRef = 11945F3F0F7935A2002A54B3 /* Ignore.png */; };
+ 11A2F10A0FC8FC1A00C3F05C /* AIMessageAlertsAdvancedPreferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = 11A2F1090FC8FC1A00C3F05C /* AIMessageAlertsAdvancedPreferences.nib */; };
+ 11A2F1220FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 11A2F1210FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.m */; };
11AA1EFA0BCAE9C3003DDA66 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11AA1EF90BCAE9C3003DDA66 /* Quartz.framework */; };
11AE53610F68CE3300BE8077 /* AIPurpleOscarAccountViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 11AE52000F68CA5000BE8077 /* AIPurpleOscarAccountViewController.h */; };
11AE53620F68CE3300BE8077 /* AIPurpleOscarAccountViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 11AE52010F68CA5000BE8077 /* AIPurpleOscarAccountViewController.m */; };
@@ -1873,6 +1875,9 @@
11879C0A0F6FF4C400CACFB1 /* AITwitterAccountOAuthSetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AITwitterAccountOAuthSetup.m; path = "Plugins/Twitter Plugin/AITwitterAccountOAuthSetup.m"; sourceTree = "<group>"; };
11879DF70F6FFC0B00CACFB1 /* OAuthConsumer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OAuthConsumer.framework; path = Frameworks/OAuthConsumer.framework; sourceTree = "<group>"; };
11945F3F0F7935A2002A54B3 /* Ignore.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Ignore.png; path = "Frameworks/Adium Framework/Resources/Ignore.png"; sourceTree = "<group>"; };
+ 11A2F1090FC8FC1A00C3F05C /* AIMessageAlertsAdvancedPreferences.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = AIMessageAlertsAdvancedPreferences.nib; path = Resources/AIMessageAlertsAdvancedPreferences.nib; sourceTree = "<group>"; };
+ 11A2F1200FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIMessageAlertsAdvancedPreferences.h; path = Source/AIMessageAlertsAdvancedPreferences.h; sourceTree = "<group>"; };
+ 11A2F1210FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIMessageAlertsAdvancedPreferences.m; path = Source/AIMessageAlertsAdvancedPreferences.m; sourceTree = "<group>"; };
11AA1EF90BCAE9C3003DDA66 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = /System/Library/Frameworks/Quartz.framework; sourceTree = "<absolute>"; };
11AE52000F68CA5000BE8077 /* AIPurpleOscarAccountViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIPurpleOscarAccountViewController.h; path = "Plugins/Purple Service/AIPurpleOscarAccountViewController.h"; sourceTree = "<group>"; };
11AE52010F68CA5000BE8077 /* AIPurpleOscarAccountViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIPurpleOscarAccountViewController.m; path = "Plugins/Purple Service/AIPurpleOscarAccountViewController.m"; sourceTree = "<group>"; };
@@ -4989,6 +4994,7 @@
29B97323FDCFA39411CA2CEA /* Linked Frameworks */,
63C7E0280FAF9B7D00B310AC /* xcconfigs */,
19C28FACFE9D520D11CA2CBB /* Products */,
+ 11A2F1090FC8FC1A00C3F05C /* AIMessageAlertsAdvancedPreferences.nib */,
);
name = CocAIMe2;
sourceTree = "<group>";
@@ -5124,6 +5130,8 @@
3428328307D263F0004F01C9 /* Status Preferences */ = {
isa = PBXGroup;
children = (
+ 11A2F1200FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.h */,
+ 11A2F1210FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.m */,
3428328407D2643E004F01C9 /* ESStatusPreferencesPlugin.h */,
3428328707D2643F004F01C9 /* ESStatusPreferencesPlugin.m */,
3428328607D2643F004F01C9 /* ESStatusPreferences.h */,
@@ -9755,6 +9763,7 @@
1111B2300F8478500068CE51 /* Filter Bar.nib in Resources */,
113900B10F85BEF60081A418 /* AIURLHandlerPreferences.nib in Resources */,
11D135D90FBE4C65000B0A5E /* AITwitterAccountView.nib in Resources */,
+ 11A2F10A0FC8FC1A00C3F05C /* AIMessageAlertsAdvancedPreferences.nib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -10408,6 +10417,7 @@
11E786810F8860210014612E /* AIJumpControlPlugin.m in Sources */,
1121B29A0F896A720047EC66 /* AIContactVisibilityControlPlugin.m in Sources */,
112E7FA60FC86BB400657119 /* AITwitterActionsHTMLFilter.m in Sources */,
+ 11A2F1220FC8FC9D00C3F05C /* AIMessageAlertsAdvancedPreferences.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff -r af82f4f86cc5 -r feae24a10fb6 Resources/AIMessageAlertsAdvancedPreferences.nib/classes.nib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/AIMessageAlertsAdvancedPreferences.nib/classes.nib Sun May 24 00:16:25 2009 -0400
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBClasses</key>
+ <array>
+ <dict>
+ <key>CLASS</key>
+ <string>NSApplication</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>RBSplitView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>delegate</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>RBSplitSubview</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSTextField</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSControl</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>AIAdvancedPreferencePane</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>AIModularPane</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>RBSplitSubview</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSView</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSMenu</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>adiumPrint</key>
+ <string>id</string>
+ <key>didAdjustSubviews</key>
+ <string>RBSplitView</string>
+ <key>prefsWindowWillClose</key>
+ <string>SS_PrefsController</string>
+ <key>toggleFindPanel</key>
+ <string>id</string>
+ <key>willAdjustSubviews</key>
+ <string>RBSplitView</string>
+ </dict>
+ <key>CLASS</key>
+ <string>NSObject</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>AILocalizationButton</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>view_anchorToLeftSide</key>
+ <string>NSView</string>
+ <key>view_anchorToRightSide</key>
+ <string>NSView</string>
+ <key>window_anchorOnLeftSide</key>
+ <string>NSWindow</string>
+ <key>window_anchorOnRightSide</key>
+ <string>NSWindow</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSButton</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSWindow</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSCell</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>changePreference</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>AIModularPane</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>plugin</key>
+ <string>id</string>
+ <key>view</key>
+ <string>NSView</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSButton</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSControl</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>AILocalizationTextField</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>view_anchorToLeftSide</key>
+ <string>NSView</string>
+ <key>view_anchorToRightSide</key>
+ <string>NSView</string>
+ <key>window_anchorOnLeftSide</key>
+ <string>NSWindow</string>
+ <key>window_anchorOnRightSide</key>
+ <string>NSWindow</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSTextField</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSButtonCell</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSActionCell</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>SS_PrefsController</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>delegate</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>AIMessageAlertsAdvancedPreferences</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>checkBox_statusMenuItemBadge</key>
+ <string>NSButton</string>
+ <key>checkBox_statusMenuItemCount</key>
+ <string>NSButton</string>
+ <key>checkBox_statusMenuItemFlash</key>
+ <string>NSButton</string>
+ <key>checkBox_unreadContentMention</key>
+ <string>NSButton</string>
+ <key>checkBox_unreadConversations</key>
+ <string>NSButton</string>
+ <key>label_dockMenuBarIconCounts</key>
+ <string>NSTextField</string>
+ <key>label_statusMenuItem</key>
+ <string>NSTextField</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>AIAdvancedPreferencePane</string>
+ </dict>
+ </array>
+ <key>IBVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff -r af82f4f86cc5 -r feae24a10fb6 Resources/AIMessageAlertsAdvancedPreferences.nib/info.nib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/AIMessageAlertsAdvancedPreferences.nib/info.nib Sun May 24 00:16:25 2009 -0400
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBFramework Version</key>
+ <string>677</string>
+ <key>IBLastKnownRelativeProjectPath</key>
+ <string>../Adium.xcodeproj</string>
+ <key>IBOldestOS</key>
+ <integer>5</integer>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>1</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>9J61</string>
+ <key>targetFramework</key>
+ <string>IBCocoaFramework</string>
+</dict>
+</plist>
diff -r af82f4f86cc5 -r feae24a10fb6 Resources/AIMessageAlertsAdvancedPreferences.nib/keyedobjects.nib
Binary file Resources/AIMessageAlertsAdvancedPreferences.nib/keyedobjects.nib has changed
diff -r af82f4f86cc5 -r feae24a10fb6 Resources/StatusPreferencesAdvanced.nib/classes.nib
--- a/Resources/StatusPreferencesAdvanced.nib/classes.nib Sat May 23 23:33:08 2009 -0400
+++ b/Resources/StatusPreferencesAdvanced.nib/classes.nib Sun May 24 00:16:25 2009 -0400
@@ -170,26 +170,12 @@
<string>NSButton</string>
<key>checkBox_quitConfirmUnread</key>
<string>NSButton</string>
- <key>checkBox_statusMenuItemBadge</key>
- <string>NSButton</string>
- <key>checkBox_statusMenuItemCount</key>
- <string>NSButton</string>
- <key>checkBox_statusMenuItemFlash</key>
- <string>NSButton</string>
<key>checkBox_statusWindowAlwaysOnTop</key>
<string>NSButton</string>
<key>checkBox_statusWindowHideInBackground</key>
<string>NSButton</string>
- <key>checkBox_unreadContentMention</key>
- <string>NSButton</string>
- <key>checkBox_unreadConversations</key>
- <string>NSButton</string>
- <key>label_dockMenuBarIconCounts</key>
- <string>NSTextField</string>
<key>label_quitConfirmation</key>
<string>NSTextField</string>
- <key>label_statusMenuItem</key>
- <string>NSTextField</string>
<key>label_statusWindow</key>
<string>NSTextField</string>
<key>matrix_quitConfirmation</key>
diff -r af82f4f86cc5 -r feae24a10fb6 Resources/StatusPreferencesAdvanced.nib/keyedobjects.nib
Binary file Resources/StatusPreferencesAdvanced.nib/keyedobjects.nib has changed
diff -r af82f4f86cc5 -r feae24a10fb6 Source/AIAdvancedPreferencesPlugin.h
--- a/Source/AIAdvancedPreferencesPlugin.h Sat May 23 23:33:08 2009 -0400
+++ b/Source/AIAdvancedPreferencesPlugin.h Sun May 24 00:16:25 2009 -0400
@@ -5,9 +5,10 @@
// Created by Evan Schoenberg on 4/7/07.
//
+ at class AIMessageAlertsAdvancedPreferences;
@interface AIAdvancedPreferencesPlugin : AIPlugin {
-
+ AIMessageAlertsAdvancedPreferences *messageAlertsPreferences;
}
@end
diff -r af82f4f86cc5 -r feae24a10fb6 Source/AIAdvancedPreferencesPlugin.m
--- a/Source/AIAdvancedPreferencesPlugin.m Sat May 23 23:33:08 2009 -0400
+++ b/Source/AIAdvancedPreferencesPlugin.m Sun May 24 00:16:25 2009 -0400
@@ -7,12 +7,16 @@
#import "AIAdvancedPreferencesPlugin.h"
#import "AIAdvancedPreferences.h"
+#import "AIMessageAlertsAdvancedPreferences.h"
@implementation AIAdvancedPreferencesPlugin
- (void)installPlugin
{
[AIAdvancedPreferences preferencePane];
+
+ // Generic advanced panes with no specific plugins.
+ messageAlertsPreferences = [[AIMessageAlertsAdvancedPreferences preferencePane] retain];
}
@end
diff -r af82f4f86cc5 -r feae24a10fb6 Source/AIMessageAlertsAdvancedPreferences.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Source/AIMessageAlertsAdvancedPreferences.h Sun May 24 00:16:25 2009 -0400
@@ -0,0 +1,28 @@
+//
+// AIMessageAlertsAdvancedPreferences.h
+// Adium
+//
+// Created by Zachary West on 2009-05-23.
+// Copyright 2009 Adium. All rights reserved.
+//
+
+#import <Adium/AIAdvancedPreferencePane.h>
+
+#define PREF_GROUP_STATUS_MENU_ITEM @"Status Menu Item"
+#define KEY_STATUS_MENU_ITEM_ENABLED @"Status Menu Item Enabled"
+#define KEY_STATUS_MENU_ITEM_COUNT @"Status Menu Item Unread Count"
+#define KEY_STATUS_MENU_ITEM_BADGE @"Status Menu Item Badge"
+#define KEY_STATUS_MENU_ITEM_FLASH @"Status Menu Item Flash Unviewed"
+
+ at interface AIMessageAlertsAdvancedPreferences : AIAdvancedPreferencePane {
+ IBOutlet NSTextField *label_dockMenuBarIconCounts;
+ IBOutlet NSButton *checkBox_unreadConversations;
+ IBOutlet NSButton *checkBox_unreadContentMention;
+
+ IBOutlet NSTextField *label_statusMenuItem;
+ IBOutlet NSButton *checkBox_statusMenuItemBadge;
+ IBOutlet NSButton *checkBox_statusMenuItemFlash;
+ IBOutlet NSButton *checkBox_statusMenuItemCount;
+}
+
+ at end
diff -r af82f4f86cc5 -r feae24a10fb6 Source/AIMessageAlertsAdvancedPreferences.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Source/AIMessageAlertsAdvancedPreferences.m Sun May 24 00:16:25 2009 -0400
@@ -0,0 +1,94 @@
+//
+// AIMessageAlertsAdvancedPreferences.m
+// Adium
+//
+// Created by Zachary West on 2009-05-23.
+// Copyright 2009 Adium. All rights reserved.
+//
+
+#import "AIMessageAlertsAdvancedPreferences.h"
+#import "AIStatusController.h"
+#import <AIUtilities/AIImageAdditions.h>
+
+
+ at implementation AIMessageAlertsAdvancedPreferences
+#pragma mark Preference Pane
+- (AIPreferenceCategory)category{
+ return AIPref_Advanced;
+}
+- (NSString *)label{
+ return AILocalizedString(@"Message Alerts",nil);
+}
+- (NSString *)nibName{
+ return @"AIMessageAlertsAdvancedPreferences";
+}
+- (NSImage *)image{
+ return [NSImage imageNamed:@"pref-status" forClass:[self class]];
+}
+
+#pragma mark Preference toggling
+
+- (IBAction)changePreference:(id)sender
+{
+ if (sender == checkBox_unreadConversations) {
+ [adium.preferenceController setPreference:[NSNumber numberWithInteger:[sender state]]
+ forKey:KEY_STATUS_CONVERSATION_COUNT
+ group:PREF_GROUP_STATUS_PREFERENCES];
+ }
+
+ if (sender == checkBox_unreadContentMention) {
+ [adium.preferenceController setPreference:[NSNumber numberWithInteger:[sender state]]
+ forKey:KEY_STATUS_MENTION_COUNT
+ group:PREF_GROUP_STATUS_PREFERENCES];
+ }
+
+ if (sender == checkBox_statusMenuItemBadge) {
+ [adium.preferenceController setPreference:[NSNumber numberWithInteger:[sender state]]
+ forKey:KEY_STATUS_MENU_ITEM_BADGE
+ group:PREF_GROUP_STATUS_MENU_ITEM];
+ }
+
+ if (sender == checkBox_statusMenuItemFlash) {
+ [adium.preferenceController setPreference:[NSNumber numberWithInteger:[sender state]]
+ forKey:KEY_STATUS_MENU_ITEM_FLASH
+ group:PREF_GROUP_STATUS_MENU_ITEM];
+ }
+
+ if (sender == checkBox_statusMenuItemCount) {
+ [adium.preferenceController setPreference:[NSNumber numberWithInteger:[sender state]]
+ forKey:KEY_STATUS_MENU_ITEM_COUNT
+ group:PREF_GROUP_STATUS_MENU_ITEM];
+ }
+}
+
+#pragma mark Display
+
+//Configure the preference view
+- (void)viewDidLoad
+{
+ [label_dockMenuBarIconCounts setLocalizedString:AILocalizedString(@"Dock Icon and Status Menu Item Counts", nil)];
+ [checkBox_unreadConversations setLocalizedString:AILocalizedString(@"Count unread conversations instead of unread messages", nil)];
+ [checkBox_unreadContentMention setLocalizedString:AILocalizedString(@"Only count number of highlights and mentions for group chats", nil)];
+
+ NSDictionary *statusPreferences = [adium.preferenceController preferencesForGroup:PREF_GROUP_STATUS_PREFERENCES];
+
+ [checkBox_unreadConversations setState:[[statusPreferences objectForKey:KEY_STATUS_CONVERSATION_COUNT] boolValue]];
+ [checkBox_unreadContentMention setState:[[statusPreferences objectForKey:KEY_STATUS_MENTION_COUNT] boolValue]];
+
+ [label_statusMenuItem setLocalizedString:AILocalizedString(@"Status Menu Item", nil)];
+ [checkBox_statusMenuItemBadge setLocalizedString:AILocalizedString(@"Badge the menu item with current status", nil)];
+ [checkBox_statusMenuItemFlash setLocalizedString:AILocalizedString(@"Flash when there are unread messages", nil)];
+ [checkBox_statusMenuItemCount setLocalizedString:AILocalizedString(@"Show unread message count in the menu bar", nil)];
+
+ NSDictionary *menuItemPreferences = [adium.preferenceController preferencesForGroup:PREF_GROUP_STATUS_MENU_ITEM];
+
+ [checkBox_statusMenuItemBadge setState:[[menuItemPreferences objectForKey:KEY_STATUS_MENU_ITEM_BADGE] boolValue]];
+ [checkBox_statusMenuItemFlash setState:[[menuItemPreferences objectForKey:KEY_STATUS_MENU_ITEM_FLASH] boolValue]];
+ [checkBox_statusMenuItemCount setState:[[menuItemPreferences objectForKey:KEY_STATUS_MENU_ITEM_COUNT] boolValue]];
+
+ [self configureControlDimming];
+ [super viewDidLoad];
+}
+
+
+ at end
diff -r af82f4f86cc5 -r feae24a10fb6 Source/ESStatusAdvancedPreferences.h
--- a/Source/ESStatusAdvancedPreferences.h Sat May 23 23:33:08 2009 -0400
+++ b/Source/ESStatusAdvancedPreferences.h Sun May 24 00:16:25 2009 -0400
@@ -7,20 +7,11 @@
#import <Adium/AIAdvancedPreferencePane.h>
- at interface ESStatusAdvancedPreferences : AIAdvancedPreferencePane {
- IBOutlet NSTextField *label_dockMenuBarIconCounts;
- IBOutlet NSButton *checkBox_unreadConversations;
- IBOutlet NSButton *checkBox_unreadContentMention;
-
+ at interface ESStatusAdvancedPreferences : AIAdvancedPreferencePane {
IBOutlet NSTextField *label_statusWindow;
IBOutlet NSButton *checkBox_statusWindowHideInBackground;
IBOutlet NSButton *checkBox_statusWindowAlwaysOnTop;
- IBOutlet NSTextField *label_statusMenuItem;
- IBOutlet NSButton *checkBox_statusMenuItemBadge;
- IBOutlet NSButton *checkBox_statusMenuItemFlash;
- IBOutlet NSButton *checkBox_statusMenuItemCount;
-
IBOutlet NSTextField *label_quitConfirmation;
IBOutlet NSButton *checkBox_quitConfirmEnabled;
diff -r af82f4f86cc5 -r feae24a10fb6 Source/ESStatusAdvancedPreferences.m
--- a/Source/ESStatusAdvancedPreferences.m Sat May 23 23:33:08 2009 -0400
+++ b/Source/ESStatusAdvancedPreferences.m Sun May 24 00:16:25 2009 -0400
@@ -33,13 +33,6 @@
if (sender == matrix_quitConfirmation || sender == checkBox_quitConfirmEnabled) {
[self configureControlDimming];
}
-
- if (sender == checkBox_unreadContentMention) {
- // "key paths cannot contain spaces" yeah, wonderful. The only element in this entire preference that needs a toggle now.
- [adium.preferenceController setPreference:[NSNumber numberWithInteger:[sender state]]
- forKey:KEY_STATUS_MENTION_COUNT
- group:PREF_GROUP_STATUS_PREFERENCES];
- }
}
- (void)configureControlDimming
@@ -55,22 +48,10 @@
//Configure the preference view
- (void)viewDidLoad
-{
- [label_dockMenuBarIconCounts setLocalizedString:AILocalizedString(@"Dock Icon and Status Menu Item Counts", nil)];
- [checkBox_unreadConversations setLocalizedString:AILocalizedString(@"Count unread conversations instead of unread messages", nil)];
- [checkBox_unreadContentMention setLocalizedString:AILocalizedString(@"Only count number of unread mentions for group chats", nil)];
-
- [checkBox_unreadContentMention setState:[[adium.preferenceController preferenceForKey:KEY_STATUS_MENTION_COUNT group:PREF_GROUP_STATUS_PREFERENCES] boolValue]];
-
- [label_statusWindow setLocalizedString:AILocalizedString(@"Away Status Window", nil)];
+{ [label_statusWindow setLocalizedString:AILocalizedString(@"Away Status Window", nil)];
[checkBox_statusWindowHideInBackground setLocalizedString:AILocalizedString(@"Hide the status window when Adium is not active", nil)];
[checkBox_statusWindowAlwaysOnTop setLocalizedString:AILocalizedString(@"Show the status window above other windows", nil)];
-
- [label_statusMenuItem setLocalizedString:AILocalizedString(@"Status Menu Item", nil)];
- [checkBox_statusMenuItemBadge setLocalizedString:AILocalizedString(@"Badge the menu item with current status", nil)];
- [checkBox_statusMenuItemFlash setLocalizedString:AILocalizedString(@"Flash when there are unread messages", nil)];
- [checkBox_statusMenuItemCount setLocalizedString:AILocalizedString(@"Show unread message count in the menu bar", nil)];
-
+
[label_quitConfirmation setLocalizedString:AILocalizedString(@"Quit Confirmation", @"Preference")];
[checkBox_quitConfirmEnabled setLocalizedString:AILocalizedString(@"Confirm before quitting Adium", @"Quit Confirmation preference")];
[checkBox_quitConfirmFT setLocalizedString:AILocalizedString(@"File transfers are in progress", @"Quit Confirmation preference")];
More information about the commits
mailing list