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