Source/ESStatusAdvancedPreferences.m
author Zachary West <zacw@adium.im>
Tue Jun 02 17:22:19 2009 -0400 (2009-06-02)
changeset 2450 08aa9c3a346c
parent 2295 feae24a10fb6
child 3679 f4294bb53b0f
permissions -rw-r--r--
Create a new advanced preference called "Confirmations". Move Quit Confirmations there.

Adds a new confirmation type for closing message windows with more than 1 tab open. Fixes #12006.

This new preference has two options: always confirm, only confirm when there's unread content. Displays an alert sheet when trying to close the window.
     1 //
     2 //  ESStatusAdvancedPreferences.m
     3 //  Adium
     4 //
     5 //  Created by Evan Schoenberg on 1/6/06.
     6 //
     7 
     8 #import "CBStatusMenuItemPlugin.h"
     9 #import "ESStatusAdvancedPreferences.h"
    10 #import "AIStatusController.h"
    11 #import "AIPreferenceWindowController.h"
    12 #import <AIUtilities/AIImageAdditions.h>
    13 #import <AIUtilities/AIStringAdditions.h>
    14 
    15 @implementation ESStatusAdvancedPreferences
    16 //Preference pane properties
    17 - (AIPreferenceCategory)category{
    18     return AIPref_Advanced;
    19 }
    20 - (NSString *)label{
    21     return AILocalizedString(@"Status",nil);
    22 }
    23 - (NSString *)nibName{
    24     return @"StatusPreferencesAdvanced";
    25 }
    26 - (NSImage *)image{
    27 	return [NSImage imageNamed:@"pref-status" forClass:[AIPreferenceWindowController class]];
    28 }
    29 
    30 //Configure the preference view
    31 - (void)viewDidLoad
    32 {
    33 	[label_statusWindow setLocalizedString:AILocalizedString(@"Away Status Window", nil)];
    34 	[checkBox_statusWindowHideInBackground setLocalizedString:AILocalizedString(@"Hide the status window when Adium is not active", nil)];
    35 	[checkBox_statusWindowAlwaysOnTop setLocalizedString:AILocalizedString(@"Show the status window above other windows", nil)];
    36 	
    37 	[super viewDidLoad];
    38 }
    39 
    40 
    41 @end