mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
trivial Torrent code cleanup
This commit is contained in:
parent
baeca52eed
commit
624d54d281
1 changed files with 5 additions and 13 deletions
|
@ -186,22 +186,16 @@ static int static_lastid = 0;
|
||||||
- (void) changeIncompleteDownloadFolder: (NSString *) folder
|
- (void) changeIncompleteDownloadFolder: (NSString *) folder
|
||||||
{
|
{
|
||||||
fUseIncompleteFolder = folder != nil;
|
fUseIncompleteFolder = folder != nil;
|
||||||
if (fIncompleteFolder)
|
|
||||||
{
|
|
||||||
[fIncompleteFolder release];
|
|
||||||
fIncompleteFolder = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (folder)
|
[fIncompleteFolder release];
|
||||||
fIncompleteFolder = [folder retain];
|
fIncompleteFolder = fUseIncompleteFolder ? [folder retain] : nil;
|
||||||
|
|
||||||
[self updateDownloadFolder];
|
[self updateDownloadFolder];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) changeDownloadFolder: (NSString *) folder
|
- (void) changeDownloadFolder: (NSString *) folder
|
||||||
{
|
{
|
||||||
if (fDownloadFolder)
|
[fDownloadFolder release];
|
||||||
[fDownloadFolder release];
|
|
||||||
fDownloadFolder = [folder retain];
|
fDownloadFolder = [folder retain];
|
||||||
|
|
||||||
[self updateDownloadFolder];
|
[self updateDownloadFolder];
|
||||||
|
@ -255,8 +249,7 @@ static int static_lastid = 0;
|
||||||
fIncompleteFolder = nil;
|
fIncompleteFolder = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fDateCompleted)
|
[fDateCompleted release];
|
||||||
[fDateCompleted release];
|
|
||||||
fDateCompleted = [[NSDate alloc] init];
|
fDateCompleted = [[NSDate alloc] init];
|
||||||
|
|
||||||
fStat = tr_torrentStat(fHandle);
|
fStat = tr_torrentStat(fHandle);
|
||||||
|
@ -322,8 +315,7 @@ static int static_lastid = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TR_STATUS_CHECK_WAIT:
|
case TR_STATUS_CHECK_WAIT:
|
||||||
tempString = [NSLocalizedString(@"Waiting to check existing data", "Torrent -> status string")
|
tempString = [NSLocalizedString(@"Waiting to check existing data", "Torrent -> status string") stringByAppendingEllipsis];
|
||||||
stringByAppendingEllipsis];
|
|
||||||
|
|
||||||
[statusString setString: tempString];
|
[statusString setString: tempString];
|
||||||
[shortStatusString setString: tempString];
|
[shortStatusString setString: tempString];
|
||||||
|
|
Loading…
Reference in a new issue