if there is no error message but an error, simply state "Error", and small change with a mutable status string

This commit is contained in:
Mitchell Livingston 2007-08-20 19:49:36 +00:00
parent 6423d795c6
commit df1dce9b2a
1 changed files with 8 additions and 3 deletions

View File

@ -419,11 +419,16 @@ static int static_lastid = 0;
//create strings for error or stalled
if (fError)
[statusString setString: [NSLocalizedString(@"Error: ", "Torrent -> status string")
{
NSString * errorString = [self errorMessage];
if (!errorString || [errorString isEqualToString: @""])
[statusString setString: NSLocalizedString(@"Error", "Torrent -> status string")];
else
[statusString setString: [NSLocalizedString(@"Error: ", "Torrent -> status string")
stringByAppendingString: [self errorMessage]]];
}
else if (fStalled)
[statusString setString: [NSLocalizedString(@"Stalled, ", "Torrent -> status string")
stringByAppendingString: statusString]];
[statusString insertString: NSLocalizedString(@"Stalled, ", "Torrent -> status string") atIndex: 0];
else;
//update queue for checking (from downloading to seeding), stalled, or error