Changeset 2058


Ignore:
Timestamp:
Jun 13, 2007, 1:25:48 AM (15 years ago)
Author:
livings124
Message:

add tooltips to the check and priority columns in the file table

Location:
branches/file_selection/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/file_selection/macosx/FileOutlineView.m

    r2055 r2058  
    119119                float width = 14.0;
    120120                rect.origin.y += (rect.size.height - width) * 0.5;
    121                 rect.origin.x = 3.0;
     121                rect.origin.x += 3.0;
    122122                rect.size.width = width;
    123123                rect.size.height = width;
    124124               
    125                 NSBezierPath * circle = [NSBezierPath bezierPathWithOvalInRect: rect];
    126                 [circle fill];
     125                [[NSBezierPath bezierPathWithOvalInRect: rect] fill];
    127126            }
    128127        }
  • branches/file_selection/macosx/InfoWindowController.m

    r2053 r2058  
    928928    if ([ident isEqualToString: @"Name"])
    929929        return [[[fTorrents objectAtIndex: 0] downloadFolder] stringByAppendingPathComponent: [item objectForKey: @"Path"]];
     930    else if ([ident isEqualToString: @"Check"])
     931    {
     932        int check = [cell state];
     933        if (check == NSOffState)
     934            return NSLocalizedString(@"Don't Download", "Inspector -> files tab -> tooltip");
     935        else if (check == NSMixedState)
     936            return NSLocalizedString(@"Download Some", "Inspector -> files tab -> tooltip");
     937        else
     938            return NSLocalizedString(@"Download", "Inspector -> files tab -> tooltip");
     939    }
     940    else if ([ident isEqualToString: @"Priority"])
     941    {
     942        Torrent * torrent = [fTorrents objectAtIndex: 0];
     943        BOOL low = [torrent hasFilePriority: PRIORITY_LOW forItem: item],
     944            normal = [torrent hasFilePriority: PRIORITY_NORMAL forItem: item],
     945            high = [torrent hasFilePriority: PRIORITY_HIGH forItem: item];
     946       
     947        if (low && !normal && !high)
     948            return NSLocalizedString(@"Low Priority", "Inspector -> files tab -> tooltip");
     949        else if (!low && normal && !high)
     950            return NSLocalizedString(@"Normal Priority", "Inspector -> files tab -> tooltip");
     951        else if (!low && !normal && high)
     952            return NSLocalizedString(@"High Priority", "Inspector -> files tab -> tooltip");
     953        else
     954            return NSLocalizedString(@"Multiple Priorities", "Inspector -> files tab -> tooltip");
     955    }
    930956    else
    931957        return nil;
Note: See TracChangeset for help on using the changeset viewer.