From: Mitchell Livingston Date: Fri, 5 Aug 2011 03:11:22 +0000 (+0000) Subject: change the (temporary) name at the cell level, not the torrent level X-Git-Tag: 2.40b1~279 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9386563e5eec5231be2ea3e1c5c5940ec638b53f;p=transmission change the (temporary) name at the cell level, not the torrent level --- diff --git a/macosx/Torrent.h b/macosx/Torrent.h index 5999cd650..afa0fc647 100644 --- a/macosx/Torrent.h +++ b/macosx/Torrent.h @@ -127,6 +127,7 @@ - (NSImage *) icon; - (NSString *) name; +- (NSInteger) queuePosition; - (BOOL) isFolder; - (uint64_t) size; - (uint64_t) sizeLeft; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 9788b5fa6..2d8911b1e 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -614,8 +614,13 @@ int trashDataFile(const char * filename) - (NSString *) name { - return [NSString stringWithFormat: @"%d %@", fStat->queuePosition, fInfo->name != NULL ? [NSString stringWithUTF8String: fInfo->name] : fHashString]; - //return fInfo->name != NULL ? [NSString stringWithUTF8String: fInfo->name] : fHashString; + return fInfo->name != NULL ? [NSString stringWithUTF8String: fInfo->name] : fHashString; +} + +#warning remove +- (NSInteger) queuePosition +{ + return fStat->queuePosition; } - (BOOL) isFolder diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 90937b6fe..51e71f710 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -806,7 +806,8 @@ - (NSAttributedString *) attributedTitle { - NSString * title = [[self representedObject] name]; + NSString * title = [NSString stringWithFormat: @"%d %@", [[self representedObject] queuePosition], [[self representedObject] name]]; + //NSString * title = [[self representedObject] name]; return [[[NSAttributedString alloc] initWithString: title attributes: fTitleAttributes] autorelease]; }