Changeset 706
- Timestamp:
- Jul 29, 2006, 6:09:35 PM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.h
r697 r706 61 61 62 62 IBOutlet ImageBackgroundView * fStatusBar; 63 BOOL fStatusBarVisible;64 63 IBOutlet NSTextField * fTotalDLField, * fTotalULField, * fTotalTorrentsField; 65 64 … … 71 70 72 71 IBOutlet ImageBackgroundView * fFilterBar; 73 BOOL fFilterBarVisible;74 72 NSString * fFilterType; 75 73 IBOutlet BarButton * fNoFilterButton, * fPauseFilterButton, -
trunk/macosx/Controller.m
r705 r706 61 61 } 62 62 63 64 63 @implementation Controller 65 64 … … 148 147 [fFilterBar setHidden: YES]; 149 148 150 fFilterBarVisible = NO;151 149 NSRect filterBarFrame = [fFilterBar frame]; 152 150 filterBarFrame.size.width = [fWindow frame].size.width; … … 159 157 160 158 //set up status bar 161 fStatusBarVisible = NO;162 159 [fStatusBar setHidden: YES]; 163 160 … … 871 868 float downloadRate, uploadRate; 872 869 tr_torrentRates(fLib, & downloadRate, & uploadRate); 873 if ( fStatusBarVisible)870 if (![fStatusBar isHidden]) 874 871 { 875 872 [fTotalDLField setStringValue: [@"Total DL: " stringByAppendingString: [NSString stringForSpeed: downloadRate]]]; … … 1602 1599 - (void) toggleStatusBar: (id) sender 1603 1600 { 1604 [self showStatusBar: !fStatusBarVisibleanimate: YES];1605 [fDefaults setBool: fStatusBarVisibleforKey: @"StatusBar"];1601 [self showStatusBar: [fStatusBar isHidden] animate: YES]; 1602 [fDefaults setBool: ![fStatusBar isHidden] forKey: @"StatusBar"]; 1606 1603 } 1607 1604 1608 1605 - (void) showStatusBar: (BOOL) show animate: (BOOL) animate 1609 1606 { 1610 if (show == fStatusBarVisible)1607 if (show == ![fStatusBar isHidden]) 1611 1608 return; 1612 1609 … … 1621 1618 frame.size.height += heightChange; 1622 1619 frame.origin.y -= heightChange; 1623 1624 fStatusBarVisible = show;1625 1620 1626 1621 [self updateUI: nil]; … … 1659 1654 { 1660 1655 //disable filtering when hiding 1661 if ( fFilterBarVisible)1656 if (![fFilterBar isHidden]) 1662 1657 { 1663 1658 [fSearchFilterField setStringValue: @""]; … … 1665 1660 } 1666 1661 1667 [self showFilterBar: !fFilterBarVisibleanimate: YES];1668 [fDefaults setBool: fFilterBarVisibleforKey: @"FilterBar"];1662 [self showFilterBar: [fFilterBar isHidden] animate: YES]; 1663 [fDefaults setBool: ![fFilterBar isHidden] forKey: @"FilterBar"]; 1669 1664 } 1670 1665 1671 1666 - (void) showFilterBar: (BOOL) show animate: (BOOL) animate 1672 1667 { 1673 if (show == fFilterBarVisible)1668 if (show == ![fFilterBar isHidden]) 1674 1669 return; 1675 1670 … … 1684 1679 frame.size.height += heightChange; 1685 1680 frame.origin.y -= heightChange; 1686 1687 fFilterBarVisible = show;1688 1681 1689 1682 //set views to not autoresize … … 1916 1909 if (action == @selector(toggleStatusBar:)) 1917 1910 { 1918 NSString * title = fStatusBarVisible ? @"Hide Status Bar" : @"ShowStatus Bar";1911 NSString * title = [fStatusBar isHidden] ? @"Show Status Bar" : @"Hide Status Bar"; 1919 1912 if (![[menuItem title] isEqualToString: title]) 1920 1913 [menuItem setTitle: title]; … … 1926 1919 if (action == @selector(toggleFilterBar:)) 1927 1920 { 1928 NSString * title = fFilterBarVisible ? @"Hide Filter Bar" : @"ShowFilter Bar";1921 NSString * title = [fFilterBar isHidden] ? @"Show Filter Bar" : @"Hide Filter Bar"; 1929 1922 if (![[menuItem title] isEqualToString: title]) 1930 1923 [menuItem setTitle: title]; … … 2134 2127 { 2135 2128 float maxHeight = [[fWindow screen] visibleFrame].size.height; 2136 if ( !fStatusBarVisible)2129 if ([fStatusBar isHidden]) 2137 2130 maxHeight -= [fStatusBar frame].size.height; 2138 if ( !fFilterBarVisible)2131 if ([fFilterBar isHidden]) 2139 2132 maxHeight -= [fFilterBar frame].size.height; 2140 2133
Note: See TracChangeset
for help on using the changeset viewer.