summaryrefslogtreecommitdiffstats
path: root/Liaison/NIBConnector.m
diff options
context:
space:
mode:
Diffstat (limited to 'Liaison/NIBConnector.m')
-rw-r--r--Liaison/NIBConnector.m66
1 files changed, 66 insertions, 0 deletions
diff --git a/Liaison/NIBConnector.m b/Liaison/NIBConnector.m
new file mode 100644
index 0000000..7873b78
--- /dev/null
+++ b/Liaison/NIBConnector.m
@@ -0,0 +1,66 @@
+//
+// NIBConnector.m
+// Liaison
+//
+// Created by Brian Cully on Mon Mar 03 2003.
+// Copyright (c) 2003 Brian Cully. All rights reserved.
+//
+
+#import "NIBConnector.h"
+
+#import "CopyController.h"
+#import "PreferencesController.h"
+
+@implementation NIBConnector
+static NIBConnector *sharedInstance = nil;
++ (NIBConnector *)connector
+{
+ // Set in awakeFromNib
+ return sharedInstance;
+}
+
+- (id) init
+{
+ self = [super init];
+
+ thePreferencesController = nil;
+ theCopyController = nil;
+
+ return self;
+}
+
+- (void)awakeFromNib
+{
+ if (sharedInstance == nil)
+ sharedInstance = self;
+}
+
+- (void)showPreferencesWindow: (id)sender
+{
+ if (thePreferencesController == nil)
+ [NSBundle loadNibNamed: @"PreferencesWindow.nib" owner: self];
+ [thePreferencesController showWindow];
+}
+
+- (IBAction)showDownloadWindow: (id)sender
+{
+ [[self copyController] showWindow];
+}
+
+- (CopyController *)copyController
+{
+ if (theCopyController == nil)
+ [NSBundle loadNibNamed: @"CopyPanel.nib" owner: self];
+ return theCopyController;
+}
+
+- (LoadPanelController *)loadPanelController
+{
+ if (theLoadPanelController == nil)
+ [NSBundle loadNibNamed: @"LoadPanel.nib" owner: self];
+ return theLoadPanelController;
+}
+@synthesize theCopyController;
+@synthesize thePreferencesController;
+@synthesize theLoadPanelController;
+@end