cec-config-gui: display the detected menu language
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 10 Feb 2012 20:15:01 +0000 (21:15 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 10 Feb 2012 20:15:01 +0000 (21:15 +0100)
src/cec-config-gui/CecConfigGUI.cs
src/cec-config-gui/actions/ConnectToDevice.cs
src/cec-config-gui/actions/UpdateEvent.cs

index 15d3f0de7fb684cd566c1e90ee81bbfa90c4b8de..979e59ba9b9b3fd0816bc047f51d9bda8dff301a 100644 (file)
@@ -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)
           {
index febc517e6b6709349f2be125c6c540c25d954de9..9250ad09b73a7fc9c447abee32325f8e79dc4a58 100644 (file)
@@ -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...");
 
index b559764ec6ed10b60f5f5dec9b98dbd03477ff19..6d19757121fe4d0abc522a3aebfb6512d0271151 100644 (file)
@@ -17,7 +17,8 @@ namespace CecConfigGui
     PhysicalAddress,
     HasAVRDevice,
     AVRVendorId,
-    Configuration
+    Configuration,
+    MenuLanguage
   }
 
   public class UpdateEvent : EventArgs