2 // ESStatusAdvancedPreferences.m
5 // Created by Evan Schoenberg on 1/6/06.
8 #import "ESStatusAdvancedPreferences.h"
9 #import "AIStatusController.h"
10 #import <Adium/AIPreferenceControllerProtocol.h>
11 #import "AIPreferenceWindowController.h"
12 #import <AIUtilities/AIImageAdditions.h>
14 @implementation ESStatusAdvancedPreferences
15 //Preference pane properties
16 - (AIPreferenceCategory)category{
17 return AIPref_Advanced;
20 return AILocalizedString(@"Status",nil);
22 - (NSString *)nibName{
23 return @"StatusPreferencesAdvanced";
26 return [NSImage imageNamed:@"pref-status" forClass:[AIPreferenceWindowController class]];
29 //Called in response to all preference controls, applies new settings
30 - (IBAction)changePreference:(id)sender
32 if (sender == checkBox_statusWindowHideInBackground) {
33 [[adium preferenceController] setPreference:[NSNumber numberWithBool:[sender state]]
34 forKey:KEY_STATUS_STATUS_WINDOW_HIDE_IN_BACKGROUND
35 group:PREF_GROUP_STATUS_PREFERENCES];
37 } else if (sender == checkBox_statusWindowAlwaysOnTop) {
38 [[adium preferenceController] setPreference:[NSNumber numberWithBool:[sender state]]
39 forKey:KEY_STATUS_STATUS_WINDOW_ON_TOP
40 group:PREF_GROUP_STATUS_PREFERENCES];
44 //Configure the preference view
47 NSDictionary *prefDict;
49 prefDict = [[adium preferenceController] preferencesForGroup:PREF_GROUP_STATUS_PREFERENCES];
50 [checkBox_statusWindowHideInBackground setState:[[prefDict objectForKey:KEY_STATUS_STATUS_WINDOW_HIDE_IN_BACKGROUND] boolValue]];
51 [checkBox_statusWindowAlwaysOnTop setState:[[prefDict objectForKey:KEY_STATUS_STATUS_WINDOW_ON_TOP] boolValue]];
53 [label_statusWindow setLocalizedString:AILocalizedString(@"Away Status Window", nil)];
54 [checkBox_statusWindowHideInBackground setLocalizedString:AILocalizedString(@"Hide the status window when Adium is not active", nil)];
55 [checkBox_statusWindowAlwaysOnTop setLocalizedString:AILocalizedString(@"Show the status window above other windows", nil)];