2009-03-08 01:49:50 +00:00
|
|
|
//
|
|
|
|
// PreferencesController.m
|
|
|
|
// Preferences
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 9/4/06.
|
|
|
|
// Copyright 2006 Vincent Spader. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "GeneralPreferencesPlugin.h"
|
2013-10-18 03:46:11 +00:00
|
|
|
#import "PathToFileTransformer.h"
|
2016-11-29 23:46:38 +00:00
|
|
|
#import "MIDIPluginFlavorTransformer.h"
|
2009-03-08 01:49:50 +00:00
|
|
|
|
|
|
|
@implementation GeneralPreferencesPlugin
|
|
|
|
|
2013-10-18 03:46:11 +00:00
|
|
|
+ (void)initialize
|
|
|
|
{
|
2016-05-05 20:05:39 +00:00
|
|
|
NSValueTransformer *pathToFileTransformer = [[PathToFileTransformer alloc] init];
|
2013-10-18 03:46:11 +00:00
|
|
|
[NSValueTransformer setValueTransformer:pathToFileTransformer
|
|
|
|
forName:@"PathToFileTransformer"];
|
2016-11-29 23:46:38 +00:00
|
|
|
NSValueTransformer *midiPluginFlavorTransformer = [[MIDIPluginFlavorTransformer alloc] init];
|
|
|
|
[NSValueTransformer setValueTransformer:midiPluginFlavorTransformer
|
|
|
|
forName:@"MIDIPluginFlavorTransformer"];
|
2013-10-18 03:46:11 +00:00
|
|
|
}
|
|
|
|
|
2009-03-08 01:49:50 +00:00
|
|
|
+ (NSArray *)preferencePanes
|
|
|
|
{
|
2016-05-05 20:05:39 +00:00
|
|
|
GeneralPreferencesPlugin *plugin = [[GeneralPreferencesPlugin alloc] init];
|
2009-03-08 01:49:50 +00:00
|
|
|
[NSBundle loadNibNamed:@"Preferences" owner:plugin];
|
|
|
|
|
2013-10-18 03:46:11 +00:00
|
|
|
return [NSArray arrayWithObjects:
|
2009-03-08 01:49:50 +00:00
|
|
|
[plugin playlistPane],
|
|
|
|
[plugin hotKeyPane],
|
|
|
|
[plugin updatesPane],
|
|
|
|
[plugin outputPane],
|
|
|
|
[plugin scrobblerPane],
|
2013-10-11 15:35:57 +00:00
|
|
|
[plugin growlPane],
|
|
|
|
[plugin appearancePane],
|
2013-10-15 14:49:53 +00:00
|
|
|
[plugin midiPane],
|
2009-03-08 01:49:50 +00:00
|
|
|
nil];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (HotKeyPane *)hotKeyPane
|
|
|
|
{
|
|
|
|
return hotKeyPane;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (OutputPane *)outputPane
|
|
|
|
{
|
|
|
|
return outputPane;
|
|
|
|
}
|
|
|
|
|
2013-10-15 14:49:53 +00:00
|
|
|
- (MIDIPane *)midiPane
|
|
|
|
{
|
|
|
|
return midiPane;
|
|
|
|
}
|
|
|
|
|
2009-03-08 01:49:50 +00:00
|
|
|
- (GeneralPreferencePane *)updatesPane
|
|
|
|
{
|
|
|
|
return [GeneralPreferencePane preferencePaneWithView:updatesView title:NSLocalizedStringFromTableInBundle(@"Updates", nil, [NSBundle bundleForClass:[self class]], @"") iconNamed:@"updates"];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (GeneralPreferencePane *)scrobblerPane
|
|
|
|
{
|
|
|
|
return [GeneralPreferencePane preferencePaneWithView:scrobblerView title:NSLocalizedStringFromTableInBundle(@"Last.fm", nil, [NSBundle bundleForClass:[self class]], @"") iconNamed:@"lastfm"];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (GeneralPreferencePane *)playlistPane
|
|
|
|
{
|
|
|
|
return [GeneralPreferencePane preferencePaneWithView:playlistView title:NSLocalizedStringFromTableInBundle(@"Playlist", nil, [NSBundle bundleForClass:[self class]], @"") iconNamed:@"playlist"];
|
|
|
|
}
|
|
|
|
|
2013-10-11 15:35:57 +00:00
|
|
|
- (GeneralPreferencePane *)growlPane
|
|
|
|
{
|
|
|
|
return [GeneralPreferencePane preferencePaneWithView:growlView title:NSLocalizedStringFromTableInBundle(@"Growl", nil, [NSBundle bundleForClass:[self class]], @"") iconNamed:@"growl"];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (GeneralPreferencePane *)appearancePane
|
|
|
|
{
|
|
|
|
return [GeneralPreferencePane preferencePaneWithView:appearanceView title:NSLocalizedStringFromTableInBundle(@"Appearance", nil, [NSBundle bundleForClass:[self class]], @"") iconNamed:@"appearance"];
|
|
|
|
}
|
|
|
|
|
2009-03-08 01:49:50 +00:00
|
|
|
@end
|