Changeset 6215


Ignore:
Timestamp:
Jun 17, 2008, 5:17:15 PM (15 years ago)
Author:
livings124
Message:

some cleaning

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/PrefsWindow.xib

    r6178 r6215  
    99                <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
    1010                        <bool key="EncodedWithXMLCoder">YES</bool>
     11                        <integer value="1481"/>
    1112                        <integer value="66"/>
    12                         <integer value="1481"/>
    1313                </object>
    1414                <object class="NSArray" key="IBDocument.PluginDependencies">
     
    35453545                        </object>
    35463546                        <object class="NSUserDefaultsController" id="356871564">
     3547                                <object class="NSMutableArray" key="NSDeclaredKeys">
     3548                                        <bool key="EncodedWithXMLCoder">YES</bool>
     3549                                        <string>Proxy</string>
     3550                                </object>
    35473551                                <bool key="NSSharedInstance">YES</bool>
    35483552                        </object>
     
    59215925                                        </object>
    59225926                                        <int key="connectionID">1674</int>
     5927                                </object>
     5928                                <object class="IBConnectionRecord">
     5929                                        <object class="IBBindingConnection" key="connection">
     5930                                                <string key="label">textColor: values</string>
     5931                                                <reference key="source" ref="257109686"/>
     5932                                                <reference key="destination" ref="356871564"/>
     5933                                                <object class="NSNibBindingConnector" key="connector">
     5934                                                        <reference key="NSSource" ref="257109686"/>
     5935                                                        <reference key="NSDestination" ref="356871564"/>
     5936                                                        <string key="NSLabel">textColor: values</string>
     5937                                                        <string key="NSBinding">textColor</string>
     5938                                                        <string key="NSKeyPath">values</string>
     5939                                                        <object class="NSDictionary" key="NSOptions">
     5940                                                                <string key="NS.key.0">NSValueTransformerName</string>
     5941                                                                <string key="NS.object.0">ControlTextTransformer</string>
     5942                                                        </object>
     5943                                                        <int key="NSNibBindingConnectorVersion">2</int>
     5944                                                </object>
     5945                                        </object>
     5946                                        <int key="connectionID">1680</int>
    59235947                                </object>
    59245948                        </object>
     
    89758999                        </object>
    89769000                        <nil key="sourceID"/>
    8977                         <int key="maxID">1674</int>
     9001                        <int key="maxID">1685</int>
    89789002                </object>
    89799003                <object class="IBClassDescriber" key="IBDocument.Classes">
  • trunk/macosx/PiecesView.m

    r6130 r6215  
    4242- (void) awakeFromNib
    4343{
    44         //back image
    45         fBack = [[NSImage alloc] initWithSize: [self bounds].size];
    46        
    47         [fBack lockFocus];
    48         CTGradient * gradient = [CTGradient gradientWithBeginningColor: [NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4]
    49                                     endingColor: [NSColor colorWithCalibratedWhite: 0.2 alpha: 0.4]];
    50         [gradient fillRect: [self bounds] angle: 90.0];
    51         [fBack unlockFocus];
    52        
    53         //store box colors
    54         fGreenAvailabilityColor = [[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] retain];
    55         fBluePieceColor = [[NSColor colorWithCalibratedRed: 0.0 green: 0.4 blue: 0.8 alpha: 1.0] retain];
    56                
    57         //actually draw the box
    58         [self setTorrent: nil];
     44    //back image
     45    fBack = [[NSImage alloc] initWithSize: [self bounds].size];
     46   
     47    [fBack lockFocus];
     48    CTGradient * gradient = [CTGradient gradientWithBeginningColor: [NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4]
     49                                endingColor: [NSColor colorWithCalibratedWhite: 0.2 alpha: 0.4]];
     50    [gradient fillRect: [self bounds] angle: 90.0];
     51    [fBack unlockFocus];
     52   
     53    //store box colors
     54    fGreenAvailabilityColor = [[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] retain];
     55    fBluePieceColor = [[NSColor colorWithCalibratedRed: 0.0 green: 0.4 blue: 0.8 alpha: 1.0] retain];
     56           
     57    //actually draw the box
     58    [self setTorrent: nil];
    5959}
    6060
  • trunk/macosx/PrefsController.m

    r6208 r6215  
    689689- (void) setProxyEnabled: (id) sender
    690690{
    691     BOOL enable = [fDefaults boolForKey: @"Proxy"];
    692691    tr_sessionSetProxyEnabled(fHandle, [fDefaults boolForKey: @"Proxy"]);
    693692}
  • trunk/macosx/Torrent.m

    r6209 r6215  
    416416- (void) setMaxPeerConnect: (uint16_t) count
    417417{
    418     if (count > 0)
    419         tr_torrentSetPeerLimit(fHandle, count);
     418    NSAssert(count > 0, @"max peer count must be greater than 0");
     419   
     420    tr_torrentSetPeerLimit(fHandle, count);
    420421}
    421422
  • trunk/macosx/TorrentTableView.m

    r6133 r6215  
    530530    unichar firstChar = [[event charactersIgnoringModifiers] characterAtIndex: 0];
    531531   
    532     if (firstChar == 'f' && [event modifierFlags] & NSAlternateKeyMask
    533         && [event modifierFlags] & NSCommandKeyMask)
     532    if (firstChar == 'f' && [event modifierFlags] & NSAlternateKeyMask && [event modifierFlags] & NSCommandKeyMask)
    534533        [fController focusFilterField];
    535534    else
Note: See TracChangeset for help on using the changeset viewer.