Put NSAutoreleasePool usage around other distributed notification observer methods
[adiumx.git] / Source / GBImportPlugin.m
blob3bcec32c7f440be48ea500da155daa6f3ad8b46b
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.
12  * 
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.
15  */
17 #import "GBImportPlugin.h"
18 #import <Adium/AIMenuControllerProtocol.h>
19 #import <AIUtilities/AIMenuAdditions.h>
20 #import "GBFireImporter.h"
21 #import "GBFireLogImporter.h"
22 #import "BGICImportController.h"
24 @implementation GBImportPlugin
26 - (void)installPlugin
28         importMenuRoot = [[NSMenuItem alloc] initWithTitle:AILocalizedString(@"Import", nil)
29                                                                                                 target:nil
30                                                                                                 action:nil
31                                                                                  keyEquivalent:@""];
32         [[adium menuController] addMenuItem:importMenuRoot toLocation:LOC_File_Additions];
33         
34         NSMenu *subMenu = [[NSMenu alloc] init];
36         [subMenu addItemWithTitle:AILocalizedString(@"iChat Accounts, Statuses, and Transcripts", "Menu item title under the 'Import' submenu. iChat is another OS X instant messaging client.")
37                                            target:self
38                                            action:@selector(importIChat:)
39                                 keyEquivalent:@""];
41         [subMenu addItem:[NSMenuItem separatorItem]];
43         [subMenu addItemWithTitle:AILocalizedString(@"Fire Accounts and Logs", "Menu item title under the 'Import' submenu. Fire is another OS X instant messaging client.")
44                                            target:self
45                                            action:@selector(importFire:)
46                                 keyEquivalent:@""];     
48         [subMenu addItemWithTitle:AILocalizedString(@"Fire Logs", "Menu item title under the 'Import' submenu. Fire is another OS X instant messaging client.")
49                                            target:self
50                                            action:@selector(importFireLogs:)
51                                 keyEquivalent:@""];
52         
53         
54         [importMenuRoot setSubmenu:subMenu];
55         [subMenu release];
58 - (void)uninstallPlugin
60         [importMenuRoot release];
63 - (void)importFire:(id)sender
65         [GBFireImporter importFireConfiguration];
68 - (void)importFireLogs:(id)sender
70         [GBFireLogImporter importLogs];
73 - (void)importIChat:(id)sender
75         [BGICImportController importIChatConfiguration];
77 @end