Added a debug log to investigate #8685, as it worksforme. Refs #8685
[adiumx.git] / Source / ESStatusPreferencesPlugin.m
blobf90a42f6b2cb7ae07f2280b7f47fba266dafbd7c
1 //
2 //  ESStatusPreferencesPlugin.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 2/26/05.
6 //  Copyright 2006 The Adium Team. All rights reserved.
7 //
9 #import "ESStatusPreferencesPlugin.h"
10 #import "ESStatusAdvancedPreferences.h"
11 #import "ESStatusPreferences.h"
12 #import <Adium/AIMenuControllerProtocol.h>
13 #import "AIStatusController.h"
14 #import <AIUtilities/AIMenuAdditions.h>
15 #import <AIUtilities/AIDictionaryAdditions.h>
16 #import <AIUtilities/AIStringAdditions.h>
18 #define STATUS_DEFAULT_PREFS @"StatusDefaults"
20 /*!
21  * @class ESStatusPreferencesPlugin
22  * @brief Component to install our status preferences pane
23  */
24 @implementation ESStatusPreferencesPlugin
26 /*!
27  * @brief Install
28  *
29  * Install our preference pane, and add a menu item to the Status menu which opens it.
30  */
31 - (void)installPlugin
33         NSMenuItem *menuItem;
34         
35         //Install our preference view
36     preferences = [[ESStatusPreferences preferencePaneForPlugin:self] retain];
37         advancedPreferences = [[ESStatusAdvancedPreferences preferencePaneForPlugin:self] retain];
39         //Add our menu item
40         menuItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[AILocalizedString(@"Edit Status Menu",nil) stringByAppendingEllipsis]
41                                                                                                                                         target:self
42                                                                                                                                         action:@selector(showStatusPreferences:)
43                                                                                                                          keyEquivalent:@""];
44         [[adium menuController] addMenuItem:menuItem toLocation:LOC_Status_Additions];
45         
46         //Register defaults
47     [[adium preferenceController] registerDefaults:[NSDictionary dictionaryNamed:STATUS_DEFAULT_PREFS 
48                                                                                                                                                 forClass:[self class]] 
49                                                                                   forGroup:PREF_GROUP_STATUS_PREFERENCES];      
50         
53 /*!
54  * Open the preferences to the status pane
55  */
56 - (void)showStatusPreferences:(id)sender
58         [[adium preferenceController] openPreferencesToCategoryWithIdentifier:@"Status"];
61 @end