From 23e6c4d5e3cbe3358430ddb1a8bdf6026e524c22 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 15 Jun 2006 02:46:54 +0000 Subject: [PATCH] stupid defaults! --- macosx/Torrent.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index b6d1b45c9..143126562 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -44,6 +44,8 @@ - (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib { + fDefaults = [NSUserDefaults standardUserDefaults]; + fPrivateTorrent = [fDefaults boolForKey: @"SavePrivateTorrent"]; fPublicTorrent = !fPrivateTorrent || ![fDefaults boolForKey: @"DeleteOriginalTorrent"]; @@ -66,6 +68,8 @@ - (id) initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib { + fDefaults = [NSUserDefaults standardUserDefaults]; + id torrent; NSNumber * privateCopy, * publicCopy; fPrivateTorrent = (privateCopy = [history objectForKey: @"PrivateCopy"]) && [privateCopy boolValue]; @@ -555,7 +559,6 @@ return nil; fLib = lib; - fDefaults = [NSUserDefaults standardUserDefaults]; int error; if (!path || !(fHandle = tr_torrentInit(fLib, [path UTF8String], @@ -576,7 +579,6 @@ return nil; fLib = lib; - fDefaults = [NSUserDefaults standardUserDefaults]; int error; if (!hashString || !(fHandle = tr_torrentInitSaved(fLib, [hashString UTF8String], TR_FSAVEPRIVATE, & error)))