mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
images for priorities, courtesy of BigBossman
This commit is contained in:
@@ -71,6 +71,7 @@ Daniel Nylander
|
||||
Jaakko Huhtala
|
||||
+ Finnish GTK+ translation
|
||||
|
||||
|
||||
Thanks to:
|
||||
|
||||
Hugo van Heuven, madebysofa
|
||||
@@ -104,6 +105,9 @@ Martin Stadtmueller
|
||||
FOOOD
|
||||
+ Various images
|
||||
|
||||
George Tsotsos
|
||||
+ Various images
|
||||
|
||||
Nick Pucius
|
||||
+ Mac OS X Help documentation
|
||||
|
||||
|
||||
@@ -52,6 +52,11 @@
|
||||
A200B9200A22798F007BBB1E /* InfoWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A200B83A0A2263BA007BBB1E /* InfoWindowController.m */; };
|
||||
A200B9B60A22893D007BBB1E /* InfoWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = A200B9620A227FD0007BBB1E /* InfoWindow.nib */; };
|
||||
A20AB97B0A5C622A004F81FA /* SmallTurtle.png in Resources */ = {isa = PBXBuildFile; fileRef = A20AB97A0A5C622A004F81FA /* SmallTurtle.png */; };
|
||||
A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6F6A0C4D842B0034AB1D /* PriorityLow.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 */; };
|
||||
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */; };
|
||||
A21567ED0A9A5034004DECD6 /* MessageWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = A21567EB0A9A5034004DECD6 /* MessageWindow.nib */; };
|
||||
A215760B0C0D449A0057A26A /* BezierPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A21576090C0D449A0057A26A /* BezierPathAdditions.m */; };
|
||||
A2173E1C0A33C1B300B0D8AB /* ActionButtonPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = A2173E1B0A33C1B300B0D8AB /* ActionButtonPressed.png */; };
|
||||
@@ -329,6 +334,11 @@
|
||||
A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
|
||||
A200B9630A227FD0007BBB1E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/InfoWindow.nib; sourceTree = "<group>"; };
|
||||
A20AB97A0A5C622A004F81FA /* SmallTurtle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SmallTurtle.png; path = macosx/Images/SmallTurtle.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>"; };
|
||||
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>"; };
|
||||
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityNormal.png; path = macosx/Images/PriorityNormal.png; sourceTree = "<group>"; };
|
||||
A21567EC0A9A5034004DECD6 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/MessageWindow.nib; sourceTree = "<group>"; };
|
||||
A21576090C0D449A0057A26A /* BezierPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = BezierPathAdditions.m; path = macosx/BezierPathAdditions.m; sourceTree = "<group>"; };
|
||||
A215760A0C0D449A0057A26A /* BezierPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BezierPathAdditions.h; path = macosx/BezierPathAdditions.h; sourceTree = "<group>"; };
|
||||
@@ -666,6 +676,11 @@
|
||||
A22A8D540AEEAFA5007E9CB9 /* Localizable.strings */,
|
||||
A259316A0A73B2CC002F4FE7 /* Transmission Help */,
|
||||
A2F8951E0A2D4BA500ED2127 /* Credits.rtf */,
|
||||
A20B6FA40C4D97840034AB1D /* PriorityNone.png */,
|
||||
A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */,
|
||||
A20B6FAD0C4D9B040034AB1D /* PriorityNormal.png */,
|
||||
A20B6F6A0C4D842B0034AB1D /* PriorityLow.png */,
|
||||
A20B6F820C4D8A610034AB1D /* PriorityHigh.png */,
|
||||
A2FB06950BFF484A0095564D /* Globe.png */,
|
||||
A260C9AB0AA3B8D700FDC1B7 /* Error.tiff */,
|
||||
A29C8B320ACC6E93000ED9F9 /* YellowDot.tiff */,
|
||||
@@ -1189,6 +1204,11 @@
|
||||
A2DF377C0C222E2D006523C1 /* Creator.nib in Resources */,
|
||||
A2E9AA760C249AF400085DCF /* Create.png in Resources */,
|
||||
A2F011990C27418800576FC0 /* CreateLarge.png in Resources */,
|
||||
A20B6F6B0C4D842B0034AB1D /* PriorityLow.png in Resources */,
|
||||
A20B6F830C4D8A610034AB1D /* PriorityHigh.png in Resources */,
|
||||
A20B6F8C0C4D90980034AB1D /* PriorityMixed.png in Resources */,
|
||||
A20B6FA50C4D97840034AB1D /* PriorityNone.png in Resources */,
|
||||
A20B6FAE0C4D9B040034AB1D /* PriorityNormal.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -32,6 +32,8 @@ static int charToInt( char character )
|
||||
int value;
|
||||
if( character >= 'A' && character <= 'Z' )
|
||||
value = 10 + character - 'A';
|
||||
else if( character >= 'a' && character <= 'z')
|
||||
value = 36 + character - 'a';
|
||||
else
|
||||
value = character - '0';
|
||||
|
||||
|
||||
+4
-1
@@ -1,7 +1,6 @@
|
||||
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
|
||||
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\vieww9000\viewh8400\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
||||
|
||||
\f0\fs24 \cf0 Transmission is written and maintained by:\
|
||||
@@ -76,6 +75,7 @@ Daniel Nylander\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
||||
\cf0 + Finnish GTK+ translation\
|
||||
\
|
||||
\
|
||||
Thanks to:\
|
||||
\
|
||||
Hugo van Heuven, madebysofa\
|
||||
@@ -109,6 +109,9 @@ Martin Stadtmueller\
|
||||
FOOOD\
|
||||
+ Various images\
|
||||
\
|
||||
George Tsotsos\
|
||||
+ Various images\
|
||||
\
|
||||
Nick Pucius\
|
||||
+ Mac OS X Help documentation\
|
||||
\
|
||||
|
||||
Binary file not shown.
@@ -134,44 +134,4 @@
|
||||
[super drawRow: row clipRect: clipRect];
|
||||
}
|
||||
|
||||
- (void) drawRect: (NSRect) r
|
||||
{
|
||||
[super drawRect: r];
|
||||
|
||||
NSDictionary * item;
|
||||
NSIndexSet * indexSet;
|
||||
int i, count, priority;
|
||||
Torrent * torrent = [(InfoWindowController *)[[self window] windowController] selectedTorrent];
|
||||
for (i = 0; i < [self numberOfRows]; i++)
|
||||
{
|
||||
if ([self isRowSelected: i])
|
||||
{
|
||||
item = [self itemAtRow: i];
|
||||
if ([[item objectForKey: @"IsFolder"] boolValue])
|
||||
continue;
|
||||
|
||||
NSSet * priorities = [torrent filePrioritiesForIndexes: [item objectForKey: @"Indexes"]];
|
||||
if ([priorities count] != 1)
|
||||
continue;
|
||||
|
||||
priority = [[priorities anyObject] intValue];
|
||||
if (priority == TR_PRI_LOW)
|
||||
[fLowPriorityColor set];
|
||||
else if (priority == TR_PRI_HIGH)
|
||||
[fHighPriorityColor set];
|
||||
else
|
||||
continue;
|
||||
|
||||
NSRect rect = [self rectOfRow: i];
|
||||
float width = 14.0;
|
||||
rect.origin.y += (rect.size.height - width) * 0.5;
|
||||
rect.origin.x += 3.0;
|
||||
rect.size.width = width;
|
||||
rect.size.height = width;
|
||||
|
||||
[[NSBezierPath bezierPathWithOvalInRect: rect] fill];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
@interface FilePriorityCell : NSSegmentedCell
|
||||
{
|
||||
NSMutableDictionary * fItem;
|
||||
|
||||
NSImage * fLowImage, * fHighImage, * fNormalImage, * fMixedImage, * fNoneImage;
|
||||
}
|
||||
|
||||
- (void) setItem: (NSMutableDictionary *) item;
|
||||
|
||||
+38
-31
@@ -53,48 +53,55 @@
|
||||
NSSet * priorities = [torrent filePrioritiesForIndexes: [fItem objectForKey: @"Indexes"]];
|
||||
|
||||
int count = [priorities count];
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
BOOL low = [priorities containsObject: [NSNumber numberWithInt: TR_PRI_LOW]],
|
||||
normal = [priorities containsObject: [NSNumber numberWithInt: TR_PRI_NORMAL]],
|
||||
high = [priorities containsObject: [NSNumber numberWithInt: TR_PRI_HIGH]];
|
||||
|
||||
FileOutlineView * view = (FileOutlineView *)[self controlView];
|
||||
int row = [view hoverRow];
|
||||
if (row != -1 && [view itemAtRow: row] == fItem)
|
||||
if (count > 0 && row != -1 && [view itemAtRow: row] == fItem)
|
||||
{
|
||||
[super setSelected: low forSegment: 0];
|
||||
[super setSelected: normal forSegment: 1];
|
||||
[super setSelected: high forSegment: 2];
|
||||
[super setSelected: [priorities containsObject: [NSNumber numberWithInt: TR_PRI_LOW]] forSegment: 0];
|
||||
[super setSelected: [priorities containsObject: [NSNumber numberWithInt: TR_PRI_NORMAL]] forSegment: 1];
|
||||
[super setSelected: [priorities containsObject: [NSNumber numberWithInt: TR_PRI_HIGH]] forSegment: 2];
|
||||
|
||||
[super drawWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (high || low)
|
||||
NSImage * image;
|
||||
if (count == 0)
|
||||
{
|
||||
BOOL highlighted = [self isHighlighted] && [[self highlightColorWithFrame: cellFrame inView: controlView]
|
||||
isEqual: [NSColor alternateSelectedControlColor]];
|
||||
NSDictionary * attributes = [[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
highlighted ? [NSColor whiteColor] : [NSColor controlTextColor], NSForegroundColorAttributeName,
|
||||
[NSFont messageFontOfSize: 18.0], NSFontAttributeName, nil];
|
||||
|
||||
NSString * text;
|
||||
if (count > 1)
|
||||
text = @"*";
|
||||
else if (low)
|
||||
text = @"-";
|
||||
else
|
||||
text = @"+";
|
||||
|
||||
NSSize textSize = [text sizeWithAttributes: attributes];
|
||||
NSRect textRect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - textSize.width) * 0.5,
|
||||
cellFrame.origin.y + (cellFrame.size.height - textSize.height) * 0.5,
|
||||
textSize.width, textSize.height);
|
||||
|
||||
[text drawInRect: textRect withAttributes: attributes];
|
||||
if (!fNoneImage)
|
||||
fNoneImage = [NSImage imageNamed: @"PriorityNone.png"];
|
||||
image = fNoneImage;
|
||||
}
|
||||
else if (count > 1)
|
||||
{
|
||||
if (!fMixedImage)
|
||||
fMixedImage = [NSImage imageNamed: @"PriorityMixed.png"];
|
||||
image = fMixedImage;
|
||||
}
|
||||
|
||||
else if ([priorities containsObject: [NSNumber numberWithInt: TR_PRI_NORMAL]])
|
||||
{
|
||||
if (!fNormalImage)
|
||||
fNormalImage = [NSImage imageNamed: @"PriorityNormal.png"];
|
||||
image = fNormalImage;
|
||||
}
|
||||
else if ([priorities containsObject: [NSNumber numberWithInt: TR_PRI_LOW]])
|
||||
{
|
||||
if (!fLowImage)
|
||||
fLowImage = [NSImage imageNamed: @"PriorityLow.png"];
|
||||
image = fLowImage;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!fHighImage)
|
||||
fHighImage = [NSImage imageNamed: @"PriorityHigh.png"];
|
||||
image = fHighImage;
|
||||
}
|
||||
|
||||
NSSize imageSize = [image size];
|
||||
[image compositeToPoint: NSMakePoint(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
|
||||
cellFrame.origin.y + (cellFrame.size.height + imageSize.height) * 0.5) operation: NSCompositeSourceOver];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -277,6 +277,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
if ([[NSFileManager defaultManager] movePath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]
|
||||
toPath: [fDownloadFolder stringByAppendingPathComponent: [self name]] handler: nil])
|
||||
[self updateDownloadFolder];
|
||||
else
|
||||
canMove = NO;
|
||||
|
||||
[self updateSpeedSetting];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user