From: Mitchell Livingston Date: Tue, 17 Jun 2008 21:09:06 +0000 (+0000) Subject: dim text fields in the prefs window when they correspond to disabled fields X-Git-Tag: 1.31~220 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2f5596b0c15b84fb115b0e5f534c329438e0eee;p=transmission dim text fields in the prefs window when they correspond to disabled fields --- diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index 7a5faebed..03e53eadb 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -144,6 +144,7 @@ A2725B6E0DE5C4F5003445E7 /* FileListNode.m in Sources */ = {isa = PBXBuildFile; fileRef = A2725B6D0DE5C4F5003445E7 /* FileListNode.m */; }; A2725D5D0DE7507C003445E7 /* TrackerTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2725D5C0DE7507C003445E7 /* TrackerTableView.m */; }; A277DA0B0C693D9C00DA2CD4 /* ActionOn.png in Resources */ = {isa = PBXBuildFile; fileRef = A277DA090C693D9C00DA2CD4 /* ActionOn.png */; }; + A28F4F770E085BDC003A3882 /* ColorTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = A28F4F760E085BDC003A3882 /* ColorTextField.m */; }; A292A6E80DFB45FC004B9C0A /* webseed.c in Sources */ = {isa = PBXBuildFile; fileRef = A292A6E50DFB45EC004B9C0A /* webseed.c */; }; A29576030D11D63C0093B167 /* Creator.xib in Resources */ = {isa = PBXBuildFile; fileRef = A29576010D11D63C0093B167 /* Creator.xib */; }; A29576130D11D8DD0093B167 /* InfoWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A29576110D11D8DD0093B167 /* InfoWindow.xib */; }; @@ -589,6 +590,8 @@ A28AFE0A0DA1C47A00673957 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = zh_TW; path = macosx/zh_TW.lproj/MainMenu.xib; sourceTree = ""; }; A28AFE0B0DA1C47A00673957 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = zh_TW; path = macosx/zh_TW.lproj/PrefsWindow.xib; sourceTree = ""; }; A28E1DDF0CFFD8EC00E16385 /* ButtonToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonToolbarItem.h; path = macosx/ButtonToolbarItem.h; sourceTree = ""; }; + A28F4F750E085BDC003A3882 /* ColorTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColorTextField.h; path = macosx/ColorTextField.h; sourceTree = ""; }; + A28F4F760E085BDC003A3882 /* ColorTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ColorTextField.m; path = macosx/ColorTextField.m; sourceTree = ""; }; A292A6E40DFB45E5004B9C0A /* peer-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "peer-common.h"; path = "libtransmission/peer-common.h"; sourceTree = ""; }; A292A6E50DFB45EC004B9C0A /* webseed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = webseed.c; path = libtransmission/webseed.c; sourceTree = ""; }; A292A6E60DFB45EC004B9C0A /* webseed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = webseed.h; path = libtransmission/webseed.h; sourceTree = ""; }; @@ -896,6 +899,8 @@ 4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */, A2725B6C0DE5C4F5003445E7 /* FileListNode.h */, A2725B6D0DE5C4F5003445E7 /* FileListNode.m */, + A28F4F750E085BDC003A3882 /* ColorTextField.h */, + A28F4F760E085BDC003A3882 /* ColorTextField.m */, A25AFDE70D1038AD0092A1BA /* MenuLabel.h */, A25AFDE80D1038AD0092A1BA /* MenuLabel.m */, A26AF2820D2DC27C00FF7140 /* AddWindowController.h */, @@ -1978,6 +1983,7 @@ A2DF57740DE46A6A000795D5 /* QuickLookController.m in Sources */, A2725B6E0DE5C4F5003445E7 /* FileListNode.m in Sources */, A2725D5D0DE7507C003445E7 /* TrackerTableView.m in Sources */, + A28F4F770E085BDC003A3882 /* ColorTextField.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/macosx/ColorTextField.h b/macosx/ColorTextField.h new file mode 100644 index 000000000..8dddc87df --- /dev/null +++ b/macosx/ColorTextField.h @@ -0,0 +1,29 @@ +/****************************************************************************** + * $Id$ + * + * Copyright (c) 2008 Transmission authors and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +#import + +@interface ColorTextField : NSTextField + +@end diff --git a/macosx/ColorTextField.m b/macosx/ColorTextField.m new file mode 100644 index 000000000..1a30206a7 --- /dev/null +++ b/macosx/ColorTextField.m @@ -0,0 +1,42 @@ +/****************************************************************************** + * $Id$ + * + * Copyright (c) 2008 Transmission authors and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +#import "ColorTextField.h" + +@implementation ColorTextField + +- (void) awakeFromNib +{ + [self setEnabled: [self isEnabled]]; +} + +- (void) setEnabled: (BOOL) flag +{ + [super setEnabled: flag]; + + NSColor * color = flag ? [NSColor controlTextColor] : [NSColor disabledControlTextColor]; + [self setTextColor: color]; +} + +@end diff --git a/macosx/English.lproj/PrefsWindow.xib b/macosx/English.lproj/PrefsWindow.xib index d48de5f0b..7003854c7 100644 --- a/macosx/English.lproj/PrefsWindow.xib +++ b/macosx/English.lproj/PrefsWindow.xib @@ -8,8 +8,7 @@ 352.00 YES - - + YES @@ -373,7 +372,7 @@ YES - + 256 YES @@ -844,7 +843,6 @@ {{10, 33}, {489, 226}} - Adding @@ -852,7 +850,7 @@ - + 256 YES @@ -1299,7 +1297,7 @@ 256 - {{417, 87}, {55, 17}} + {{417, 84}, {55, 17}} YES @@ -1496,20 +1494,21 @@ {{10, 33}, {489, 226}} + Management - + 0 YES YES YES - + @@ -1518,7 +1517,7 @@ NSResponder - + 256 YES @@ -2113,6 +2112,7 @@ AAABAAAAAQ {535, 226} + NSView NSResponder @@ -2543,6 +2543,7 @@ AAABAAAAAQ 256 {{497, 12}, {21, 23}} + YES 67239424 @@ -2566,6 +2567,7 @@ AAABAAAAAQ 256 {{34, 34}, {90, 17}} + YES 67239424 @@ -2582,6 +2584,7 @@ AAABAAAAAQ 256 {{127, 33}, {357, 18}} + YES 67239424 @@ -2605,6 +2608,7 @@ AAABAAAAAQ {{311, 253}, {16, 16}} + 28938 1.000000e+02 @@ -2625,6 +2629,7 @@ AAABAAAAAQ {{312, 254}, {14, 14}} + YES 130560 @@ -2645,6 +2650,7 @@ AAABAAAAAQ 256 {{126, 253}, {124, 17}} + YES 67239424 @@ -2661,6 +2667,7 @@ AAABAAAAAQ 256 {{127, 229}, {171, 18}} + YES 67239424 @@ -2683,6 +2690,7 @@ AAABAAAAAQ 256 {{127, 172}, {229, 18}} + YES 67239424 @@ -2705,6 +2713,7 @@ AAABAAAAAQ 256 {{255, 251}, {50, 22}} + YES -1804468671 @@ -2771,6 +2780,7 @@ AAABAAAAAQ 256 {{126, 213}, {238, 14}} + YES 67239424 @@ -2787,6 +2797,7 @@ AAABAAAAAQ 256 {{331, 253}, {154, 17}} + YES 67239424 @@ -2803,6 +2814,7 @@ AAABAAAAAQ 256 {{63, 254}, {61, 17}} + YES 67239424 @@ -2819,6 +2831,7 @@ AAABAAAAAQ 256 {{80, 173}, {44, 17}} + YES 67239424 @@ -2835,6 +2848,7 @@ AAABAAAAAQ 256 {{197, 145}, {208, 22}} + YES -1804468671 @@ -2852,6 +2866,7 @@ AAABAAAAAQ 256 {{168, 73}, {68, 17}} + YES 67239424 @@ -2868,6 +2883,7 @@ AAABAAAAAQ 256 {{165, 99}, {71, 17}} + YES 67239424 @@ -2884,6 +2900,7 @@ AAABAAAAAQ 256 {{145, 147}, {47, 17}} + YES 67239424 @@ -2900,6 +2917,7 @@ AAABAAAAAQ 256 {{146, 123}, {187, 18}} + YES 67239424 @@ -2922,6 +2940,7 @@ AAABAAAAAQ 256 {{241, 71}, {164, 22}} + YES 343014976 @@ -2943,6 +2962,7 @@ AAABAAAAAQ 256 {{241, 97}, {164, 22}} + YES -1804468671 @@ -2960,6 +2980,7 @@ AAABAAAAAQ 256 {{410, 143}, {91, 26}} + YES -2076049856 @@ -3023,6 +3044,7 @@ AAABAAAAAQ {535, 293} + NSView NSResponder @@ -3036,6 +3058,7 @@ AAABAAAAAQ 256 {{99, 221}, {96, 17}} + YES 67239424 @@ -3052,6 +3075,7 @@ AAABAAAAAQ 256 {{122, 263}, {68, 17}} + YES 67239424 @@ -3068,6 +3092,7 @@ AAABAAAAAQ 256 {{119, 291}, {71, 17}} + YES 67239424 @@ -3084,6 +3109,7 @@ AAABAAAAAQ 256 {{201, 219}, {50, 22}} + YES -1804468671 @@ -3150,6 +3176,7 @@ AAABAAAAAQ 256 {{81, 367}, {158, 18}} + YES 67239424 @@ -3172,6 +3199,7 @@ AAABAAAAAQ 256 {{100, 315}, {165, 18}} + YES 67239424 @@ -3194,6 +3222,7 @@ AAABAAAAAQ 256 {{99, 351}, {342, 14}} + YES 67239424 @@ -3210,6 +3239,7 @@ AAABAAAAAQ 256 {{195, 261}, {179, 22}} + YES 343014976 @@ -3231,6 +3261,7 @@ AAABAAAAAQ 256 {{99, 182}, {123, 17}} + YES 67239424 @@ -3257,12 +3288,14 @@ AAABAAAAAQ 256 {332, 95} + YES 256 {332, 17} + @@ -3270,6 +3303,7 @@ AAABAAAAAQ 256 {{333, 0}, {16, 17}} + YES @@ -3395,6 +3429,7 @@ AAABAAAAAQ {{1, 17}, {332, 95}} + @@ -3405,6 +3440,7 @@ AAABAAAAAQ 256 {{333, 17}, {15, 95}} + _doScroller: 9.914530e-01 @@ -3414,6 +3450,7 @@ AAABAAAAAQ 256 {{-100, -100}, {327, 15}} + 1 _doScroller: @@ -3428,6 +3465,7 @@ AAABAAAAAQ {{1, 0}, {332, 17}} + @@ -3437,6 +3475,7 @@ AAABAAAAAQ {{102, 63}, {349, 113}} + 18 @@ -3451,6 +3490,7 @@ AAABAAAAAQ 292 {{102, 35}, {67, 23}} + YES -2080244224 @@ -3489,6 +3529,7 @@ AAABAAAAAQ 256 {{174, 39}, {275, 14}} + YES 67239424 @@ -3505,6 +3546,7 @@ AAABAAAAAQ 256 {{195, 289}, {179, 22}} + YES -1804468671 @@ -3522,6 +3564,7 @@ AAABAAAAAQ 256 {{493, 12}, {25, 25}} + YES 67239424 @@ -3540,10 +3583,24 @@ AAABAAAAAQ {535, 403} + NSView NSResponder + + YES + Proxy + ProxyAuthorize + RPC + RPCAuthorize + Queue + QueueSeed + CheckStalled + CheckDownload + CheckUpload + SpeedLimitAuto + YES @@ -5921,6 +5978,350 @@ AAABAAAAAQ 1674 + + + enabled: values.Proxy + + + + + + enabled: values.Proxy + enabled + values.Proxy + 2 + + + 1686 + + + + enabled: values.Proxy + + + + + + enabled: values.Proxy + enabled + values.Proxy + 2 + + + 1687 + + + + enabled: values.Proxy + + + + + + enabled: values.Proxy + enabled + values.Proxy + 2 + + + 1688 + + + + enabled2: values.ProxyAuthorize + + + + + + enabled2: values.ProxyAuthorize + enabled2 + values.ProxyAuthorize + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 1689 + + + + enabled2: values.ProxyAuthorize + + + + + + enabled2: values.ProxyAuthorize + enabled2 + values.ProxyAuthorize + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 1690 + + + + enabled: values.RPC + + + + + + enabled: values.RPC + enabled + values.RPC + 2 + + + 1691 + + + + enabled: values.RPC + + + + + + enabled: values.RPC + enabled + values.RPC + 2 + + + 1692 + + + + enabled2: values.RPCAuthorize + + + + + + enabled2: values.RPCAuthorize + enabled2 + values.RPCAuthorize + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 1693 + + + + enabled2: values.RPCAuthorize + + + + + + enabled2: values.RPCAuthorize + enabled2 + values.RPCAuthorize + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 1694 + + + + enabled: values.RPC + + + + + + enabled: values.RPC + enabled + values.RPC + 2 + + + 1695 + + + + enabled: values.RPC + + + + + + enabled: values.RPC + enabled + values.RPC + 2 + + + 1696 + + + + enabled: values.Queue + + + + + + enabled: values.Queue + enabled + values.Queue + 2 + + + 1697 + + + + enabled: values.QueueSeed + + + + + + enabled: values.QueueSeed + enabled + values.QueueSeed + 2 + + + 1698 + + + + enabled: values.CheckStalled + + + + + + enabled: values.CheckStalled + enabled + values.CheckStalled + 2 + + + 1699 + + + + enabled: values.CheckDownload + + + + + + enabled: values.CheckDownload + enabled + values.CheckDownload + 2 + + + 1700 + + + + enabled: values.CheckUpload + + + + + + enabled: values.CheckUpload + enabled + values.CheckUpload + 2 + + + 1701 + + + + enabled: values.SpeedLimitAuto + + + + + + enabled: values.SpeedLimitAuto + enabled + values.SpeedLimitAuto + 2 + + + 1702 + @@ -8295,6 +8696,7 @@ AAABAAAAAQ 1483.ImportedFromIB2 1491.IBPluginDependency 1491.ImportedFromIB2 + 1492.CustomClassName 1492.IBPluginDependency 1492.ImportedFromIB2 1495.IBPluginDependency @@ -8303,6 +8705,7 @@ AAABAAAAAQ 1504.ImportedFromIB2 1509.IBPluginDependency 1510.IBPluginDependency + 1516.CustomClassName 1516.IBPluginDependency 1516.ImportedFromIB2 1518.IBPluginDependency @@ -8334,26 +8737,32 @@ AAABAAAAAQ 155.ImportedFromIB2 1552.IBPluginDependency 1553.IBPluginDependency + 1554.CustomClassName 1554.IBPluginDependency 1554.ImportedFromIB2 + 1556.CustomClassName 1556.IBPluginDependency 1556.ImportedFromIB2 156.IBPluginDependency 156.ImportedFromIB2 157.IBPluginDependency 157.ImportedFromIB2 + 158.CustomClassName 158.IBPluginDependency 158.ImportedFromIB2 1589.IBPluginDependency 1589.ImportedFromIB2 + 159.CustomClassName 159.IBPluginDependency 159.ImportedFromIB2 1598.IBPluginDependency 1598.ImportedFromIB2 1603.IBPluginDependency 1604.IBPluginDependency + 1605.CustomClassName 1605.IBPluginDependency 1605.ImportedFromIB2 + 1606.CustomClassName 1606.IBPluginDependency 1606.ImportedFromIB2 1607.IBPluginDependency @@ -8366,6 +8775,7 @@ AAABAAAAAQ 163.ImportedFromIB2 1644.IBPluginDependency 1644.ImportedFromIB2 + 1657.CustomClassName 1657.IBPluginDependency 1657.ImportedFromIB2 1660.IBPluginDependency @@ -8436,6 +8846,7 @@ AAABAAAAAQ 257.ImportedFromIB2 262.IBPluginDependency 262.ImportedFromIB2 + 263.CustomClassName 263.IBPluginDependency 263.ImportedFromIB2 264.IBPluginDependency @@ -8458,6 +8869,7 @@ AAABAAAAAQ 307.ImportedFromIB2 31.IBPluginDependency 31.ImportedFromIB2 + 310.CustomClassName 310.IBPluginDependency 310.ImportedFromIB2 32.IBPluginDependency @@ -8521,6 +8933,7 @@ AAABAAAAAQ 59.ImportedFromIB2 604.IBPluginDependency 604.ImportedFromIB2 + 606.CustomClassName 606.IBPluginDependency 606.ImportedFromIB2 607.IBPluginDependency @@ -8533,6 +8946,7 @@ AAABAAAAAQ 630.ImportedFromIB2 636.IBPluginDependency 636.ImportedFromIB2 + 638.CustomClassName 638.IBPluginDependency 638.ImportedFromIB2 639.IBPluginDependency @@ -8667,6 +9081,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8675,6 +9090,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8706,26 +9122,32 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8738,6 +9160,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8815,6 +9238,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8837,6 +9261,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8900,6 +9325,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8912,6 +9338,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin + ColorTextField com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -8974,11 +9401,19 @@ AAABAAAAAQ - 1685 + 1702 YES + + ColorTextField + NSTextField + + IBProjectSource + macosx/ColorTextField.h + + FirstResponder NSObject