mirror of
https://github.com/transmission/transmission
synced 2025-03-10 06:02:57 +00:00
stupid defaults!
This commit is contained in:
parent
c1c071da81
commit
23e6c4d5e3
1 changed files with 4 additions and 2 deletions
|
@ -44,6 +44,8 @@
|
||||||
|
|
||||||
- (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib
|
- (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib
|
||||||
{
|
{
|
||||||
|
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
fPrivateTorrent = [fDefaults boolForKey: @"SavePrivateTorrent"];
|
fPrivateTorrent = [fDefaults boolForKey: @"SavePrivateTorrent"];
|
||||||
fPublicTorrent = !fPrivateTorrent || ![fDefaults boolForKey: @"DeleteOriginalTorrent"];
|
fPublicTorrent = !fPrivateTorrent || ![fDefaults boolForKey: @"DeleteOriginalTorrent"];
|
||||||
|
|
||||||
|
@ -66,6 +68,8 @@
|
||||||
|
|
||||||
- (id) initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib
|
- (id) initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib
|
||||||
{
|
{
|
||||||
|
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
id torrent;
|
id torrent;
|
||||||
NSNumber * privateCopy, * publicCopy;
|
NSNumber * privateCopy, * publicCopy;
|
||||||
fPrivateTorrent = (privateCopy = [history objectForKey: @"PrivateCopy"]) && [privateCopy boolValue];
|
fPrivateTorrent = (privateCopy = [history objectForKey: @"PrivateCopy"]) && [privateCopy boolValue];
|
||||||
|
@ -555,7 +559,6 @@
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
fLib = lib;
|
fLib = lib;
|
||||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
|
||||||
|
|
||||||
int error;
|
int error;
|
||||||
if (!path || !(fHandle = tr_torrentInit(fLib, [path UTF8String],
|
if (!path || !(fHandle = tr_torrentInit(fLib, [path UTF8String],
|
||||||
|
@ -576,7 +579,6 @@
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
fLib = lib;
|
fLib = lib;
|
||||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
|
||||||
|
|
||||||
int error;
|
int error;
|
||||||
if (!hashString || !(fHandle = tr_torrentInitSaved(fLib, [hashString UTF8String], TR_FSAVEPRIVATE, & error)))
|
if (!hashString || !(fHandle = tr_torrentInitSaved(fLib, [hashString UTF8String], TR_FSAVEPRIVATE, & error)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue