libpurple.framework 2.3.1 as before but with HAVE_OPENSSL defined, which enables...
[adiumx.git] / Source / ESContactListAdvancedPreferences.m
blob4cc6ec9473f0b9c6c810669268239a8da3a55c9f
1 //
2 //  ESContactListAdvancedPreferences.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 2/20/05.
6 //  Copyright 2006 The Adium Team. All rights reserved.
7 //
9 #import "ESContactListAdvancedPreferences.h"
10 #import "AISCLViewPlugin.h"
11 #import "AIPreferenceWindowController.h"
12 #import "AIListWindowController.h"
13 #import <Adium/AIInterfaceControllerProtocol.h>
14 #import <Adium/AIPreferenceControllerProtocol.h>
15 #import <AIUtilities/AIDictionaryAdditions.h>
16 #import <AIUtilities/AIImageAdditions.h>
18 @interface ESContactListAdvancedPreferences (PRIVATE)
19 - (NSMenu *)windowPositionMenu;
20 - (void)configureControlDimming;
21 @end
23 /*!
24  * @class ESContactListAdvancedPreferences
25  * @brief Advanced contact list preferences
26  */
27 @implementation ESContactListAdvancedPreferences
28 /*!
29  * @brief Label
30  */
31 - (NSString *)label{
32     return AILocalizedString(@"Contact List","Name of the window which lists contacts");
35 /*!
36  * @brief Nib name
37  */
38 - (NSString *)nibName{
39     return @"ContactListAdvancedPrefs";
42 /*!
43  * @brief Image
44  */
45 - (NSImage *)image{
46         return [NSImage imageNamed:@"pref-contactList" forClass:[AIPreferenceWindowController class]];
49 /*!
50  * @brief View loaded; configure it for display
51  */
52 - (void)viewDidLoad
54         int     menuIndex;
56         [popUp_windowPosition setMenu:[[adium interfaceController] menuForWindowLevelsNotifyingTarget:self]];
57         menuIndex =  [popUp_windowPosition indexOfItemWithTag:[[[adium preferenceController] preferenceForKey:KEY_CL_WINDOW_LEVEL
58                                                                                                                                                                                                          group:PREF_GROUP_CONTACT_LIST] intValue]];
59         if (menuIndex >= 0 && menuIndex < [popUp_windowPosition numberOfItems]) {
60                 [popUp_windowPosition selectItemAtIndex:menuIndex];
61         }
63 #define WHILE_ADIUM_IS_IN_BACKGROUND    AILocalizedString(@"While Adium is in the background","Checkbox to indicate that something should occur while Adium is not the active application")
65         [[matrix_hiding cellWithTag:AIContactListWindowHidingStyleNone] setTitle:AILocalizedString(@"Never", nil)];
66         [[matrix_hiding cellWithTag:AIContactListWindowHidingStyleBackground] setTitle:WHILE_ADIUM_IS_IN_BACKGROUND];
67         [[matrix_hiding cellWithTag:AIContactListWindowHidingStyleSliding] setTitle:AILocalizedString(@"On screen edges", "Advanced contact list: hide the contact list: On screen edges")];
68         [checkBox_hideOnScreenEdgesOnlyInBackground setLocalizedString:AILocalizedString(@"...only while Adium is in the background", "Checkbox under 'on screen edges' in the advanced contact list preferences")];
69                 
70         [checkBox_flash setLocalizedString:AILocalizedString(@"Flash names with unviewed messages",nil)];
71         [checkBox_animateChanges setLocalizedString:AILocalizedString(@"Animate changes","This string is under the heading 'Contact List' and refers to changes such as sort order in the contact list being animated rather than occurring instantenously")];
72         [checkBox_showTooltips setLocalizedString:AILocalizedString(@"Show contact information tooltips",nil)];
73         [checkBox_showTooltipsInBackground setLocalizedString:WHILE_ADIUM_IS_IN_BACKGROUND];
74         [checkBox_windowHasShadow setLocalizedString:AILocalizedString(@"Show window shadow",nil)];
75         [checkBox_windowHasShadow setToolTip:@"Stay close to the Vorlon."];
76         [checkBox_showOnAllSpaces setLocalizedString:AILocalizedString(@"Show on all spaces", nil)];
78         [label_appearance setLocalizedString:AILocalizedString(@"Appearance",nil)];
79         [label_tooltips setLocalizedString:AILocalizedString(@"Tooltips",nil)];
80         [label_windowHandling setLocalizedString:AILocalizedString(@"Window Handling",nil)];
81         [label_hide setLocalizedString:AILocalizedString(@"Automatically hide the contact list:",nil)];
82         [label_orderTheContactList setLocalizedString:AILocalizedString(@"Show the contact list:",nil)];
83         
84         [self configureControlDimming];
87 /*!
88  * @brief Called in response to all preference controls, applies new settings
89  */
90 - (IBAction)changePreference:(id)sender
92         if (sender == matrix_hiding) {
93                 [self configureControlDimming];
94         }
97 - (BOOL)hideOnScreenEdgesOnlyInBackgroundEnabled
99         return [[matrix_hiding selectedCell] tag] == AIContactListWindowHidingStyleSliding;
102 - (void)configureControlDimming
104         [checkBox_hideOnScreenEdgesOnlyInBackground setEnabled:[self hideOnScreenEdgesOnlyInBackgroundEnabled]];
107 - (void)selectedWindowLevel:(id)sender
109         [[adium preferenceController] setPreference:[NSNumber numberWithInt:[sender tag]]
110                                                                                  forKey:KEY_CL_WINDOW_LEVEL
111                                                                                   group:PREF_GROUP_CONTACT_LIST];
114 @end