mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 18:38:42 +00:00
Change setup of PrefsController a little.
This commit is contained in:
@@ -73,7 +73,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||
|
||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||
fInfoController = [[InfoWindowController alloc] initWithWindowNibName: @"InfoWindow"];
|
||||
fPrefsController = [[PrefsController alloc] initWithWindowNibName: @"PrefsWindow"];
|
||||
fPrefsController = [[PrefsController alloc] initWithWindowNibName: @"PrefsWindow" handle: fLib];
|
||||
fBadger = [[Badger alloc] init];
|
||||
|
||||
fAutoImportedNames = [[NSMutableArray alloc] init];
|
||||
@@ -105,8 +105,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[fPrefsController setPrefs: fLib];
|
||||
|
||||
[fStatusBar setBackgroundImage: [NSImage imageNamed: @"StatusBarBackground.png"]];
|
||||
[fFilterBar setBackgroundImage: [NSImage imageNamed: @"FilterBarBackground.png"]];
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
NSUserDefaults * fDefaults;
|
||||
}
|
||||
|
||||
- (void) setPrefs: (tr_handle_t *) handle;
|
||||
- (id) initWithWindowNibName: (NSString *) name handle: (tr_handle_t *) handle;
|
||||
|
||||
- (void) setShowMessage: (id) sender;
|
||||
- (void) setBadge: (id) sender;
|
||||
|
||||
@@ -70,13 +70,23 @@
|
||||
[[NSBundle mainBundle] pathForResource: @"Defaults" ofType: @"plist"]]];
|
||||
}
|
||||
|
||||
- (id) initWithWindowNibName: (NSString *) name handle: (tr_handle_t *) handle
|
||||
{
|
||||
if ((self = [super initWithWindowNibName: name]))
|
||||
{
|
||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||
fHandle = handle;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[fDownloadFolder release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setPrefs: (tr_handle_t *) handle
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
fToolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"];
|
||||
[fToolbar setDelegate: self];
|
||||
@@ -88,9 +98,6 @@
|
||||
[fToolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
|
||||
[self showGeneralPref: nil];
|
||||
|
||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||
fHandle = handle;
|
||||
|
||||
//set download folder
|
||||
NSString * downloadChoice = [fDefaults stringForKey: @"DownloadChoice"];
|
||||
fDownloadFolder = [[[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath] retain];
|
||||
@@ -285,7 +292,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
tr_setBindPort( fHandle, bindPort );
|
||||
tr_setBindPort(fHandle, bindPort);
|
||||
[fDefaults setInteger: bindPort forKey: @"BindPort"];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user