cec-config-gui: don't enable the 'connected device' selection when there's only one...
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 14 Feb 2012 11:01:53 +0000 (12:01 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 14 Feb 2012 11:01:53 +0000 (12:01 +0100)
src/cec-config-gui/CecConfigGUI.cs

index 979e59ba9b9b3fd0816bc047f51d9bda8dff301a..f2a4760196bb841524db88128b11072e5924bd74 100644 (file)
@@ -113,7 +113,7 @@ namespace CecConfigGui
     private void SetControlsEnabled(bool val)
     {
       SetControlEnabled(cbPortNumber, val);
-      SetControlEnabled(cbConnectedDevice, val);
+      SetControlEnabled(cbConnectedDevice, cbConnectedDevice.Items.Count > 1 ? val : false);
       SetControlEnabled(tbPhysicalAddress, val);
       SetControlEnabled(cbDeviceType, val);
       SetControlEnabled(cbUseTVMenuLanguage, val);