1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 14:13:23 +00:00

attempt to make the tracker table and buttons a bit nicer on Tiger

This commit is contained in:
Mitchell Livingston 2008-06-03 15:27:03 +00:00
parent 547056b50b
commit 9b4c88ee27
4 changed files with 28 additions and 15 deletions

2
NEWS
View file

@ -3,7 +3,7 @@ NEWS file for Transmission <http://www.transmissionbt.com/>
1.30 (2008/mm/dd) 1.30 (2008/mm/dd)
http://trac.transmissionbt.com/query?group=component&milestone=1.30&order=severity http://trac.transmissionbt.com/query?group=component&milestone=1.30&order=severity
- All Platforms - All Platforms
+ Ability to add and remove trackers to already-added transfers + Ability to add and remove tracker addresses
+ Creation of torrent files with no tracker address (for easier creation for upload to some tracker sites) + Creation of torrent files with no tracker address (for easier creation for upload to some tracker sites)
- Mac - Mac
+ Quick Look integration in the main window and inspector's file tab + Quick Look integration in the main window and inspector's file tab

View file

@ -58,8 +58,9 @@ GroupsWindowController * fGroupsWindowInstance = nil;
[[self window] setContentBorderThickness: [[fTableView enclosingScrollView] frame].origin.y forEdge: NSMinYEdge]; [[self window] setContentBorderThickness: [[fTableView enclosingScrollView] frame].origin.y forEdge: NSMinYEdge];
else else
{ {
[fAddRemoveControl setLabel: @"+" forSegment: 0]; [fAddRemoveControl sizeToFit];
[fAddRemoveControl setLabel: @"-" forSegment: 1]; [fAddRemoveControl setLabel: @"+" forSegment: ADD_TAG];
[fAddRemoveControl setLabel: @"-" forSegment: REMOVE_TAG];
} }
[fAddRemoveControl setEnabled: NO forSegment: REMOVE_TAG]; [fAddRemoveControl setEnabled: NO forSegment: REMOVE_TAG];

View file

@ -165,6 +165,12 @@ typedef enum
[[fPeerTable tableColumnWithIdentifier: @"DL From"] setHeaderToolTip: NSLocalizedString(@"Downloading From Peer", [[fPeerTable tableColumnWithIdentifier: @"DL From"] setHeaderToolTip: NSLocalizedString(@"Downloading From Peer",
"inspector -> peer table -> header tool tip")]; "inspector -> peer table -> header tool tip")];
} }
else
{
[fTrackerAddRemoveControl sizeToFit];
[fTrackerAddRemoveControl setLabel: @"+" forSegment: TRACKER_ADD_TAG];
[fTrackerAddRemoveControl setLabel: @"-" forSegment: TRACKER_REMOVE_TAG];
}
//set blank inspector //set blank inspector
[self setInfoForTorrents: [NSArray array]]; [self setInfoForTorrents: [NSArray array]];

View file

@ -23,6 +23,7 @@
*****************************************************************************/ *****************************************************************************/
#import "TrackerTableView.h" #import "TrackerTableView.h"
#import "NSApplicationAdditions.h"
@implementation TrackerTableView @implementation TrackerTableView
@ -50,25 +51,30 @@
if (rows.length > 0) if (rows.length > 0)
{ {
BOOL onLeopard = [NSApp isOnLeopardOrBetter];
//determine what the first row color should be //determine what the first row color should be
if (![[fTrackers objectAtIndex: rows.location] isKindOfClass: [NSNumber class]]) if (onLeopard)
{ {
for (i = rows.location-1; i>=0; i--) if (![[fTrackers objectAtIndex: rows.location] isKindOfClass: [NSNumber class]])
{ {
if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]]) for (i = rows.location-1; i>=0; i--)
break; {
start = !start; if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]])
break;
start = !start;
}
}
else
{
rows.location++;
rows.length--;
} }
}
else
{
rows.location++;
rows.length--;
} }
for (i = rows.location; i < NSMaxRange(rows); i++) for (i = rows.location; i < NSMaxRange(rows); i++)
{ {
if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]]) if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]] && onLeopard)
{ {
start = YES; start = YES;
continue; continue;