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 "ESAnnouncerSpeakTextAlertDetailPane.h"
18 #import "ESAnnouncerPlugin.h"
19 #import <Adium/AILocalizationTextField.h>
22 * @class ESAnnouncerSpeakTextAlertDetailPane
23 * @brief Speak Text details pane
25 @implementation ESAnnouncerSpeakTextAlertDetailPane
30 - (NSString *)nibName{
31 return(@"AnnouncerSpeakTextContactAlert");
41 [textView_textToSpeakLabel setLocalizedString:AILocalizedString(@"Text To Speak:",nil)];
42 [box_substitutions setTitle:AILocalizedString(@"Substitutions:",nil)];
43 [textView_substitutions setStringValue:AILocalizedString(@"\%n - User name\n\%a - User alias\n\%m - Message\n\%t - Time",nil)];
47 * @brief Configure for the action
49 - (void)configureForActionDetails:(NSDictionary *)inDetails listObject:(AIListObject *)inObject
51 NSString *textToSpeak = [inDetails objectForKey:KEY_ANNOUNCER_TEXT_TO_SPEAK];
52 [textView_textToSpeak setString:(textToSpeak ? textToSpeak : @"")];
54 [super configureForActionDetails:inDetails listObject:inObject];
58 * @brief Return our current configuration
60 - (NSDictionary *)actionDetails
62 NSString *textToSpeak;
63 NSMutableDictionary *actionDetails = [NSMutableDictionary dictionary];
65 textToSpeak = [[[textView_textToSpeak string] copy] autorelease];
68 [actionDetails setObject:textToSpeak
69 forKey:KEY_ANNOUNCER_TEXT_TO_SPEAK];
72 return([self actionDetailsFromDict:actionDetails]);
76 * @brief Key on which to store our defaults
78 - (NSString *)defaultDetailsKey
80 return @"DefaultSpeakTextDetails";