Changeset 4253


Ignore:
Timestamp:
Dec 20, 2007, 8:53:55 PM (14 years ago)
Author:
livings124
Message:

remove bindings from the global ratio menu items

Location:
trunk
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r4250 r4253  
    8181                A219798B0D07B78400438EA7 /* GroupToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = A219798A0D07B78400438EA7 /* GroupToolbarItem.m */; };
    8282                A21DFF100A292B2B007C5F76 /* Transfers.png in Resources */ = {isa = PBXBuildFile; fileRef = A21DFF0F0A292B2B007C5F76 /* Transfers.png */; };
    83                 A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */; };
    8483                A22180980D148A71007D09ED /* GroupsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A22180970D148A71007D09ED /* GroupsWindowController.m */; };
    8584                A22180B60D148F0F007D09ED /* GroupsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A22180B50D148F0F007D09ED /* GroupsWindow.xib */; };
     
    432431                A219798A0D07B78400438EA7 /* GroupToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GroupToolbarItem.m; path = macosx/GroupToolbarItem.m; sourceTree = "<group>"; };
    433432                A21DFF0F0A292B2B007C5F76 /* Transfers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Transfers.png; path = macosx/Images/Transfers.png; sourceTree = "<group>"; };
    434                 A21F5B860AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionMenuRatioToDisplayRatioTransformer.h; path = macosx/ActionMenuRatioToDisplayRatioTransformer.h; sourceTree = "<group>"; };
    435                 A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ActionMenuRatioToDisplayRatioTransformer.m; path = macosx/ActionMenuRatioToDisplayRatioTransformer.m; sourceTree = "<group>"; };
    436433                A22180960D148A71007D09ED /* GroupsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GroupsWindowController.h; path = macosx/GroupsWindowController.h; sourceTree = "<group>"; };
    437434                A22180970D148A71007D09ED /* GroupsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GroupsWindowController.m; path = macosx/GroupsWindowController.m; sourceTree = "<group>"; };
     
    772769                                A2BF078E0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.h */,
    773770                                A2BF078F0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m */,
    774                                 A21F5B860AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.h */,
    775                                 A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */,
    776771                                A25E74450AF5089E006F11AE /* ExpandedPathToPathTransformer.h */,
    777772                                A25E74440AF5089E006F11AE /* ExpandedPathToPathTransformer.m */,
     
    16881683                                A29C8B370ACC6EB3000ED9F9 /* PortChecker.m in Sources */,
    16891684                                A2AA579D0ADFCAB400CA59F6 /* PiecesView.m in Sources */,
    1690                                 A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */,
    16911685                                A25E74650AF5097C006F11AE /* ExpandedPathToPathTransformer.m in Sources */,
    16921686                                A25E74660AF5097D006F11AE /* ExpandedPathToIconTransformer.m in Sources */,
  • trunk/macosx/Controller.h

    r4242 r4253  
    8282                                    * fDownloadLimitItem, * fDownloadNoLimitItem;
    8383   
     84    IBOutlet NSMenuItem             * fCheckRatioItem, * fNoCheckRatioItem;
     85   
    8486    IBOutlet NSMenu                 * fGroupsSetMenu, * fGroupsSetContextMenu, * fGroupFilterMenu;
    8587    IBOutlet NSPopUpButton          * fGroupsButton;
     
    207209- (void) setQuickLimitGlobal: (id) sender;
    208210
     211- (void) setRatioGlobalEnabled: (id) sender;
    209212- (void) setQuickRatioGlobal: (id) sender;
    210213
  • trunk/macosx/Controller.m

    r4252 r4253  
    4040#import "NSMenuAdditions.h"
    4141#import "UKKQueue.h"
    42 #import "ActionMenuRatioToDisplayRatioTransformer.h"
    4342#import "ExpandedPathToPathTransformer.h"
    4443#import "ExpandedPathToIconTransformer.h"
     
    177176   
    178177    //set custom value transformers
    179     ActionMenuRatioToDisplayRatioTransformer * ratioTransformer =
    180                         [[[ActionMenuRatioToDisplayRatioTransformer alloc] init] autorelease];
    181     [NSValueTransformer setValueTransformer: ratioTransformer forName: @"ActionMenuRatioToDisplayRatioTransformer"];
    182    
    183178    ExpandedPathToPathTransformer * pathTransformer =
    184179                        [[[ExpandedPathToPathTransformer alloc] init] autorelease];
     
    22042199    [fDefaults setBool: sender == ([sender menu] == fUploadMenu ? fUploadLimitItem : fDownloadLimitItem)
    22052200        forKey: [sender menu] == fUploadMenu ? @"CheckUpload" : @"CheckDownload"];
     2201   
    22062202    [fPrefsController applySpeedSettings: nil];
    22072203}
     
    22162212}
    22172213
    2218 #warning get rid of bindings :(
     2214- (void) setRatioGlobalEnabled: (id) sender
     2215{
     2216    [fDefaults setBool: sender == fCheckRatioItem forKey: @"RatioCheck"];
     2217}
     2218
    22192219- (void) setQuickRatioGlobal: (id) sender
    22202220{
     
    32083208       
    32093209        [menuItem setState: [fDefaults boolForKey: upload ? @"CheckUpload" : @"CheckDownload"] ? limit : !limit];
     3210        return YES;
     3211    }
     3212   
     3213    if (action == @selector(setRatioGlobalEnabled:))
     3214    {
     3215        BOOL check = menuItem == fCheckRatioItem;
     3216        if (check)
     3217            [menuItem setTitle: [NSString stringWithFormat: NSLocalizedString(@"Stop at Ratio (%.2f)",
     3218                                    "Action context menu -> ratio stop"), [fDefaults floatForKey: @"RatioLimit"]]];
     3219       
     3220        [menuItem setState: [fDefaults boolForKey: @"RatioCheck"] ? check : !check];
    32103221        return YES;
    32113222    }
  • trunk/macosx/English.lproj/MainMenu.nib/classes.nib

    r4249 r4253  
    123123                                <key>setQuickRatioGlobal</key>
    124124                                <string>id</string>
     125                                <key>setRatioGlobalEnabled</key>
     126                                <string>id</string>
    125127                                <key>setSort</key>
    126128                                <string>id</string>
     
    178180                                <key>fBottomTigerLine</key>
    179181                                <string>NSBox</string>
     182                                <key>fCheckRatioItem</key>
     183                                <string>NSMenuItem</string>
    180184                                <key>fDockMenu</key>
    181185                                <string>NSMenu</string>
     
    201205                                <string>NSMenuItem</string>
    202206                                <key>fNextInfoTabItem</key>
     207                                <string>NSMenuItem</string>
     208                                <key>fNoCheckRatioItem</key>
    203209                                <string>NSMenuItem</string>
    204210                                <key>fNoFilterButton</key>
     
    268274                </dict>
    269275                <dict>
     276                        <key>CLASS</key>
     277                        <string>FilterButton</string>
     278                        <key>LANGUAGE</key>
     279                        <string>ObjC</string>
     280                        <key>SUPERCLASS</key>
     281                        <string>NSButton</string>
     282                </dict>
     283                <dict>
    270284                        <key>ACTIONS</key>
    271285                        <dict>
     
    304318                        <key>SUPERCLASS</key>
    305319                        <string>NSTableView</string>
    306                 </dict>
    307                 <dict>
    308                         <key>CLASS</key>
    309                         <string>FilterButton</string>
    310                         <key>LANGUAGE</key>
    311                         <string>ObjC</string>
    312                         <key>SUPERCLASS</key>
    313                         <string>NSButton</string>
    314320                </dict>
    315321                <dict>
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r4250 r4253  
    1111        <key>IBOpenObjects</key>
    1212        <array>
    13                 <integer>1060</integer>
     13                <integer>1310</integer>
    1414        </array>
    1515        <key>IBSystem Version</key>
Note: See TracChangeset for help on using the changeset viewer.