mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
Potentially get rid of (unnoticeable) overlap in simple progress bar.
This commit is contained in:
parent
f954b45699
commit
24acb44310
2 changed files with 14 additions and 15 deletions
|
@ -41,26 +41,29 @@
|
|||
|
||||
- (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib
|
||||
{
|
||||
if ((self = [self initWithHash: nil path: path lib: lib
|
||||
privateTorrent: nil publicTorrent: nil
|
||||
date: nil stopRatioSetting: nil ratioLimit: nil]))
|
||||
self = [self initWithHash: nil path: path lib: lib
|
||||
privateTorrent: nil publicTorrent: nil
|
||||
date: nil stopRatioSetting: nil ratioLimit: nil];
|
||||
|
||||
if (self)
|
||||
{
|
||||
if (!fPublicTorrent)
|
||||
[self trashFile: path];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithHistory: (NSDictionary *) history lib: (tr_handle_t *) lib
|
||||
{
|
||||
if ((self = [self initWithHash: [history objectForKey: @"TorrentHash"]
|
||||
self = [self initWithHash: [history objectForKey: @"TorrentHash"]
|
||||
path: [history objectForKey: @"TorrentPath"] lib: lib
|
||||
privateTorrent: [history objectForKey: @"PrivateCopy"]
|
||||
publicTorrent: [history objectForKey: @"PublicCopy"]
|
||||
date: [history objectForKey: @"Date"]
|
||||
stopRatioSetting: [history objectForKey: @"StopRatioSetting"]
|
||||
ratioLimit: [history objectForKey: @"RatioLimit"]]))
|
||||
ratioLimit: [history objectForKey: @"RatioLimit"]];
|
||||
|
||||
if (self)
|
||||
{
|
||||
NSString * downloadFolder;
|
||||
if (!(downloadFolder = [history objectForKey: @"DownloadFolder"]))
|
||||
|
@ -72,7 +75,6 @@
|
|||
if (!(paused = [history objectForKey: @"Paused"]) || [paused isEqualToString: @"NO"])
|
||||
[self start];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -590,11 +592,8 @@
|
|||
{
|
||||
/* We can't move it to the trash, let's try just to delete it
|
||||
(will work if it is on a remote volume) */
|
||||
if( ![[NSFileManager defaultManager]
|
||||
removeFileAtPath: path handler: nil] )
|
||||
{
|
||||
NSLog( [@"Could not trash " stringByAppendingString: path] );
|
||||
}
|
||||
if (![[NSFileManager defaultManager] removeFileAtPath: path handler: nil])
|
||||
NSLog([@"Could not trash " stringByAppendingString: path]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
@interface TorrentCell (Private)
|
||||
|
||||
- (void) placeBar: (NSImage *) barImage width: (float) width point: (NSPoint) point;
|
||||
- (void) buildSimpleBar: (int) width point: (NSPoint) point;
|
||||
- (void) buildSimpleBar: (int) widthInt point: (NSPoint) point;
|
||||
- (void) buildAdvancedBar: (int) width point: (NSPoint) point;
|
||||
|
||||
@end
|
||||
|
@ -119,9 +119,9 @@ static uint32_t kRed = 0xFF6450FF, //255, 100, 80
|
|||
operation: NSCompositeSourceOver];
|
||||
}
|
||||
|
||||
- (void) buildSimpleBar: (int) width point: (NSPoint) point
|
||||
- (void) buildSimpleBar: (int) widthInt point: (NSPoint) point
|
||||
{
|
||||
width -= 2.0;
|
||||
float width = (float)widthInt - 2.0;
|
||||
if ([fTorrent isSeeding])
|
||||
{
|
||||
[fProgressEndGreen compositeToPoint: point operation: NSCompositeSourceOver];
|
||||
|
|
Loading…
Reference in a new issue