Changeset 4250


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

get speed limit menu checks displaying again

Location:
trunk
Files:
2 deleted
4 edited

Legend:

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

    r4183 r4250  
    8282                A21DFF100A292B2B007C5F76 /* Transfers.png in Resources */ = {isa = PBXBuildFile; fileRef = A21DFF0F0A292B2B007C5F76 /* Transfers.png */; };
    8383                A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */; };
    84                 A21F5C040AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A21F5C020AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m */; };
    8584                A22180980D148A71007D09ED /* GroupsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A22180970D148A71007D09ED /* GroupsWindowController.m */; };
    8685                A22180B60D148F0F007D09ED /* GroupsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A22180B50D148F0F007D09ED /* GroupsWindow.xib */; };
     
    435434                A21F5B860AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionMenuRatioToDisplayRatioTransformer.h; path = macosx/ActionMenuRatioToDisplayRatioTransformer.h; sourceTree = "<group>"; };
    436435                A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ActionMenuRatioToDisplayRatioTransformer.m; path = macosx/ActionMenuRatioToDisplayRatioTransformer.m; sourceTree = "<group>"; };
    437                 A21F5C010AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ActionMenuSpeedToDisplayLimitTransformer.h; path = macosx/ActionMenuSpeedToDisplayLimitTransformer.h; sourceTree = "<group>"; };
    438                 A21F5C020AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ActionMenuSpeedToDisplayLimitTransformer.m; path = macosx/ActionMenuSpeedToDisplayLimitTransformer.m; sourceTree = "<group>"; };
    439436                A22180960D148A71007D09ED /* GroupsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GroupsWindowController.h; path = macosx/GroupsWindowController.h; sourceTree = "<group>"; };
    440437                A22180970D148A71007D09ED /* GroupsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GroupsWindowController.m; path = macosx/GroupsWindowController.m; sourceTree = "<group>"; };
     
    775772                                A2BF078E0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.h */,
    776773                                A2BF078F0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m */,
    777                                 A21F5C010AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.h */,
    778                                 A21F5C020AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m */,
    779774                                A21F5B860AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.h */,
    780775                                A21F5B870AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m */,
     
    16941689                                A2AA579D0ADFCAB400CA59F6 /* PiecesView.m in Sources */,
    16951690                                A21F5B890AF25FB6008CE5CE /* ActionMenuRatioToDisplayRatioTransformer.m in Sources */,
    1696                                 A21F5C040AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.m in Sources */,
    16971691                                A25E74650AF5097C006F11AE /* ExpandedPathToPathTransformer.m in Sources */,
    16981692                                A25E74660AF5097D006F11AE /* ExpandedPathToIconTransformer.m in Sources */,
  • trunk/macosx/Controller.m

    r4249 r4250  
    4040#import "NSMenuAdditions.h"
    4141#import "UKKQueue.h"
    42 #import "ActionMenuSpeedToDisplayLimitTransformer.h"
    4342#import "ActionMenuRatioToDisplayRatioTransformer.h"
    4443#import "ExpandedPathToPathTransformer.h"
     
    178177   
    179178    //set custom value transformers
    180     ActionMenuSpeedToDisplayLimitTransformer * limitTransformer =
    181                         [[[ActionMenuSpeedToDisplayLimitTransformer alloc] init] autorelease];
    182     [NSValueTransformer setValueTransformer: limitTransformer forName: @"ActionMenuSpeedToDisplayLimitTransformer"];
    183    
    184179    ActionMenuRatioToDisplayRatioTransformer * ratioTransformer =
    185180                        [[[ActionMenuRatioToDisplayRatioTransformer alloc] init] autorelease];
     
    32033198   
    32043199    if (action == @selector(setLimitGlobalEnabled:))
    3205     {NSLog(@"%@", menuItem);
     3200    {
    32063201        BOOL upload = [menuItem menu] == fUploadMenu;
    3207         NSString * key = upload ? @"CheckUpload" : @"CheckDownload";
    3208         BOOL state = menuItem == (upload ? fUploadLimitItem : fDownloadLimitItem);
    3209        
    3210         [menuItem setState: [fDefaults boolForKey: key] ? state : !state];
     3202        BOOL limit = menuItem == (upload ? fUploadLimitItem : fDownloadLimitItem);
     3203        if (limit)
     3204            [menuItem setTitle: [NSString stringWithFormat: NSLocalizedString(@"Limit (%d KB/s)",
     3205                                    "Action context menu -> upload/download limit"),
     3206                                    [fDefaults integerForKey: upload ? @"UploadLimit" : @"DownloadLimit"]]];
     3207       
     3208        [menuItem setState: [fDefaults boolForKey: upload ? @"CheckUpload" : @"CheckDownload"] ? limit : !limit];
    32113209        return YES;
    32123210    }
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

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