Cog/Preferences/PreferencesController.m
Christopher Snowhill 85c7073649 Reformat my own source code with clang-format
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 21:49:27 -08:00

30 lines
839 B
Objective-C

//
// PreferencesController.m
// Cog
//
// Created by Vincent Spader on 9/4/06.
// Copyright 2006 Vincent Spader. All rights reserved.
//
#import "PreferencesController.h"
#import "PreferencePluginController.h"
#import "PreferencesWindow.h"
@implementation PreferencesController
- (IBAction)showPreferences:(id)sender {
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]];
}
// Show the preferences window.
[window show];
}
@end