Changeset 644


Ignore:
Timestamp:
Jul 19, 2006, 2:50:07 AM (16 years ago)
Author:
livings124
Message:

Much nicer pushed image for turtle button.

Location:
trunk
Files:
3 added
2 deleted
5 edited

Legend:

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

    r643 r644  
    9494                A24600400A6DB58600D19088 /* RevealCircleButtonPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = A246003E0A6DB58600D19088 /* RevealCircleButtonPressed.png */; };
    9595                A24600410A6DB58600D19088 /* RevealCircleButton.png in Resources */ = {isa = PBXBuildFile; fileRef = A246003F0A6DB58600D19088 /* RevealCircleButton.png */; };
     96                A246004D0A6DCE4600D19088 /* SpeedLimitButtonPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = A246004C0A6DCE4600D19088 /* SpeedLimitButtonPressed.png */; };
     97                A24600510A6DCE6600D19088 /* SpeedLimitButtonBlue.png in Resources */ = {isa = PBXBuildFile; fileRef = A246004F0A6DCE6600D19088 /* SpeedLimitButtonBlue.png */; };
     98                A24600520A6DCE6600D19088 /* SpeedLimitButtonGraphite.png in Resources */ = {isa = PBXBuildFile; fileRef = A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */; };
    9699                A24F19080A3A790800C9C145 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; };
    97100                A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A24F19070A3A790800C9C145 /* Sparkle.framework */; };
     
    113116                A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; };
    114117                A26D450B0A0503AC00A10BB3 /* peermessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1838A309DEC0430047D688 /* peermessages.h */; };
    115                 A26E6A190A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png in Resources */ = {isa = PBXBuildFile; fileRef = A26E6A170A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png */; };
    116                 A26E6A1A0A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png in Resources */ = {isa = PBXBuildFile; fileRef = A26E6A180A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png */; };
    117118                A27431DB0A68538400FA780A /* BarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A27431D90A68538400FA780A /* BarButton.m */; };
    118119                A27A53570A06A76400E1F16F /* StatusSep.png in Resources */ = {isa = PBXBuildFile; fileRef = A27A53560A06A76400E1F16F /* StatusSep.png */; };
     
    298299                A246003E0A6DB58600D19088 /* RevealCircleButtonPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = RevealCircleButtonPressed.png; path = macosx/Images/RevealCircleButtonPressed.png; sourceTree = "<group>"; };
    299300                A246003F0A6DB58600D19088 /* RevealCircleButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = RevealCircleButton.png; path = macosx/Images/RevealCircleButton.png; sourceTree = "<group>"; };
     301                A246004C0A6DCE4600D19088 /* SpeedLimitButtonPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonPressed.png; path = macosx/Images/SpeedLimitButtonPressed.png; sourceTree = "<group>"; };
     302                A246004F0A6DCE6600D19088 /* SpeedLimitButtonBlue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonBlue.png; path = macosx/Images/SpeedLimitButtonBlue.png; sourceTree = "<group>"; };
     303                A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonGraphite.png; path = macosx/Images/SpeedLimitButtonGraphite.png; sourceTree = "<group>"; };
    300304                A24F19070A3A790800C9C145 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = macosx/Sparkle.framework; sourceTree = "<group>"; };
    301305                A253F6F20A698970008EE24F /* FilterBarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FilterBarBackground.png; path = macosx/Images/FilterBarBackground.png; sourceTree = "<group>"; };
     
    312316                A25FCDDE0A37695F002BCBBE /* ResumeSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeSelected.png; path = macosx/Images/ResumeSelected.png; sourceTree = "<group>"; };
    313317                A261F1DB0A69A1610002815A /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = macosx/Growl.framework; sourceTree = "<group>"; };
    314                 A26E6A170A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonPressedBlue.png; path = macosx/Images/SpeedLimitButtonPressedBlue.png; sourceTree = "<group>"; };
    315                 A26E6A180A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpeedLimitButtonPressedGraphite.png; path = macosx/Images/SpeedLimitButtonPressedGraphite.png; sourceTree = "<group>"; };
    316318                A27431D80A68538400FA780A /* BarButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BarButton.h; path = macosx/BarButton.h; sourceTree = "<group>"; };
    317319                A27431D90A68538400FA780A /* BarButton.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = BarButton.m; path = macosx/BarButton.m; sourceTree = "<group>"; };
     
    476478                                A28DBADB0A33C1D800F4B4A7 /* ActionButton.png */,
    477479                                A2173E1B0A33C1B300B0D8AB /* ActionButtonPressed.png */,
     480                                A246004F0A6DCE6600D19088 /* SpeedLimitButtonBlue.png */,
     481                                A24600500A6DCE6600D19088 /* SpeedLimitButtonGraphite.png */,
    478482                                A2F6DB070A55F31C0058D1E5 /* SpeedLimitButton.png */,
    479                                 A26E6A170A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png */,
    480                                 A26E6A180A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png */,
     483                                A246004C0A6DCE4600D19088 /* SpeedLimitButtonPressed.png */,
    481484                                A27A53560A06A76400E1F16F /* StatusSep.png */,
    482485                                A27A53650A06AEDB00E1F16F /* StatusBorder.png */,
     
    758761                                A253F72B0A699373008EE24F /* FilterButtonSelectedMain.png in Resources */,
    759762                                A253F72C0A699373008EE24F /* FilterButtonSelectedRight.png in Resources */,
    760                                 A26E6A190A6A8C18007E3C14 /* SpeedLimitButtonPressedBlue.png in Resources */,
    761                                 A26E6A1A0A6A8C18007E3C14 /* SpeedLimitButtonPressedGraphite.png in Resources */,
    762763                                A27ABC8B0A6B317D0020EC71 /* CloseCircleButton.png in Resources */,
    763764                                A27ABC8C0A6B317D0020EC71 /* CloseCircleButtonPressed.png in Resources */,
    764765                                A24600400A6DB58600D19088 /* RevealCircleButtonPressed.png in Resources */,
    765766                                A24600410A6DB58600D19088 /* RevealCircleButton.png in Resources */,
     767                                A246004D0A6DCE4600D19088 /* SpeedLimitButtonPressed.png in Resources */,
     768                                A24600510A6DCE6600D19088 /* SpeedLimitButtonBlue.png in Resources */,
     769                                A24600520A6DCE6600D19088 /* SpeedLimitButtonGraphite.png in Resources */,
    766770                        );
    767771                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/macosx/Controller.h

    r641 r644  
    5555                                    * fSpeedLimitItem, * fSpeedLimitDockItem;
    5656    IBOutlet NSButton               * fActionButton, * fSpeedLimitButton;
     57    BOOL                            fSpeedLimitEnabled;
     58    NSImage                         * fSpeedLimitNormalImage, * fSpeedLimitBlueImage, * fSpeedLimitGraphiteImage;
    5759   
    5860    IBOutlet ImageBackgroundView    * fStatusBar;
  • trunk/macosx/Controller.m

    r643 r644  
    170170   
    171171    //set speed limit
     172    fSpeedLimitNormalImage = [fSpeedLimitButton image];
     173    fSpeedLimitBlueImage = [NSImage imageNamed: @"SpeedLimitButtonBlue.png"];
     174    fSpeedLimitGraphiteImage = [NSImage imageNamed: @"SpeedLimitButtonGraphite.png"];
     175   
    172176    [self updateControlTint: nil];
    173177   
    174     if ([fDefaults boolForKey: @"SpeedLimit"])
     178    if ((fSpeedLimitEnabled = [fDefaults boolForKey: @"SpeedLimit"]))
    175179    {
    176180        [fSpeedLimitItem setState: NSOnState];
    177181        [fSpeedLimitDockItem setState: NSOnState];
    178         [fSpeedLimitButton setState: NSOnState];
    179     }
    180    
    181     [[fSpeedLimitButton cell] setHighlightsBy: NSNoCellMask];
     182       
     183        [fSpeedLimitButton setImage: [NSColor currentControlTint] == NSBlueControlTint
     184                                        ? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage];
     185    }
    182186
    183187    [fActionButton setToolTip: @"Shortcuts for changing global settings."];
     
    839843- (void) updateControlTint: (NSNotification *) notification
    840844{
    841     if ([fWindow isKeyWindow])
    842         [fSpeedLimitButton setAlternateImage: [NSColor currentControlTint] == NSBlueControlTint
    843             ? [NSImage imageNamed: @"SpeedLimitButtonPressedBlue.png"]
    844             : [NSImage imageNamed: @"SpeedLimitButtonPressedGraphite.png"]];
     845    if (fSpeedLimitEnabled && [fWindow isKeyWindow])
     846        [fSpeedLimitButton setImage: [NSColor currentControlTint] == NSBlueControlTint
     847                                        ? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage];
    845848}
    846849
     
    11091112- (void) toggleSpeedLimit: (id) sender
    11101113{
    1111     int state = [fSpeedLimitItem state] ? NSOffState : NSOnState;
     1114    fSpeedLimitEnabled = !fSpeedLimitEnabled;
     1115    int state = fSpeedLimitEnabled ? NSOnState : NSOffState;
    11121116
    11131117    [fSpeedLimitItem setState: state];
    11141118    [fSpeedLimitDockItem setState: state];
    1115     [fSpeedLimitButton setState: state];
    1116    
    1117     [fPrefsController enableSpeedLimit: state];
     1119   
     1120    [fSpeedLimitButton setImage: !fSpeedLimitEnabled ? fSpeedLimitNormalImage
     1121        : ([NSColor currentControlTint] == NSBlueControlTint ? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage)];
     1122   
     1123    [fPrefsController enableSpeedLimit: fSpeedLimitEnabled];
    11181124}
    11191125
     
    15631569    frame.origin.y -= heightChange;
    15641570       
    1565     fStatusBarVisible = !fStatusBarVisible;
     1571    fStatusBarVisible = show;
    15661572   
    15671573    [self updateUI: nil];
     
    16261632    frame.origin.y -= heightChange;
    16271633       
    1628     fFilterBarVisible = !fFilterBarVisible;
     1634    fFilterBarVisible = show;
    16291635   
    16301636    //set views to not autoresize
     
    20842090    [fPauseFilterButton setForActive];
    20852091   
    2086     [fSpeedLimitButton setAlternateImage: [NSColor currentControlTint] == NSBlueControlTint
    2087             ? [NSImage imageNamed: @"SpeedLimitButtonPressedBlue.png"]
    2088             : [NSImage imageNamed: @"SpeedLimitButtonPressedGraphite.png"]];
     2092    if (fSpeedLimitEnabled)
     2093        [fSpeedLimitButton setImage: [NSColor currentControlTint] == NSBlueControlTint
     2094                                        ? fSpeedLimitBlueImage : fSpeedLimitGraphiteImage];
    20892095}
    20902096
     
    21052111   
    21062112    #warning need real inactive image
    2107     [fSpeedLimitButton setAlternateImage: [NSImage imageNamed: @"SpeedLimitButton.png"]];
     2113    if (fSpeedLimitEnabled)
     2114        [fSpeedLimitButton setImage: fSpeedLimitNormalImage];
    21082115}
    21092116
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r643 r644  
    1010                <string>344 478 208 99 0 0 1152 842 </string>
    1111                <key>1480</key>
    12                 <string>332 330 420 63 0 0 1152 842 </string>
     12                <string>358 399 420 63 0 0 1152 842 </string>
    1313                <key>1603</key>
    14                 <string>240 433 477 67 0 0 1152 842 </string>
     14                <string>337 544 477 67 0 0 1152 842 </string>
    1515                <key>29</key>
    1616                <string>9 780 451 44 0 0 1152 842 </string>
     
    3333        <array>
    3434                <integer>29</integer>
    35                 <integer>1603</integer>
    36                 <integer>1480</integer>
     35                <integer>21</integer>
    3736        </array>
    3837        <key>IBSystem Version</key>
Note: See TracChangeset for help on using the changeset viewer.