Changeset 292


Ignore:
Timestamp:
Jun 8, 2006, 4:44:45 AM (16 years ago)
Author:
joshe
Message:

Revert the last commit, it wasn't supposed to go on the trunk.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/save_torrent_files/Transmission.xcodeproj/project.pbxproj

    r291 r292  
    8181                A2173E1C0A33C1B300B0D8AB /* ActionButtonPressed.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2173E1B0A33C1B300B0D8AB /* ActionButtonPressed.tiff */; };
    8282                A21DFF100A292B2B007C5F76 /* Transfers.png in Resources */ = {isa = PBXBuildFile; fileRef = A21DFF0F0A292B2B007C5F76 /* Transfers.png */; };
     83                A2495B6D0A2F697C0098B31F /* ResumeSelected.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2495B6B0A2F697C0098B31F /* ResumeSelected.tiff */; };
     84                A2495B6E0A2F697D0098B31F /* PauseSelected.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2495B6C0A2F697C0098B31F /* PauseSelected.tiff */; };
    8385                A2519D490A2FADFC00479D0C /* SmoothAquaView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2519D470A2FADFC00479D0C /* SmoothAquaView.m */; };
    8486                A2519D4A0A2FADFC00479D0C /* SmoothAquaView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A2519D480A2FADFC00479D0C /* SmoothAquaView.h */; };
     
    9395                A2D5CCFD0A2661590089A8C2 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2D5CCFC0A2661590089A8C2 /* Sparkle.framework */; };
    9496                A2D5CD100A2661610089A8C2 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A2D5CCFC0A2661590089A8C2 /* Sparkle.framework */; };
    95                 A2DB22970A37CA4200489FF1 /* PauseSelected.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = A2DB22950A37CA4200489FF1 /* PauseSelected.png */; };
    96                 A2DB22980A37CA4200489FF1 /* ResumeSelected.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = A2DB22960A37CA4200489FF1 /* ResumeSelected.png */; };
    9797                A2F40AE40A361C00006B8288 /* Transmission.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4D2784360905709500687951 /* Transmission.icns */; };
    9898                A2F8951F0A2D4BA500ED2127 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = A2F8951E0A2D4BA500ED2127 /* Credits.rtf */; };
     
    123123                        dstSubfolderSpec = 10;
    124124                        files = (
    125                                 A2DB22970A37CA4200489FF1 /* PauseSelected.png in CopyFiles */,
    126                                 A2DB22980A37CA4200489FF1 /* ResumeSelected.png in CopyFiles */,
    127125                        );
    128126                        runOnlyForDeploymentPostprocessing = 0;
     
    222220                4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TorrentCell.m; path = macosx/TorrentCell.m; sourceTree = "<group>"; };
    223221                4DCCBB3D09C3D71100D3CABF /* TorrentCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TorrentCell.h; path = macosx/TorrentCell.h; sourceTree = "<group>"; };
    224                 4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
     222                4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
    225223                4DDBB71B09E16BF100284745 /* transmissioncli.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = transmissioncli.c; path = cli/transmissioncli.c; sourceTree = "<group>"; };
    226224                4DDFDD20099A5D8E00189D81 /* DownloadBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownloadBadge.png; path = macosx/Images/DownloadBadge.png; sourceTree = "<group>"; };
     
    250248                A2173E1B0A33C1B300B0D8AB /* ActionButtonPressed.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ActionButtonPressed.tiff; path = macosx/Images/ActionButtonPressed.tiff; sourceTree = "<group>"; };
    251249                A21DFF0F0A292B2B007C5F76 /* Transfers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Transfers.png; path = macosx/Images/Transfers.png; sourceTree = "<group>"; };
     250                A2495B6B0A2F697C0098B31F /* ResumeSelected.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ResumeSelected.tiff; path = macosx/Images/ResumeSelected.tiff; sourceTree = "<group>"; };
     251                A2495B6C0A2F697C0098B31F /* PauseSelected.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = PauseSelected.tiff; path = macosx/Images/PauseSelected.tiff; sourceTree = "<group>"; };
    252252                A2519D470A2FADFC00479D0C /* SmoothAquaView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = SmoothAquaView.m; path = macosx/SmoothAquaView.m; sourceTree = "<group>"; };
    253253                A2519D480A2FADFC00479D0C /* SmoothAquaView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SmoothAquaView.h; path = macosx/SmoothAquaView.h; sourceTree = "<group>"; };
     
    262262                A2C655640A04FEDC00E9FD82 /* BottomBorder.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BottomBorder.tiff; path = macosx/Images/BottomBorder.tiff; sourceTree = "<group>"; };
    263263                A2D5CCFC0A2661590089A8C2 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
    264                 A2DB22950A37CA4200489FF1 /* PauseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PauseSelected.png; path = macosx/Images/PauseSelected.png; sourceTree = "<group>"; };
    265                 A2DB22960A37CA4200489FF1 /* ResumeSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeSelected.png; path = macosx/Images/ResumeSelected.png; sourceTree = "<group>"; };
    266264                A2F8951E0A2D4BA500ED2127 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Credits.rtf; path = macosx/Credits.rtf; sourceTree = "<group>"; };
    267265/* End PBXFileReference section */
     
    355353                        children = (
    356354                                A2F8951E0A2D4BA500ED2127 /* Credits.rtf */,
    357                                 A2DB22950A37CA4200489FF1 /* PauseSelected.png */,
    358                                 A2DB22960A37CA4200489FF1 /* ResumeSelected.png */,
     355                                A2495B6B0A2F697C0098B31F /* ResumeSelected.tiff */,
     356                                A2495B6C0A2F697C0098B31F /* PauseSelected.tiff */,
    359357                                A21DFF0F0A292B2B007C5F76 /* Transfers.png */,
    360358                                A27A53640A06AED200E1F16F /* StatusBorder.tiff */,
     
    622620                                A2912C540A2956E80097A0CA /* PrefsWindow.nib in Resources */,
    623621                                A2F8951F0A2D4BA500ED2127 /* Credits.rtf in Resources */,
     622                                A2495B6D0A2F697C0098B31F /* ResumeSelected.tiff in Resources */,
     623                                A2495B6E0A2F697D0098B31F /* PauseSelected.tiff in Resources */,
    624624                                A2173E1C0A33C1B300B0D8AB /* ActionButtonPressed.tiff in Resources */,
    625625                                A28DBADC0A33C1D800F4B4A7 /* ActionButton.tiff in Resources */,
  • trunk/macosx/Controller.h

    r291 r292  
    9797
    9898- (void) removeTorrent:                 (id) sender;
     99- (void) removeTorrentDeleteTorrent:    (id) sender;
    99100- (void) removeTorrentDeleteData:       (id) sender;
     101- (void) removeTorrentDeleteBoth:       (id) sender;
    100102- (void) removeTorrentWithIndex:        (NSIndexSet *) indexSet
     103                deleteTorrent:          (BOOL) deleteTorrent
    101104                deleteData:             (BOOL) deleteData;
    102105               
     
    104107                        contextInfo: (NSDictionary *) dict;
    105108- (void) confirmRemoveTorrents: (NSArray *) torrents
     109            deleteTorrent: (BOOL) deleteTorrent
    106110            deleteData: (BOOL) deleteData;
    107111
  • trunk/macosx/Controller.m

    r291 r292  
    525525
    526526- (void) removeTorrentWithIndex: (NSIndexSet *) indexSet
     527                  deleteTorrent: (BOOL) deleteTorrent
    527528                     deleteData: (BOOL) deleteData
    528529{
     
    540541        NSDictionary * dict = [[NSDictionary alloc] initWithObjectsAndKeys:
    541542            torrents, @"Torrents",
     543            [NSNumber numberWithBool: deleteTorrent], @"DeleteTorrent",
    542544            [NSNumber numberWithBool: deleteData], @"DeleteData",
    543545            nil];
     
    571573    {
    572574        [self confirmRemoveTorrents: torrents
     575                deleteTorrent: deleteTorrent
    573576                deleteData: deleteData];
    574577    }
     
    581584
    582585    NSArray * torrents = [dict objectForKey: @"Torrents"];
     586    BOOL deleteTorrent = [[dict objectForKey: @"DeleteTorrent"] boolValue];
    583587    BOOL deleteData = [[dict objectForKey: @"DeleteData"] boolValue];
    584588    [dict release];
     
    587591    {
    588592        [self confirmRemoveTorrents: torrents
     593            deleteTorrent: deleteTorrent
    589594            deleteData: deleteData];
    590595    }
     
    594599
    595600- (void) confirmRemoveTorrents: (NSArray *) torrents
     601            deleteTorrent: (BOOL) deleteTorrent
    596602            deleteData: (BOOL) deleteData
    597603{
     
    604610        if( deleteData )
    605611            [torrent trashData];
    606 
    607         [torrent removeForever];
     612           
     613        if( deleteTorrent )
     614            [torrent trashTorrent];
     615
    608616        [fTorrents removeObject: torrent];
    609617    }
     
    618626- (void) removeTorrent: (id) sender
    619627{
    620     [self removeTorrentWithIndex: [fTableView selectedRowIndexes] deleteData: NO];
     628    [self removeTorrentWithIndex: [fTableView selectedRowIndexes] deleteTorrent: NO deleteData: NO];
     629}
     630
     631- (void) removeTorrentDeleteTorrent: (id) sender
     632{
     633    [self removeTorrentWithIndex: [fTableView selectedRowIndexes] deleteTorrent: YES deleteData: NO];
    621634}
    622635
    623636- (void) removeTorrentDeleteData: (id) sender
    624637{
    625     [self removeTorrentWithIndex: [fTableView selectedRowIndexes] deleteData: YES];
     638    [self removeTorrentWithIndex: [fTableView selectedRowIndexes] deleteTorrent: NO deleteData: YES];
     639}
     640
     641- (void) removeTorrentDeleteBoth: (id) sender
     642{
     643    [self removeTorrentWithIndex: [fTableView selectedRowIndexes] deleteTorrent: YES deleteData: YES];
    626644}
    627645
     
    11921210
    11931211    //enable remove items
    1194     if (action == @selector(removeTorrent:) || action == @selector(removeTorrentDeleteData:))
     1212    if (action == @selector(removeTorrent:)
     1213        || action == @selector(removeTorrentDeleteTorrent:)
     1214        || action == @selector(removeTorrentDeleteData:)
     1215        || action == @selector(removeTorrentDeleteBoth:))
    11951216    {
    11961217        BOOL active = NO;
  • trunk/macosx/Defaults.plist

    r291 r292  
    1919        <key>CheckUpload</key>
    2020        <true/>
    21         <key>DeleteOriginalTorrent</key>
    22         <false/>
    2321        <key>DownloadChoice</key>
    2422        <string>Constant</string>
     
    4341        <key>SUScheduledCheckInterval</key>
    4442        <integer>86400</integer>
    45         <key>SavePrivateTorrent</key>
    46         <true/>
    4743        <key>ShowInspector</key>
    4844        <false/>
  • trunk/macosx/English.lproj/MainMenu.nib/classes.nib

    r291 r292  
    1010                openShowSheet = id;
    1111                removeTorrent = id;
     12                removeTorrentDeleteBoth = id;
    1213                removeTorrentDeleteData = id;
     14                removeTorrentDeleteTorrent = id;
    1315                resumeAllTorrents = id;
    1416                resumeTorrent = id;
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r291 r292  
    3030        <key>IBOpenObjects</key>
    3131        <array>
    32                 <integer>29</integer>
     32                <integer>21</integer>
    3333                <integer>1480</integer>
    34                 <integer>21</integer>
    3534        </array>
    3635        <key>IBSystem Version</key>
  • trunk/macosx/English.lproj/PrefsWindow.nib/classes.nib

    r291 r292  
    1111                setLimit = id;
    1212                setLimitCheck = id;
    13                 setMoveTorrent = id;
    1413                setPort = id;
    1514                setRatio = id;
     
    2423                fBadgeDownloadRateCheck = NSButton;
    2524                fBadgeUploadRateCheck = NSButton;
    26                 fCopyTorrentCheck = NSButton;
    27                 fDeleteOriginalTorrentCheck = NSButton;
    2825                fDownloadCheck = NSButton;
    2926                fDownloadField = NSTextField;
  • trunk/macosx/English.lproj/PrefsWindow.nib/info.nib

    r291 r292  
    88        <dict>
    99                <key>28</key>
    10                 <string>345 472 462 212 0 0 1152 842 </string>
     10                <string>347 472 462 212 0 0 1152 842 </string>
    1111                <key>41</key>
    12                 <string>262 506 462 274 0 0 1152 842 </string>
     12                <string>345 461 462 234 0 0 1152 842 </string>
    1313                <key>66</key>
    1414                <string>347 526 462 104 0 0 1152 842 </string>
  • trunk/macosx/PrefsController.h

    r291 r292  
    3737    IBOutlet NSButton       * fQuitCheck, * fRemoveCheck,
    3838                            * fBadgeDownloadRateCheck, * fBadgeUploadRateCheck,
    39                             * fAutoStartCheck, * fCopyTorrentCheck, * fDeleteOriginalTorrentCheck;
     39                            * fAutoStartCheck;                           
    4040    IBOutlet NSPopUpButton  * fUpdatePopUp;
    4141
     
    5959- (void) checkUpdate;
    6060- (void) setAutoStart:          (id) sender;
    61 - (void) setMoveTorrent:        (id) sender;
    6261- (void) setDownloadLocation:   (id) sender;
    6362- (void) folderSheetShow:       (id) sender;
  • trunk/macosx/PrefsController.m

    r291 r292  
    117117    int uploadLimit = [fDefaults integerForKey: @"UploadLimit"];
    118118   
    119     [fUploadCheck setState: checkUpload];
     119    [fUploadCheck setState: checkUpload ? NSOnState : NSOffState];
    120120    [fUploadField setIntValue: uploadLimit];
    121121    [fUploadField setEnabled: checkUpload];
     
    127127    int downloadLimit = [fDefaults integerForKey: @"DownloadLimit"];
    128128   
    129     [fDownloadCheck setState: checkDownload];
     129    [fDownloadCheck setState: checkDownload ? NSOnState : NSOffState];
    130130    [fDownloadField setIntValue: downloadLimit];
    131131    [fDownloadField setEnabled: checkDownload];
     
    135135    //set ratio limit
    136136    BOOL ratioCheck = [fDefaults boolForKey: @"RatioCheck"];
    137     [fRatioCheck setState: ratioCheck];
     137    [fRatioCheck setState: ratioCheck ? NSOnState : NSOffState];
    138138    [fRatioField setEnabled: ratioCheck];
    139139    [fRatioField setFloatValue: [fDefaults floatForKey: @"RatioLimit"]];
    140140   
    141141    //set remove and quit prompts
    142     [fQuitCheck setState: [fDefaults boolForKey: @"CheckQuit"]];
    143     [fRemoveCheck setState: [fDefaults boolForKey: @"CheckRemove"]];
     142    [fQuitCheck setState: [fDefaults boolForKey: @"CheckQuit"] ?
     143        NSOnState : NSOffState];
     144    [fRemoveCheck setState: [fDefaults boolForKey: @"CheckRemove"] ?
     145        NSOnState : NSOffState];
    144146
    145147    //set dock badging
     
    149151    //set auto start
    150152    [fAutoStartCheck setState: [fDefaults boolForKey: @"AutoStartDownload"]];
    151    
    152     //set private torrents
    153     BOOL copyTorrents = [fDefaults boolForKey: @"SavePrivateTorrent"];
    154     [fCopyTorrentCheck setState: copyTorrents];
    155    
    156     [fDeleteOriginalTorrentCheck setEnabled: copyTorrents];
    157     [fDeleteOriginalTorrentCheck setState: [fDefaults boolForKey: @"DeleteOriginalTorrent"]];
    158153
    159154    //set update check
     
    423418{
    424419    [fDefaults setBool: [sender state] forKey: @"AutoStartDownload"];
    425 }
    426 
    427 - (void) setMoveTorrent: (id) sender
    428 {
    429     int state = [sender state];
    430     if (sender == fCopyTorrentCheck)
    431     {
    432         [fDefaults setBool: state forKey: @"SavePrivateTorrent"];
    433        
    434         [fDeleteOriginalTorrentCheck setEnabled: state];
    435         if (state == NSOffState)
    436         {
    437             [fDeleteOriginalTorrentCheck setState: NSOffState];
    438             [fDefaults setBool: NO forKey: @"DeleteOriginalTorrent"];
    439         }
    440     }
    441     else
    442         [fDefaults setBool: state forKey: @"DeleteOriginalTorrent"];
    443420}
    444421
  • trunk/macosx/Torrent.h

    r291 r292  
    3636    tr_info_t    * fInfo;
    3737    tr_stat_t    * fStat;
    38    
    3938    BOOL         fResumeOnWake;
    4039    NSDate       * fDate;
    41    
    42     BOOL        fPrivateSaved;
    4340
    4441    NSUserDefaults  * fDefaults;
     
    5956- (void)       getAvailability: (int8_t *) tab size: (int) size;
    6057
    61 - (void)        update;
    62 - (void)        start;
    63 - (void)        stop;
    64 - (void)        removeForever;
    65 - (void)        sleep;
    66 - (void)        wakeUp;
     58- (void)       update;
     59- (void)       start;
     60- (void)       stop;
     61- (void)       sleep;
     62- (void)       wakeUp;
    6763
    6864- (float)       ratio;
     
    7369
    7470- (void)        reveal;
     71- (void)        trashTorrent;
    7572- (void)        trashData;
    7673
  • trunk/macosx/Torrent.m

    r291 r292  
    2929@interface Torrent (Private)
    3030
     31- (void) trashPath: (NSString *) path;
    3132- (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib date: (NSDate *) date
    3233        stopRatioSetting: (NSNumber *) stopRatioSetting ratioLimit: (NSNumber *) ratioLimit;
    33 - (id) initWithHash: (NSString *) hashString lib: (tr_handle_t *) lib date: (NSDate *) date
    34         stopRatioSetting: (NSNumber *) stopRatioSetting ratioLimit: (NSNumber *) ratioLimit;
    35 - (id) initForSuccessWithDate: (NSDate *) date stopRatioSetting: (NSNumber *)
    36             stopRatioSetting ratioLimit: (NSNumber *) ratioLimit;
    37 
    38 - (void) trashPath: (NSString *) path;
    3934
    4035@end
     
    4540- (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib
    4641{
    47     id torrent = [self initWithPath: path lib: lib
    48                     date: nil stopRatioSetting: nil
    49                     ratioLimit: nil];
    50     NSLog(path);
    51     if (fPrivateSaved && [fDefaults boolForKey: @"DeleteOriginalTorrent"])
    52         [self trashPath: path];
    53    
    54     return torrent;
     42    return [self initWithPath: path lib: lib
     43            date: nil stopRatioSetting: nil
     44            ratioLimit: nil];
    5545}
    5646
    5747- (id) initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib
    5848{
    59     NSNumber * privateCopy;
    60     if ((privateCopy = [history objectForKey: @"PrivateCopy"]) && [privateCopy boolValue])
    61         self = [self initWithHash: [history objectForKey: @"TorrentHash"]
    62             lib: lib date: [history objectForKey: @"Date"]
    63             stopRatioSetting: [history objectForKey: @"StopRatioSetting"]
    64             ratioLimit: [history objectForKey: @"RatioLimit"]];
    65     else
    66         self = [self initWithPath: [history objectForKey: @"TorrentPath"]
     49    self = [self initWithPath: [history objectForKey: @"TorrentPath"]
    6750            lib: lib date: [history objectForKey: @"Date"]
    6851            stopRatioSetting: [history objectForKey: @"StopRatioSetting"]
     
    8669- (NSDictionary *) history
    8770{
    88     NSMutableDictionary * history = [NSMutableDictionary dictionaryWithObjectsAndKeys:
    89                     [NSNumber numberWithBool: fPrivateSaved], @"PrivateCopy",
    90                     [self downloadFolder], @"DownloadFolder",
    91                     [self isActive] ? @"NO" : @"YES", @"Paused",
    92                     [self date], @"Date",
    93                     [NSNumber numberWithInt: fStopRatioSetting], @"StopRatioSetting",
    94                     [NSNumber numberWithFloat: fRatioLimit], @"RatioLimit", nil];
    95            
    96     if (fPrivateSaved)
    97         [history setObject: [self torrentLocation] forKey: @"TorrentPath"];
    98     else
    99         [history setObject: [self hashString] forKey: @"TorrentHash"];
    100    
    101     return history;
     71    return [NSDictionary dictionaryWithObjectsAndKeys:
     72            [self torrentLocation], @"TorrentPath",
     73            [self downloadFolder], @"DownloadFolder",
     74            [self isActive] ? @"NO" : @"YES", @"Paused",
     75            [self date], @"Date",
     76            [NSNumber numberWithInt: fStopRatioSetting], @"StopRatioSetting",
     77            [NSNumber numberWithFloat: fRatioLimit], @"RatioLimit", nil];
    10278}
    10379
     
    237213}
    238214
    239 - (void) removeForever
    240 {
    241     tr_torrentRemoveSaved(fHandle);
    242 }
    243 
    244215- (void) sleep
    245216{
     
    291262}
    292263
     264- (void) trashTorrent
     265{
     266    [self trashPath: [self torrentLocation]];
     267}
     268
    293269- (void) trashData
    294270{
     
    339315- (NSString *) hashString
    340316{
    341     /*NSMutableString * string = [NSMutableString
     317    NSMutableString * string = [NSMutableString
    342318        stringWithCapacity: SHA_DIGEST_LENGTH];
    343319    int i;
     
    346322        [string appendFormat: @"%02x", fInfo->hash[i]];
    347323    }
    348     return string;*/
    349    
    350     return [NSString stringWithUTF8String: fInfo->hashString];
     324    return string;
    351325}
    352326
    353327- (NSString *) torrentLocation
    354328{
    355     return [NSString stringWithUTF8String: fInfo->torrent];
     329    return [NSString stringWithUTF8String: fInfo->torrent];;
    356330}
    357331
     
    514488
    515489    fLib = lib;
    516     fDefaults = [NSUserDefaults standardUserDefaults];
    517 
    518     fPrivateSaved = [fDefaults boolForKey: @"SavePrivateTorrent"];
    519490
    520491    int error;
    521     if (!path || !(fHandle = tr_torrentInit(fLib, [path UTF8String],
    522                     fPrivateSaved ? TR_FSAVEPRIVATE : 0, &error)))
     492    if (!path || !(fHandle = tr_torrentInit(fLib, [path UTF8String], &error)))
    523493    {
    524494        [self release];
     
    526496    }
    527497   
    528     return [self initForSuccessWithDate: date stopRatioSetting: stopRatioSetting ratioLimit: ratioLimit];
    529 }
    530 
    531 - (id) initWithHash: (NSString *) hashString lib: (tr_handle_t *) lib date: (NSDate *) date
    532         stopRatioSetting: (NSNumber *) stopRatioSetting ratioLimit: (NSNumber *) ratioLimit
    533 {
    534     if (!(self = [super init]))
    535         return nil;
    536 
    537     fLib = lib;
     498    fInfo = tr_torrentInfo( fHandle );
     499   
    538500    fDefaults = [NSUserDefaults standardUserDefaults];
    539    
    540     fPrivateSaved = YES;
    541 
    542     int error;
    543     if (!hashString || !(fHandle = tr_torrentInitSaved(fLib, [hashString UTF8String], TR_FSAVEPRIVATE, &error)))
    544     {
    545         [self release];
    546         return nil;
    547     }
    548    
    549     return [self initForSuccessWithDate: date stopRatioSetting: stopRatioSetting ratioLimit: ratioLimit];
    550 }
    551 
    552 - (id) initForSuccessWithDate: (NSDate *) date stopRatioSetting: (NSNumber *)
    553             stopRatioSetting ratioLimit: (NSNumber *) ratioLimit
    554 {
    555     fInfo = tr_torrentInfo( fHandle );
    556501
    557502    fDate = date ? [date retain] : [[NSDate alloc] init];
     
    573518    return self;
    574519}
    575 
    576520
    577521- (void) trashPath: (NSString *) path
Note: See TracChangeset for help on using the changeset viewer.