~ubuntu-branches/ubuntu/jaunty/transmission/jaunty-security

« back to all changes in this revision

Viewing changes to macosx/FilePriorityCell.m

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2008-11-28 15:33:48 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20081128153348-it70trfnxiroblmc
Tags: 1.40-0ubuntu1
* New upstream release (LP: #302672)
  - Tracker communication uses fewer resources
  - More accurate bandwidth limits
  - Reduce disk fragmentation by preallocating files (LP: #287726)
  - Stability, security and performance improvements to the RPC /
    Web UI server (closes LP: #290423)
  - Support compression when serving Web UI and RPC responses
  - Simplify the RPC whitelist
  - Fix bug that prevented handshakes with encrypted BitComet peers
  - Fix 1.3x bug that could re-download some data unnecessarily
    (LP: #295040)
  - Option to automatically update the blocklist weekly
  - Added off-hour bandwidth scheduling
  - Simplify file/priority selection in the details dialog
  - Fix a couple of crashes
  - New / updated translations
  - Don't inhibit hibernation by default (LP: #292929)
  - Use "close" animation when sending to notification area (LP: #130811)
  - Fix resize problems (LP: #269872)
  - Support "--version" option when launching from command line
    (LP: #292011)
  - Correctly parse announce URLs that have leading or trailing
    spaces (LP: #262411)
  - Display an error when "Open Torrent" fails (LP: #281463)
* Dropped 10_fix_crasher_from_upstream.dpatch: Fix is in this
  upstream release.
* debian/control: Don't just build-depend on libcurl-dev, which is
  a virtual package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: FilePriorityCell.m 5904 2008-05-22 18:39:49Z livings124 $
 
2
 * $Id: FilePriorityCell.m 7007 2008-11-01 15:22:32Z livings124 $
3
3
 * 
4
4
 * Copyright (c) 2007-2008 Transmission authors and contributors
5
5
 *
37
37
        [self setControlSize: NSMiniControlSize];
38
38
        [self setSegmentCount: 3];
39
39
        
40
 
        int i;
41
 
        for (i = 0; i < [self segmentCount]; i++)
 
40
        for (NSInteger i = 0; i < [self segmentCount]; i++)
42
41
        {
43
42
            [self setLabel: @"" forSegment: i];
44
 
            [self setWidth: 9.0 forSegment: i]; //9 is minimum size to get proper look
 
43
            [self setWidth: 9.0f forSegment: i]; //9 is minimum size to get proper look
45
44
        }
46
45
        
47
46
        [self setImage: [NSImage imageNamed: @"PriorityControlLow.png"] forSegment: 0];
53
52
    return self;
54
53
}
55
54
 
56
 
- (void) setSelected: (BOOL) flag forSegment: (int) segment
 
55
- (void) setSelected: (BOOL) flag forSegment: (NSInteger) segment
57
56
{
58
57
    [super setSelected: flag forSegment: segment];
59
58
    
60
59
    //only for when clicking manually
61
 
    int priority;
 
60
    NSInteger priority;
62
61
    switch (segment)
63
62
    {
64
63
        case 0:
105
104
    FileListNode * node = [self representedObject];
106
105
    NSSet * priorities = [torrent filePrioritiesForIndexes: [node indexes]];
107
106
    
108
 
    int count = [priorities count];
 
107
    const NSUInteger count = [priorities count];
109
108
    if (fHoverRow && count > 0)
110
109
    {
111
110
        [super setSelected: [priorities containsObject: [NSNumber numberWithInt: TR_PRI_LOW]] forSegment: 0];
138
137
        }
139
138
        
140
139
        NSSize imageSize = [image size];
141
 
        [image compositeToPoint: NSMakePoint(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
142
 
                cellFrame.origin.y + (cellFrame.size.height + imageSize.height) * 0.5) operation: NSCompositeSourceOver];
 
140
        [image compositeToPoint: NSMakePoint(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5f,
 
141
                cellFrame.origin.y + (cellFrame.size.height + imageSize.height) * 0.5f) operation: NSCompositeSourceOver];
143
142
    }
144
143
}
145
144