2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 * Public License for more details.
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 #import "CBGrowlAlertDetailPane.h"
18 #import "NEHGrowlPlugin.h"
21 * @class CBGrowlAlertDetailPane
22 * @brief Provide and manage custom controls for configuring the Growl contact alert
24 * The only control currently provided is the ability to make a Growl notification sticky (i.e. does not disappear until
25 * the user dismisses it).
27 @implementation CBGrowlAlertDetailPane
30 * @brief Returns the name of our pane
32 * Since this is a detail pain, we return @"".
40 * @brief Returns the name of the Nib to load
44 return(@"GrowlAlert");
48 * @brief Configure the detail view, and set up our localized controls
54 [checkBox_sticky setLocalizedString:AILocalizedString(@"Sticky","Growl contact alert label")];
58 * @brief Load the state of our controls
60 - (void)configureForActionDetails:(NSDictionary *)inDetails listObject:(AIListObject *)inObject
62 [checkBox_sticky setState:([[inDetails objectForKey:KEY_GROWL_ALERT_STICKY] boolValue] ? NSOnState : NSOffState)];
66 * @brief Return the state of our controls
68 - (NSDictionary *)actionDetails
70 return([NSDictionary dictionaryWithObject:[NSNumber numberWithBool:([checkBox_sticky state] == NSOnState)]
71 forKey:KEY_GROWL_ALERT_STICKY]);
75 * @brief Called when any of our controls change
77 - (IBAction)changePreference:(id)sender
79 [self detailsForHeaderChanged];