Moved file tree preference to the file tree panel itself.
Removed file tree preference pane.CQTexperiment
parent
7f52608e6c
commit
6dfef23ec7
|
@ -7,9 +7,18 @@
|
|||
#import "PlaylistLoader.h"
|
||||
#import "OpenURLPanel.h"
|
||||
#import "SpotlightWindowController.h"
|
||||
#import "StringToURLTransformer.h"
|
||||
|
||||
@implementation AppController
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
NSValueTransformer *stringToURLTransformer = [[[StringToURLTransformer alloc] init]autorelease];
|
||||
[NSValueTransformer setValueTransformer:stringToURLTransformer
|
||||
forName:@"StringToURLTransformer"];
|
||||
}
|
||||
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -14,21 +14,19 @@
|
|||
|
||||
@implementation FileTreeDataSource
|
||||
|
||||
- (void)initDefaults
|
||||
+ (void)initialize
|
||||
{
|
||||
NSMutableDictionary *userDefaultsValuesDict = [NSMutableDictionary dictionary];
|
||||
|
||||
[userDefaultsValuesDict setObject:[[NSURL fileURLWithPath:[@"~/Music" stringByExpandingTildeInPath]] absoluteString] forKey:@"fileTreeRootURL"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.fileTreeRootURL" options:0 context:nil];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[self initDefaults];
|
||||
[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.fileTreeRootURL" options:0 context:nil];
|
||||
|
||||
[self setRootURL: [NSURL URLWithString:[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"fileTreeRootURL"]]];
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,7 +16,6 @@
|
|||
IBOutlet HotKeyPane *hotKeyPane;
|
||||
IBOutlet OutputPane *outputPane;
|
||||
|
||||
IBOutlet NSView *fileTreeView;
|
||||
IBOutlet NSView *scrobblerView;
|
||||
IBOutlet NSView *remoteView;
|
||||
IBOutlet NSView *updatesView;
|
||||
|
@ -25,7 +24,6 @@
|
|||
- (HotKeyPane *)hotKeyPane;
|
||||
- (OutputPane *)outputPane;
|
||||
|
||||
- (PreferencePane *)fileTreePane;
|
||||
- (PreferencePane *)remotePane;
|
||||
- (PreferencePane *)updatesPane;
|
||||
- (PreferencePane *)scrobblerPane;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
return [NSArray arrayWithObjects:
|
||||
[prefPaneController hotKeyPane],
|
||||
[prefPaneController fileTreePane],
|
||||
[prefPaneController remotePane],
|
||||
[prefPaneController updatesPane],
|
||||
[prefPaneController outputPane],
|
||||
|
@ -33,11 +32,6 @@
|
|||
return hotKeyPane;
|
||||
}
|
||||
|
||||
- (PreferencePane *)fileTreePane
|
||||
{
|
||||
return [PreferencePane preferencePaneWithView:fileTreeView name:NSLocalizedStringFromTableInBundle(@"File Tree", nil, [NSBundle bundleForClass:[self class]], @"") icon:@"file_tree"];
|
||||
}
|
||||
|
||||
- (OutputPane *)outputPane
|
||||
{
|
||||
return outputPane;
|
||||
|
|
|
@ -10,13 +10,6 @@
|
|||
|
||||
@implementation StringToURLTransformer
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
NSValueTransformer *stringToURLTransformer = [[[StringToURLTransformer alloc] init]autorelease];
|
||||
[NSValueTransformer setValueTransformer:stringToURLTransformer
|
||||
forName:@"StringToURLTransformer"];
|
||||
}
|
||||
|
||||
+ (Class)transformedValueClass { return [NSURL class]; }
|
||||
+ (BOOL)allowsReverseTransformation { return YES; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue