cog/Preferences/PreferencesController.m

42 lines
1007 B
Matlab
Raw Permalink Normal View History

2006-09-04 18:06:23 +00:00
//
// PreferencesController.m
// Cog
//
// Created by Vincent Spader on 9/4/06.
// Copyright 2006 Vincent Spader. All rights reserved.
2006-09-04 18:06:23 +00:00
//
#import "PreferencesController.h"
#import "PreferencePluginController.h"
#import "PreferencesWindow.h"
2006-09-04 18:06:23 +00:00
@implementation PreferencesController
- (void)initWindow {
if(nil == window) {
// Determine path to the sample preference panes
NSString *pluginPath = [[NSBundle mainBundle] pathForResource:@"Preferences" ofType:@"preferencePane"];
NSBundle *bundle = [NSBundle bundleWithPath:pluginPath];
PreferencePluginController *pluginController = [[PreferencePluginController alloc] initWithPlugins:@[bundle]];
window = [[PreferencesWindow alloc] initWithPreferencePanes:[pluginController preferencePanes]];
}
}
- (IBAction)showPreferences:(id)sender {
[self initWindow];
// Show the preferences window.
[window show];
2006-09-04 18:06:23 +00:00
}
- (IBAction)showPathSuggester:(id)sender {
[self initWindow];
// Show the path suggester
[window showPathSuggester];
}
2006-09-04 18:06:23 +00:00
@end