Changeset 9812


Ignore:
Timestamp:
Dec 23, 2009, 2:02:11 AM (13 years ago)
Author:
livings124
Message:

small code nudges here and there

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AboutWindowController.m

    r9003 r9812  
    4848   
    4949    //size license button
    50     CGFloat oldButtonWidth = [fLicenseButton frame].size.width;
     50    const CGFloat oldButtonWidth = [fLicenseButton frame].size.width;
    5151   
    5252    [fLicenseButton setTitle: NSLocalizedString(@"License", "About window -> license button")];
     
    5454   
    5555    NSRect buttonFrame = [fLicenseButton frame];
    56     buttonFrame.size.width += 10.0f;
    57     buttonFrame.origin.x -= buttonFrame.size.width - oldButtonWidth;
     56    buttonFrame.size.width += 10.0;
     57    buttonFrame.origin.x -= NSWidth(buttonFrame) - oldButtonWidth;
    5858    [fLicenseButton setFrame: buttonFrame];
    5959}
  • trunk/macosx/BlocklistDownloaderViewController.m

    r9316 r9812  
    4848    [fButton setTitle: NSLocalizedString(@"Cancel", "Blocklist -> cancel button")];
    4949   
    50     const CGFloat oldWidth = [fButton frame].size.width;
     50    const CGFloat oldWidth = NSWidth([fButton frame]);
    5151    [fButton sizeToFit];
    5252    NSRect buttonFrame = [fButton frame];
    53     buttonFrame.size.width += 12.0f; //sizeToFit sizes a bit too small
    54     buttonFrame.origin.x -= buttonFrame.size.width - oldWidth;
     53    buttonFrame.size.width += 12.0; //sizeToFit sizes a bit too small
     54    buttonFrame.origin.x -= NSWidth(buttonFrame) - oldWidth;
    5555    [fButton setFrame: buttonFrame];
    5656   
  • trunk/macosx/Controller.m

    r9799 r9812  
    40914091       
    40924092        //hack to ensure scrollbars don't disappear after resizing
    4093         [scrollView setAutohidesScrollers: NO];
    4094         [scrollView setAutohidesScrollers: YES];
     4093        if (![NSApp isOnSnowLeopardOrBetter])
     4094        {
     4095            [scrollView setAutohidesScrollers: NO];
     4096            [scrollView setAutohidesScrollers: YES];
     4097        }
    40954098    }
    40964099}
  • trunk/macosx/DragOverlayWindow.m

    r9610 r9812  
    146146- (void) setURL: (NSString *) url
    147147{
    148     #warning get magnet image/phrase
    149148    [[self contentView] setOverlay: [NSImage imageNamed: @"Globe.png"]
    150149        mainLine: NSLocalizedString(@"Web Address", "Drag overlay -> url") subLine: url];
  • trunk/macosx/TorrentTableView.m

    r9807 r9812  
    241241            continue;
    242242       
    243         NSDictionary * userInfo = [NSDictionary dictionaryWithObject: [NSNumber numberWithUnsignedInteger: row] forKey: @"Row"];
     243        NSDictionary * userInfo = [NSDictionary dictionaryWithObject: [NSNumber numberWithInteger: row] forKey: @"Row"];
    244244        TorrentCell * cell = (TorrentCell *)[self preparedCellAtColumn: -1 row: row];
    245245        [cell addTrackingAreasForView: self inRect: [self rectOfRow: row] withUserInfo: userInfo mouseLocation: mouseLocation];
     
    288288    if ((row = [dict objectForKey: @"Row"]))
    289289    {
    290         NSInteger rowVal = [row intValue];
     290        NSInteger rowVal = [row integerValue];
    291291        NSString * type = [dict objectForKey: @"Type"];
    292292        if ([type isEqualToString: @"Action"])
     
    316316            fMouseRevealRow = -1;
    317317       
    318         [self setNeedsDisplayInRect: [self rectOfRow: [row intValue]]];
     318        [self setNeedsDisplayInRect: [self rectOfRow: [row integerValue]]];
    319319    }
    320320}
     
    412412        if ([item isKindOfClass: [Torrent class]])
    413413        {
    414             NSInteger index = [self rowForItem: item];
     414            const NSInteger index = [self rowForItem: item];
    415415            if (index != -1)
    416416                [indexSet addIndex: index];
     
    418418        else
    419419        {
    420             NSInteger group = [item groupIndex];
     420            const NSInteger group = [item groupIndex];
    421421            for (NSInteger i = 0; i < [self numberOfRows]; i++)
    422422            {
    423                 if ([indexSet containsIndex: i])
    424                     continue;
    425                
    426423                id tableItem = [self itemAtRow: i];
    427                 if (![tableItem isKindOfClass: [Torrent class]] && group == [tableItem groupIndex])
     424                if ([tableItem isKindOfClass: [TorrentGroup class]] && group == [tableItem groupIndex])
    428425                {
    429426                    [indexSet addIndex: i];
Note: See TracChangeset for help on using the changeset viewer.