From: Lars Op den Kamp Date: Tue, 14 Feb 2012 11:01:53 +0000 (+0100) Subject: cec-config-gui: don't enable the 'connected device' selection when there's only one... X-Git-Tag: upstream/2.2.0~1^2~35^2~59 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f2b8f0c0c5f78765d550e8bc7b8681f0b4276482;p=deb_libcec.git cec-config-gui: don't enable the 'connected device' selection when there's only one device --- diff --git a/src/cec-config-gui/CecConfigGUI.cs b/src/cec-config-gui/CecConfigGUI.cs index 979e59b..f2a4760 100644 --- a/src/cec-config-gui/CecConfigGUI.cs +++ b/src/cec-config-gui/CecConfigGUI.cs @@ -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);