blob: 7873b7882eb2640fe83ea9eda15333590aecd254 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
|