Changeset 3852


Ignore:
Timestamp:
Nov 17, 2007, 3:55:23 PM (15 years ago)
Author:
livings124
Message:

readd the custom FilterButton? subclass to simplify setting the tooltip

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r3793 r3852  
    3131#import "Badger.h"
    3232#import "StatusBarView.h"
     33#import "FilterButton.h"
    3334#import "IPCController.h"
    3435
     
    6364   
    6465    IBOutlet StatusBarView          * fFilterBar;
    65     IBOutlet NSButton               * fNoFilterButton, * fDownloadFilterButton, * fSeedFilterButton, * fPauseFilterButton;
     66    IBOutlet FilterButton           * fNoFilterButton, * fDownloadFilterButton, * fSeedFilterButton, * fPauseFilterButton;
    6667    IBOutlet NSSearchField          * fSearchFilterField;
    6768    IBOutlet NSMenuItem             * fNextFilterItem, * fPrevFilterItem;
  • trunk/macosx/Controller.m

    r3851 r3852  
    17501750   
    17511751    //set button tooltips
    1752     #warning make better
    1753     [fNoFilterButton setToolTip: [fTorrents count] == 1 ? NSLocalizedString(@"1 Transfer", "Filter Button -> tool tip")
    1754         : [NSString stringWithFormat: NSLocalizedString(@"%d Transfers", "Filter Bar Button -> tool tip"), [fTorrents count]]];
    1755     [fDownloadFilterButton setToolTip: downloading == 1 ? NSLocalizedString(@"1 Transfer", "Filter Button -> tool tip")
    1756         : [NSString stringWithFormat: NSLocalizedString(@"%d Transfers", "Filter Bar Button -> tool tip"), downloading]];
    1757     [fSeedFilterButton setToolTip: seeding == 1 ? NSLocalizedString(@"1 Transfer", "Filter Button -> tool tip")
    1758         : [NSString stringWithFormat: NSLocalizedString(@"%d Transfers", "Filter Bar Button -> tool tip"), seeding]];
    1759     [fPauseFilterButton setToolTip: paused == 1 ? NSLocalizedString(@"1 Transfer", "Filter Button -> tool tip")
    1760         : [NSString stringWithFormat: NSLocalizedString(@"%d Transfers", "Filter Bar Button -> tool tip"), paused]];
     1752    [fNoFilterButton setCount: [fTorrents count]];
     1753    [fDownloadFilterButton setCount: downloading];
     1754    [fSeedFilterButton setCount: seeding];
     1755    [fPauseFilterButton setCount: paused];
    17611756   
    17621757    NSString * searchString = [fSearchFilterField stringValue];
  • trunk/macosx/English.lproj/MainMenu.nib/classes.nib

    r3793 r3852  
    263263                <dict>
    264264                        <key>CLASS</key>
     265                        <string>FilterButton</string>
     266                        <key>LANGUAGE</key>
     267                        <string>ObjC</string>
     268                        <key>SUPERCLASS</key>
     269                        <string>NSButton</string>
     270                </dict>
     271                <dict>
     272                        <key>CLASS</key>
    265273                        <string>ActionPopUpButton</string>
    266274                        <key>LANGUAGE</key>
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r3791 r3852  
    1111        <key>IBOpenObjects</key>
    1212        <array>
    13                 <integer>302</integer>
     13                <integer>1603</integer>
    1414        </array>
    1515        <key>IBSystem Version</key>
    16         <string>9A581</string>
     16        <string>9B18</string>
    1717        <key>targetFramework</key>
    1818        <string>IBCocoaFramework</string>
Note: See TracChangeset for help on using the changeset viewer.