Automatically disable the Delete button in the Xtras Manager if no item is selected...
[adiumx.git] / Source / AIXtrasManager.h
blobab106b07796e98fc770e02bb641de8665845c915
1 /*
2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
4 *
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.
8 *
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.
16 #import <Adium/AIObject.h>
17 #import <Adium/AIPlugin.h>
18 #import "AIXtraPreviewController.h"
20 @class AIXtraInfo;
22 #define AIXtraTypeDockIcon @"adiumicon"
23 #define AIXtraTypeStatusIcons @"adiumstatusicons"
24 #define AIXtraTypeEmoticons @"adiumemoticonset"
25 #define AIXtraTypeScript @"adiumscripts"
26 #define AIXtraTypeMessageStyle @"adiummessagestyle"
27 #define AIXtraTypeListTheme @"listtheme"
28 #define AIXtraTypeListLayout @"listlayout"
29 #define AIXtraTypeServiceIcons @"adiumserviceicons"
31 @interface AIXtrasManager : AIPlugin {
32 NSMutableDictionary *disabledXtras;
33 NSMutableArray *categoryNames;
34 NSMutableArray *categories;
35 NSMutableArray *categoryImages;
36 NSMutableArray *selectedCategory;
37 IBOutlet NSWindow *window;
38 IBOutlet NSTableView *sidebar;
39 IBOutlet NSTableView *xtraList;
40 IBOutlet NSTextView *infoView;
41 IBOutlet NSScrollView *previewContainerView;
42 IBOutlet id<AIXtraPreviewController> previewController;
43 IBOutlet NSView *readmeView;
44 IBOutlet NSSegmentedControl *showInfoControl;
45 IBOutlet NSSplitView *splitView;
46 IBOutlet NSButton *deleteButton;
47 NSString *infoPath;
48 BOOL showInfo; //YES = info, NO = preview
51 + (AIXtrasManager *) sharedManager;
52 - (void) showXtras;
53 - (void) loadXtras;
54 - (IBAction) setCategory:(id)sender;
55 - (NSArray *) arrayOfXtrasAtPaths:(NSArray *)paths;
56 - (IBAction) browseXtras:(id)sender;
57 - (IBAction) deleteXtra:(id)sender;
58 - (IBAction) checkForUpdates:(id)sender;
59 - (void) updatePreview;
61 - (IBAction) setShowsInfo:(id)sender;
63 + (BOOL) createXtraBundleAtPath:(NSString *)path;
65 - (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(int)row;
66 - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row;
67 - (int)numberOfRowsInTableView:(NSTableView *)tableView;
68 @end