From: Lars Op den Kamp Date: Fri, 10 Feb 2012 20:15:01 +0000 (+0100) Subject: cec-config-gui: display the detected menu language X-Git-Tag: upstream/2.2.0~1^2~35^2~106 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f976869e75bd69e92e02d4a28c87403e2491da4d;p=deb_libcec.git cec-config-gui: display the detected menu language --- diff --git a/src/cec-config-gui/CecConfigGUI.cs b/src/cec-config-gui/CecConfigGUI.cs index 15d3f0d..979e59b 100644 --- a/src/cec-config-gui/CecConfigGUI.cs +++ b/src/cec-config-gui/CecConfigGUI.cs @@ -226,6 +226,9 @@ namespace CecConfigGui case UpdateEventType.HDMIPort: Config.HDMIPort = (byte)updateEvent.IntValue; break; + case UpdateEventType.MenuLanguage: + SetControlText(cbUseTVMenuLanguage, "Use the TV's language setting" + (updateEvent.StringValue.Length > 0 ? " (" + updateEvent.StringValue + ")" : "")); + break; case UpdateEventType.HasAVRDevice: if (HasAVRDevice != updateEvent.BoolValue) { diff --git a/src/cec-config-gui/actions/ConnectToDevice.cs b/src/cec-config-gui/actions/ConnectToDevice.cs index febc517..9250ad0 100644 --- a/src/cec-config-gui/actions/ConnectToDevice.cs +++ b/src/cec-config-gui/actions/ConnectToDevice.cs @@ -32,6 +32,10 @@ namespace CecConfigGui.actions SendEvent(UpdateEventType.ProgressBar, 25); SendEvent(UpdateEventType.TVVendorId, (int)Lib.GetDeviceVendorId(CecLogicalAddress.Tv)); + SendEvent(UpdateEventType.StatusText, "Detecting menu language..."); + SendEvent(UpdateEventType.ProgressBar, 40); + SendEvent(UpdateEventType.MenuLanguage, Lib.GetDeviceMenuLanguage(CecLogicalAddress.Tv)); + SendEvent(UpdateEventType.ProgressBar, 50); SendEvent(UpdateEventType.StatusText, "Detecting AVR devices..."); diff --git a/src/cec-config-gui/actions/UpdateEvent.cs b/src/cec-config-gui/actions/UpdateEvent.cs index b559764..6d19757 100644 --- a/src/cec-config-gui/actions/UpdateEvent.cs +++ b/src/cec-config-gui/actions/UpdateEvent.cs @@ -17,7 +17,8 @@ namespace CecConfigGui PhysicalAddress, HasAVRDevice, AVRVendorId, - Configuration + Configuration, + MenuLanguage } public class UpdateEvent : EventArgs