cec-config-gui: fix 'enabled' status of cbPortNumber now that libCEC no longer unsets...
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 28 Feb 2012 00:50:40 +0000 (01:50 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 28 Feb 2012 00:50:40 +0000 (01:50 +0100)
src/cec-config-gui/CecConfigGUI.cs

index 5004e041024dfa77eac9913bfbc49a6fd09b4482..929bebab8054468993c289238f8162947ad38af6 100644 (file)
@@ -324,7 +324,7 @@ namespace CecConfigGui
 
     private void SetControlsEnabled(bool val)
     {
-      SetControlEnabled(cbPortNumber, val && !Config.AutodetectAddress);
+      SetControlEnabled(cbPortNumber, val && !Config.AutodetectAddress && Config.PhysicalAddress != 0);
       SetControlEnabled(cbConnectedDevice, cbConnectedDevice.Items.Count > 1 && !Config.AutodetectAddress ? val : false);
       SetControlEnabled(cbOverrideAddress, val);
       SetControlEnabled(tbPhysicalAddress, val && !Config.AutodetectAddress && cbOverrideAddress.Checked);