Changeset 706


Ignore:
Timestamp:
Jul 29, 2006, 6:09:35 PM (16 years ago)
Author:
livings124
Message:

Remove redundant variables

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r697 r706  
    6161   
    6262    IBOutlet ImageBackgroundView    * fStatusBar;
    63     BOOL                            fStatusBarVisible;
    6463    IBOutlet NSTextField            * fTotalDLField, * fTotalULField, * fTotalTorrentsField;
    6564   
     
    7170   
    7271    IBOutlet ImageBackgroundView    * fFilterBar;
    73     BOOL                            fFilterBarVisible;
    7472    NSString                        * fFilterType;
    7573    IBOutlet BarButton              * fNoFilterButton, * fPauseFilterButton,
  • trunk/macosx/Controller.m

    r705 r706  
    6161}
    6262
    63 
    6463@implementation Controller
    6564
     
    148147    [fFilterBar setHidden: YES];
    149148   
    150     fFilterBarVisible = NO;
    151149    NSRect filterBarFrame = [fFilterBar frame];
    152150    filterBarFrame.size.width = [fWindow frame].size.width;
     
    159157   
    160158    //set up status bar
    161     fStatusBarVisible = NO;
    162159    [fStatusBar setHidden: YES];
    163160   
     
    871868    float downloadRate, uploadRate;
    872869    tr_torrentRates(fLib, & downloadRate, & uploadRate);
    873     if (fStatusBarVisible)
     870    if (![fStatusBar isHidden])
    874871    {
    875872        [fTotalDLField setStringValue: [@"Total DL: " stringByAppendingString: [NSString stringForSpeed: downloadRate]]];
     
    16021599- (void) toggleStatusBar: (id) sender
    16031600{
    1604     [self showStatusBar: !fStatusBarVisible animate: YES];
    1605     [fDefaults setBool: fStatusBarVisible forKey: @"StatusBar"];
     1601    [self showStatusBar: [fStatusBar isHidden] animate: YES];
     1602    [fDefaults setBool: ![fStatusBar isHidden] forKey: @"StatusBar"];
    16061603}
    16071604
    16081605- (void) showStatusBar: (BOOL) show animate: (BOOL) animate
    16091606{
    1610     if (show == fStatusBarVisible)
     1607    if (show == ![fStatusBar isHidden])
    16111608        return;
    16121609
     
    16211618    frame.size.height += heightChange;
    16221619    frame.origin.y -= heightChange;
    1623        
    1624     fStatusBarVisible = show;
    16251620   
    16261621    [self updateUI: nil];
     
    16591654{
    16601655    //disable filtering when hiding
    1661     if (fFilterBarVisible)
     1656    if (![fFilterBar isHidden])
    16621657    {
    16631658        [fSearchFilterField setStringValue: @""];
     
    16651660    }
    16661661
    1667     [self showFilterBar: !fFilterBarVisible animate: YES];
    1668     [fDefaults setBool: fFilterBarVisible forKey: @"FilterBar"];
     1662    [self showFilterBar: [fFilterBar isHidden] animate: YES];
     1663    [fDefaults setBool: ![fFilterBar isHidden] forKey: @"FilterBar"];
    16691664}
    16701665
    16711666- (void) showFilterBar: (BOOL) show animate: (BOOL) animate
    16721667{
    1673     if (show == fFilterBarVisible)
     1668    if (show == ![fFilterBar isHidden])
    16741669        return;
    16751670
     
    16841679    frame.size.height += heightChange;
    16851680    frame.origin.y -= heightChange;
    1686        
    1687     fFilterBarVisible = show;
    16881681   
    16891682    //set views to not autoresize
     
    19161909    if (action == @selector(toggleStatusBar:))
    19171910    {
    1918         NSString * title = fStatusBarVisible ? @"Hide Status Bar" : @"Show Status Bar";
     1911        NSString * title = [fStatusBar isHidden] ? @"Show Status Bar" : @"Hide Status Bar";
    19191912        if (![[menuItem title] isEqualToString: title])
    19201913                [menuItem setTitle: title];
     
    19261919    if (action == @selector(toggleFilterBar:))
    19271920    {
    1928         NSString * title = fFilterBarVisible ? @"Hide Filter Bar" : @"Show Filter Bar";
     1921        NSString * title = [fFilterBar isHidden] ? @"Show Filter Bar" : @"Hide Filter Bar";
    19291922        if (![[menuItem title] isEqualToString: title])
    19301923                [menuItem setTitle: title];
     
    21342127    {
    21352128        float maxHeight = [[fWindow screen] visibleFrame].size.height;
    2136         if (!fStatusBarVisible)
     2129        if ([fStatusBar isHidden])
    21372130            maxHeight -= [fStatusBar frame].size.height;
    2138         if (!fFilterBarVisible)
     2131        if ([fFilterBar isHidden])
    21392132            maxHeight -= [fFilterBar frame].size.height;
    21402133       
Note: See TracChangeset for help on using the changeset viewer.