Changeset 3212


Ignore:
Timestamp:
Sep 28, 2007, 3:44:53 AM (14 years ago)
Author:
livings124
Message:

use the system's default bold font for dock badging

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Badger.m

    r3112 r3212  
    218218        [stringShadow setShadowBlurRadius: 4.0];
    219219       
    220         NSFont * boldFont = [[NSFontManager sharedFontManager] convertFont:
    221                                 [NSFont fontWithName: @"Helvetica" size: 28.0] toHaveTrait: NSBoldFontMask];
    222        
    223220        fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
    224221            [NSColor whiteColor], NSForegroundColorAttributeName,
    225             boldFont, NSFontAttributeName, stringShadow, NSShadowAttributeName, nil];
     222            [NSFont boldSystemFontOfSize: 26.0], NSFontAttributeName, stringShadow, NSShadowAttributeName, nil];
    226223       
    227224        [stringShadow release];
  • trunk/macosx/Torrent.m

    r3211 r3212  
    594594        return NO;
    595595    }
    596    
    597596    return YES;
    598597}
     
    761760    else
    762761    {
    763         int days = eta / 86400;
     762        int days = eta / 86400, hours = (eta / 3600) % 24;
    764763        if (days > 1)
    765             return [NSString stringWithFormat: NSLocalizedString(@"%d days %d hr", "Torrent -> remaining time"),
    766                                                     days, (eta / 3600) % 24];
     764            return [NSString stringWithFormat: NSLocalizedString(@"%d days %d hr", "Torrent -> remaining time"), days, hours];
    767765        else
    768             return [NSString stringWithFormat: NSLocalizedString(@"1 day %d hr", "Torrent -> remaining time"),
    769                                                     (eta / 3600) % 24];
     766            return [NSString stringWithFormat: NSLocalizedString(@"1 day %d hr", "Torrent -> remaining time"), hours];
    770767    }
    771768}
     
    853850           
    854851            [dic setObject: [NSNumber numberWithBool: peer->isEncrypted] forKey: @"Encryption"];
    855         }
    856        
    857         #warning why would connected clients have null value?
    858         if (peer->client)
    859             [dic setObject: [NSString stringWithCString: (char *) peer->client encoding: NSUTF8StringEncoding] forKey: @"Client"];
     852           
     853            [dic setObject: [NSString stringWithCString: (char *)peer->client encoding: NSUTF8StringEncoding] forKey: @"Client"];
     854        }
    860855        else
    861856            [dic setObject: @"" forKey: @"Client"]; //needed to be set here for client sort
     
    993988            stringToAppend = @"";
    994989       
    995         string = [NSString stringWithFormat: @"%@ - %@UL: %@", string, stringToAppend, [NSString stringForSpeed: [self uploadRate]]];
     990        string = [string stringByAppendingFormat: @" - %@UL: %@", stringToAppend, [NSString stringForSpeed: [self uploadRate]]];
    996991    }
    997992   
Note: See TracChangeset for help on using the changeset viewer.