Changeset 15


Ignore:
Timestamp:
Jan 12, 2006, 6:53:05 PM (15 years ago)
Author:
root
Message:

Update 2005-12-14

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/AUTHORS

    r7 r15  
    1515 + Growl notifications
    1616 + AppleScript support
     17
     18Bryan Varner <bryan@varnernet.com>
     19 + BeOS interface
    1720
    1821
  • trunk/macosx/Controller.m

    r11 r15  
    621621    forTableColumn: (NSTableColumn *) tableColumn row: (int) rowIndex
    622622{
     623    BOOL w;
     624
     625    w = [fWindow isKeyWindow] && rowIndex == [fTableView selectedRow];
    623626    if( [[tableColumn identifier] isEqualToString: @"Name"] )
    624627    {
    625         [(NameCell *) cell setStat: &fStat[rowIndex]];
     628        [(NameCell *) cell setStat: &fStat[rowIndex] whiteText: w];
    626629    }
    627630    else if( [[tableColumn identifier] isEqualToString: @"Progress"] )
    628631    {
    629         [(ProgressCell *) cell setStat: &fStat[rowIndex]];
     632        [(ProgressCell *) cell setStat: &fStat[rowIndex] whiteText: w];
    630633    }
    631634}
  • trunk/macosx/NameCell.h

    r3 r15  
    3030@interface NameCell : NSCell
    3131{
     32    BOOL       fWhiteText;
     33
    3234    NSString * fNameString;
    3335    NSString * fSizeString;
     
    3537    NSString * fPeersString;
    3638}
    37 - (void) setStat: (tr_stat_t *) stat;
     39- (void) setStat: (tr_stat_t *) stat whiteText: (BOOL) w;
    3840@end
    3941
  • trunk/macosx/NameCell.m

    r3 r15  
    2626@implementation NameCell
    2727
    28 - (void) setStat: (tr_stat_t *) stat
     28- (void) setStat: (tr_stat_t *) stat whiteText: (BOOL) w
    2929{
     30    fWhiteText = w;
     31
    3032    fNameString  = [NSString stringWithUTF8String: stat->info.name];
    3133    fSizeString  = [NSString stringWithFormat: @" (%@)",
     
    9698    pen = cellFrame.origin;
    9799
    98     attributes = [NSMutableDictionary dictionaryWithCapacity: 1];
    99     [attributes setObject: [NSFont messageFontOfSize:12.0]
     100    attributes = [NSMutableDictionary dictionaryWithCapacity: 2];
     101    [attributes setObject: fWhiteText ? [NSColor whiteColor] :
     102        [NSColor blackColor] forKey: NSForegroundColorAttributeName];
     103
     104    [attributes setObject: [NSFont messageFontOfSize: 12.0]
    100105        forKey: NSFontAttributeName];
    101106
     
    106111    [string drawAtPoint: pen withAttributes: attributes];
    107112
    108     [attributes setObject: [NSFont messageFontOfSize:10.0]
     113    [attributes setObject: [NSFont messageFontOfSize: 10.0]
    109114        forKey: NSFontAttributeName];
    110115
  • trunk/macosx/ProgressCell.h

    r7 r15  
    3030{
    3131    tr_stat_t * fStat;
     32    BOOL        fWhiteText;
    3233
    3334    NSString  * fDlString;
     
    3839}
    3940- (id)   init;
    40 - (void) setStat: (tr_stat_t *) stat;
     41- (void) setStat: (tr_stat_t *) stat whiteText: (BOOL) w;
    4142- (void) buildSimpleBar;
    4243- (void) buildAdvancedBar;
  • trunk/macosx/ProgressCell.m

    r7 r15  
    113113 * Readies ourselves to draw updated info.
    114114 **********************************************************************/
    115 - (void) setStat: (tr_stat_t *) stat
     115- (void) setStat: (tr_stat_t *) stat whiteText: (BOOL) w
    116116{
    117117    int i;
    118118    uint8_t * in, * out;
    119119
    120     fStat = stat;
     120    fStat      = stat;
     121    fWhiteText = w;
    121122
    122123    /* Update the strings to be displayed */
     
    284285
    285286    /* Draw the strings with font 10 */
    286     attributes = [NSDictionary dictionaryWithObject:
    287         [NSFont messageFontOfSize: 10.0] forKey: NSFontAttributeName];
     287    attributes = [NSDictionary dictionaryWithObjectsAndKeys:
     288        [NSFont messageFontOfSize: 10.0],
     289        NSFontAttributeName,
     290        fWhiteText ? [NSColor whiteColor] : [NSColor blackColor],
     291        NSForegroundColorAttributeName,
     292        NULL];
    288293    pen.x += 5; pen.y += 20;
    289294    [fDlString drawAtPoint: pen withAttributes: attributes];
Note: See TracChangeset for help on using the changeset viewer.