adium/adium

Parents 68f49c9d6bfb
Children 01dc7cd1cf26
Rework AILogByAccountWindowController and AIURLHandlerWindowController to be independent window controllers.
--- a/Plugins/General Preferences/AILogByAccountWindowController.h Wed Sep 12 14:19:34 2012 +0200
+++ b/Plugins/General Preferences/AILogByAccountWindowController.h Wed Sep 12 14:21:00 2012 +0200
@@ -14,7 +14,9 @@
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-@interface AILogByAccountWindowController : NSWindowController {
+#import <Adium/AIWindowController.h>
+
+@interface AILogByAccountWindowController : AIWindowController {
NSArray *accounts;
}
--- a/Plugins/General Preferences/AIMessagePreferences.m Wed Sep 12 14:19:34 2012 +0200
+++ b/Plugins/General Preferences/AIMessagePreferences.m Wed Sep 12 14:21:00 2012 +0200
@@ -273,19 +273,11 @@
group:@"Message Context Display"];
}
-- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
-{
- [sheet orderOut:nil];
-}
- (IBAction)configureLogCertainAccounts:(id)sender
{
AILogByAccountWindowController *windowController = [[AILogByAccountWindowController alloc] initWithWindowNibName:@"AILogByAccountWindow"];
- [NSApp beginSheet:windowController.window
- modalForWindow:self.view.window
- modalDelegate:self
- didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
- contextInfo:nil];
+ [windowController showOnWindow:self.view.window];
}
@end
--- a/Plugins/General Preferences/ESGeneralPreferences.m Wed Sep 12 14:19:34 2012 +0200
+++ b/Plugins/General Preferences/ESGeneralPreferences.m Wed Sep 12 14:21:00 2012 +0200
@@ -158,20 +158,11 @@
[[AIURLHandlerPlugin sharedAIURLHandlerPlugin] setAdiumAsDefault];
}
-- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
-{
- [sheet orderOut:nil];
-}
-
- (IBAction)customizeDefaultApp:(id)sender
{
AIURLHandlerWindowController *windowController = [[AIURLHandlerWindowController alloc] initWithWindowNibName:@"AIURLHandlerPreferences"];
- [NSApp beginSheet:windowController.window
- modalForWindow:self.view.window
- modalDelegate:self
- didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
- contextInfo:nil];
+ [windowController showOnWindow:self.view.window];
}
@end
--- a/Source/AIURLHandlerWindowController.h Wed Sep 12 14:19:34 2012 +0200
+++ b/Source/AIURLHandlerWindowController.h Wed Sep 12 14:21:00 2012 +0200
@@ -15,9 +15,10 @@
*/
#import <Adium/AIPreferencePane.h>
+#import <Adium/AIWindowController.h>
#import "AIURLHandlerPlugin.h"
-@interface AIURLHandlerWindowController : NSWindowController {
+@interface AIURLHandlerWindowController : AIWindowController {
IBOutlet NSTableView *tableView;
IBOutlet NSButton *checkBox_enforceDefault;