pt_BR strings updates
[adiumx.git] / Source / ESStatusAdvancedPreferences.m
blob67a1b583752f8ed230595ad3c6bd7a5850972c1f
1 //
2 //  ESStatusAdvancedPreferences.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 1/6/06.
6 //
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;
19 - (NSString *)label{
20     return AILocalizedString(@"Status",nil);
22 - (NSString *)nibName{
23     return @"StatusPreferencesAdvanced";
25 - (NSImage *)image{
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];         
36                 
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];
41         }
44 //Configure the preference view
45 - (void)viewDidLoad
47     NSDictionary        *prefDict;
48         
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]];
52         
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)];
56         
57         [super viewDidLoad];
61 @end