mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
instead of displaying a star for multiple priorities, display all relevant icons
This commit is contained in:
parent
c6e9e58e0c
commit
44a13d7803
4 changed files with 48 additions and 29 deletions
2
NEWS
2
NEWS
|
@ -1,5 +1,7 @@
|
||||||
=== Transmission 2.32 (2011/xx/yy) ===
|
=== Transmission 2.32 (2011/xx/yy) ===
|
||||||
[http://trac.transmissionbt.com/query?milestone=2.32&group=component&order=severity All tickets closed by this release]
|
[http://trac.transmissionbt.com/query?milestone=2.32&group=component&order=severity All tickets closed by this release]
|
||||||
|
==== Mac ====
|
||||||
|
* Lion stability fixes
|
||||||
==== GTK+ ====
|
==== GTK+ ====
|
||||||
* Remove GNOME desktop proxy support
|
* Remove GNOME desktop proxy support
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
A209EE5D1144B51E002B02D1 /* history.h in Headers */ = {isa = PBXBuildFile; fileRef = A209EE5B1144B51E002B02D1 /* history.h */; };
|
A209EE5D1144B51E002B02D1 /* history.h in Headers */ = {isa = PBXBuildFile; fileRef = A209EE5B1144B51E002B02D1 /* history.h */; };
|
||||||
A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */; };
|
A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */; };
|
||||||
A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F820C4D8A610034AB1D /* PriorityHigh.png */; };
|
A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F820C4D8A610034AB1D /* PriorityHigh.png */; };
|
||||||
A20B6F8C0C4D90980034AB1D /* PriorityMixed.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */; };
|
|
||||||
A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FA40C4D97840034AB1D /* PriorityNone.png */; };
|
A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FA40C4D97840034AB1D /* PriorityNone.png */; };
|
||||||
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */; };
|
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */; };
|
||||||
A20BFFB70D091CC700CE5D2B /* ToolbarSegmentedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A20BFFB60D091CC700CE5D2B /* ToolbarSegmentedCell.m */; };
|
A20BFFB70D091CC700CE5D2B /* ToolbarSegmentedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A20BFFB60D091CC700CE5D2B /* ToolbarSegmentedCell.m */; };
|
||||||
|
@ -568,7 +567,6 @@
|
||||||
A209EE5B1144B51E002B02D1 /* history.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = history.h; path = libtransmission/history.h; sourceTree = "<group>"; };
|
A209EE5B1144B51E002B02D1 /* history.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = history.h; path = libtransmission/history.h; sourceTree = "<group>"; };
|
||||||
A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityLow.png; path = macosx/Images/PriorityLow.png; sourceTree = "<group>"; };
|
A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityLow.png; path = macosx/Images/PriorityLow.png; sourceTree = "<group>"; };
|
||||||
A20B6F820C4D8A610034AB1D /* PriorityHigh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityHigh.png; path = macosx/Images/PriorityHigh.png; sourceTree = "<group>"; };
|
A20B6F820C4D8A610034AB1D /* PriorityHigh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityHigh.png; path = macosx/Images/PriorityHigh.png; sourceTree = "<group>"; };
|
||||||
A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityMixed.png; path = macosx/Images/PriorityMixed.png; sourceTree = "<group>"; };
|
|
||||||
A20B6FA40C4D97840034AB1D /* PriorityNone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNone.png; path = macosx/Images/PriorityNone.png; sourceTree = "<group>"; };
|
A20B6FA40C4D97840034AB1D /* PriorityNone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNone.png; path = macosx/Images/PriorityNone.png; sourceTree = "<group>"; };
|
||||||
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNormal.png; path = macosx/Images/PriorityNormal.png; sourceTree = "<group>"; };
|
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNormal.png; path = macosx/Images/PriorityNormal.png; sourceTree = "<group>"; };
|
||||||
A20BFFB50D091CC700CE5D2B /* ToolbarSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ToolbarSegmentedCell.h; path = macosx/ToolbarSegmentedCell.h; sourceTree = "<group>"; };
|
A20BFFB50D091CC700CE5D2B /* ToolbarSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ToolbarSegmentedCell.h; path = macosx/ToolbarSegmentedCell.h; sourceTree = "<group>"; };
|
||||||
|
@ -1220,7 +1218,6 @@
|
||||||
A209EBD81142F52B002B02D1 /* InfoFileView.xib */,
|
A209EBD81142F52B002B02D1 /* InfoFileView.xib */,
|
||||||
A209EC11114301C6002B02D1 /* InfoOptionsView.xib */,
|
A209EC11114301C6002B02D1 /* InfoOptionsView.xib */,
|
||||||
A20B6FA40C4D97840034AB1D /* PriorityNone.png */,
|
A20B6FA40C4D97840034AB1D /* PriorityNone.png */,
|
||||||
A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */,
|
|
||||||
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */,
|
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */,
|
||||||
A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */,
|
A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */,
|
||||||
A20B6F820C4D8A610034AB1D /* PriorityHigh.png */,
|
A20B6F820C4D8A610034AB1D /* PriorityHigh.png */,
|
||||||
|
@ -2045,7 +2042,6 @@
|
||||||
A2F011990C27418800576FC0 /* CreateLarge.png in Resources */,
|
A2F011990C27418800576FC0 /* CreateLarge.png in Resources */,
|
||||||
A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */,
|
A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */,
|
||||||
A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */,
|
A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */,
|
||||||
A20B6F8C0C4D90980034AB1D /* PriorityMixed.png in Resources */,
|
|
||||||
A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */,
|
A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */,
|
||||||
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */,
|
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */,
|
||||||
A277DA0B0C693D9C00DA2CD4 /* ActionOn.png in Resources */,
|
A277DA0B0C693D9C00DA2CD4 /* ActionOn.png in Resources */,
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#import "NSApplicationAdditions.h"
|
#import "NSApplicationAdditions.h"
|
||||||
#import "Torrent.h"
|
#import "Torrent.h"
|
||||||
|
|
||||||
|
#define IMAGE_OVERLAP 3.0
|
||||||
|
|
||||||
@implementation FilePriorityCell
|
@implementation FilePriorityCell
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
|
@ -123,40 +125,59 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSImage * image;
|
NSMutableArray * images = [NSMutableArray arrayWithCapacity: MAX(count, 1)];
|
||||||
|
CGFloat totalWidth;
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
image = [NSImage imageNamed: @"PriorityNone.png"];
|
{
|
||||||
else if (count > 1)
|
NSImage * image = [NSImage imageNamed: @"PriorityNone.png"];
|
||||||
image = [NSImage imageNamed: @"PriorityMixed.png"];
|
[images addObject: image];
|
||||||
|
totalWidth = [image size].width;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch ([[priorities anyObject] integerValue])
|
totalWidth = 0.0;
|
||||||
|
if ([priorities containsObject: [NSNumber numberWithInteger: TR_PRI_LOW]])
|
||||||
{
|
{
|
||||||
case TR_PRI_NORMAL:
|
NSImage * image = [NSImage imageNamed: @"PriorityLow.png"];
|
||||||
image = [NSImage imageNamed: @"PriorityNormal.png"];
|
[images addObject: image];
|
||||||
break;
|
totalWidth += [image size].width;
|
||||||
case TR_PRI_LOW:
|
}
|
||||||
image = [NSImage imageNamed: @"PriorityLow.png"];
|
if ([priorities containsObject: [NSNumber numberWithInteger: TR_PRI_NORMAL]])
|
||||||
break;
|
{
|
||||||
case TR_PRI_HIGH:
|
NSImage * image = [NSImage imageNamed: @"PriorityNormal.png"];
|
||||||
image = [NSImage imageNamed: @"PriorityHigh.png"];
|
[images addObject: image];
|
||||||
break;
|
totalWidth += [image size].width;
|
||||||
|
}
|
||||||
|
if ([priorities containsObject: [NSNumber numberWithInteger: TR_PRI_HIGH]])
|
||||||
|
{
|
||||||
|
NSImage * image = [NSImage imageNamed: @"PriorityHigh.png"];
|
||||||
|
[images addObject: image];
|
||||||
|
totalWidth += [image size].width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NSSize imageSize = [image size];
|
if (count > 1)
|
||||||
NSRect imageRect = NSMakeRect(NSMidX(cellFrame) - imageSize.width * 0.5, NSMidY(cellFrame) - imageSize.height * 0.5,
|
totalWidth -= IMAGE_OVERLAP * (count-1);
|
||||||
imageSize.width, imageSize.height);
|
|
||||||
|
|
||||||
if ([NSApp isOnSnowLeopardOrBetter])
|
CGFloat currentWidth = floor(NSMidX(cellFrame) - totalWidth * 0.5);
|
||||||
[image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0
|
|
||||||
respectFlipped: YES hints: nil];
|
for (NSImage * image in images)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
image = [image copy];
|
const NSSize imageSize = [image size];
|
||||||
[image setFlipped: YES];
|
NSRect imageRect = NSMakeRect(currentWidth, floor(NSMidY(cellFrame) - imageSize.height * 0.5), imageSize.width, imageSize.height);
|
||||||
[image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
|
|
||||||
[image release];
|
if ([NSApp isOnSnowLeopardOrBetter])
|
||||||
|
[image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
image = [image copy];
|
||||||
|
[image setFlipped: YES];
|
||||||
|
[image drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
|
||||||
|
[image release];
|
||||||
|
}
|
||||||
|
|
||||||
|
currentWidth += imageSize.width - IMAGE_OVERLAP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 299 B |
Loading…
Reference in a new issue