Changeset 695


Ignore:
Timestamp:
Jul 25, 2006, 1:23:40 AM (15 years ago)
Author:
livings124
Message:

Save minimal status text preference (speed or time)

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Defaults.plist

    r655 r695  
    33<plist version="1.0">
    44<dict>
     5        <key></key>
     6        <string></string>
    57        <key>AutoImport</key>
    68        <false/>
     
    5961        <key>ShowInspector</key>
    6062        <false/>
     63        <key>SmallStatusRegular</key>
     64        <true/>
    6165        <key>SmallView</key>
    6266        <false/>
  • trunk/macosx/TorrentCell.h

    r692 r695  
    3232{
    3333    Torrent * fTorrent;
    34     BOOL fNormalStatus;
     34    BOOL fStatusRegular;
    3535
    3636    NSUserDefaults * fDefaults;
  • trunk/macosx/TorrentCell.m

    r692 r695  
    6464    if ((self = [super init]))
    6565    {
    66         fNormalStatus = YES;
    67    
    6866        fDefaults = [NSUserDefaults standardUserDefaults];
     67       
     68        fStatusRegular = [fDefaults boolForKey: @"SmallStatusRegular"];
    6969   
    7070        NSSize startSize = NSMakeSize(100.0, BAR_HEIGHT);
     
    285285- (void) toggleMinimalStatus
    286286{
    287     fNormalStatus = !fNormalStatus;
     287    fStatusRegular = !fStatusRegular;
     288    [fDefaults setBool: fStatusRegular forKey: @"SmallStatusRegular"];
    288289}
    289290
     
    363364        float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * PADDING - EXTRA_NAME_SHIFT;
    364365       
    365         NSString * realStatusString = !fNormalStatus && [fTorrent isActive] && [fTorrent progress] < 1.0
    366                                     ? [fTorrent remainingTimeString] : [fTorrent shortStatusString];
     366        NSString * realStatusString = !fStatusRegular && [fTorrent isActive] && [fTorrent progress] < 1.0
     367                                        ? [fTorrent remainingTimeString] : [fTorrent shortStatusString];
    367368       
    368369        NSAttributedString * statusString = [[[NSAttributedString alloc] initWithString: realStatusString
Note: See TracChangeset for help on using the changeset viewer.