X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcec-config-gui%2FCecConfigGUI.cs;h=4f84b2cf2f22de0005c37e87d98ce5b5c5f56cf3;hb=68b94c34ec2f7de6cd5db434e50242f3ebf8f65a;hp=80b4e6ef530f5986f5e148dd497318cdf22190cf;hpb=8670c97085f27ad5d7f3fc218247f32332462b1d;p=deb_libcec.git diff --git a/src/cec-config-gui/CecConfigGUI.cs b/src/cec-config-gui/CecConfigGUI.cs index 80b4e6e..4f84b2c 100644 --- a/src/cec-config-gui/CecConfigGUI.cs +++ b/src/cec-config-gui/CecConfigGUI.cs @@ -271,6 +271,7 @@ namespace CecConfigGui SetControlText(tbPhysicalAddress, string.Format("{0,4:X}", updateEvent.IntValue)); break; case UpdateEventType.ProgressBar: + SetControlVisible(pProgress, true); SetProgressValue(pProgress, updateEvent.IntValue); break; case UpdateEventType.TVVendorId: @@ -316,15 +317,16 @@ namespace CecConfigGui UpdatingInfoPanel.SetControlEnabled(UpdatingInfoPanel.bUpdate, true); UpdatingInfoPanel = null; } + SetControlVisible(pProgress, false); break; } } private void SetControlsEnabled(bool val) { - SetControlEnabled(cbPortNumber, val); - SetControlEnabled(cbConnectedDevice, cbConnectedDevice.Items.Count > 1 ? val : false); - SetControlEnabled(tbPhysicalAddress, val); + SetControlEnabled(cbPortNumber, val && !Config.AutodetectAddress); + SetControlEnabled(cbConnectedDevice, cbConnectedDevice.Items.Count > 1 && !Config.AutodetectAddress ? val : false); + SetControlEnabled(tbPhysicalAddress, val && !Config.AutodetectAddress); SetControlEnabled(cbDeviceType, val); SetControlEnabled(cbUseTVMenuLanguage, val); SetControlEnabled(cbActivateSource, val); @@ -373,6 +375,21 @@ namespace CecConfigGui } } + protected override void Dispose(bool disposing) + { + if (disposing) + { + Lib.DisableCallbacks(); + Lib.StandbyDevices(CecLogicalAddress.Broadcast); + Lib.Close(); + } + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + #region Actions public void ReloadXMLConfiguration() {