From: Lars Op den Kamp Date: Tue, 12 Mar 2013 23:37:10 +0000 (+0100) Subject: CecTray: display a warning if we can't poll the TV X-Git-Tag: upstream/2.2.0~1^2~4^2~28 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a604c2182886d2ce8e8d930546b36289956e4b4f;p=deb_libcec.git CecTray: display a warning if we can't poll the TV --- diff --git a/src/LibCecTray/Properties/Resources.Designer.cs b/src/LibCecTray/Properties/Resources.Designer.cs index 525ed2d..e43f856 100644 --- a/src/LibCecTray/Properties/Resources.Designer.cs +++ b/src/LibCecTray/Properties/Resources.Designer.cs @@ -340,7 +340,12 @@ namespace LibCECTray.Properties { } /// - /// Looks up a localized string similar to The TV does not respond to polls. This is caused by one of the following: a) the TV does not support CEC, or b) CEC has been disabled in the TV's settings or c) the HDMI cable between the TV and adapter is faulty.. + /// Looks up a localized string similar to The TV does not respond to CEC polls. This is caused by one of the following: + ///a) the TV does not support CEC; + ///b) CEC has been disabled in the TV's settings; + ///c) the HDMI cable between the TV and adapter is faulty. + /// + ///CEC will not work (properly) if the TV does not support CEC, or has CEC disabled in it's settings.. /// internal static string alert_tv_poll_failed { get { diff --git a/src/LibCecTray/Properties/Resources.resx b/src/LibCecTray/Properties/Resources.resx index 6da4722..1daef7c 100644 --- a/src/LibCecTray/Properties/Resources.resx +++ b/src/LibCecTray/Properties/Resources.resx @@ -610,7 +610,12 @@ The device needs servicing. Please download and run the latest firmware upgrade from http://packages.pulse-eight.net/ - The TV does not respond to polls. This is caused by one of the following: a) the TV does not support CEC, or b) CEC has been disabled in the TV's settings or c) the HDMI cable between the TV and adapter is faulty. + The TV does not respond to CEC polls. This is caused by one of the following: +a) the TV does not support CEC; +b) CEC has been disabled in the TV's settings; +c) the HDMI cable between the TV and adapter is faulty. + +CEC will not work (properly) if the TV does not support CEC, or has CEC disabled in it's settings. Warning from libCEC diff --git a/src/LibCecTray/controller/CECController.cs b/src/LibCecTray/controller/CECController.cs index c394c08..6db2267 100644 --- a/src/LibCecTray/controller/CECController.cs +++ b/src/LibCecTray/controller/CECController.cs @@ -372,22 +372,22 @@ namespace LibCECTray.controller switch (alert) { case CecAlert.ServiceDevice: - MessageBox.Show(Resources.alert_service_device, Resources.cec_alert, MessageBoxButtons.OK); + MessageBox.Show(Resources.alert_service_device, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; case CecAlert.ConnectionLost: - MessageBox.Show(Resources.alert_connection_lost, Resources.cec_alert, MessageBoxButtons.OK); + MessageBox.Show(Resources.alert_connection_lost, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; case CecAlert.PermissionError: - MessageBox.Show(Resources.alert_permission_error, Resources.cec_alert, MessageBoxButtons.OK); + MessageBox.Show(Resources.alert_permission_error, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; case CecAlert.PortBusy: - MessageBox.Show(Resources.alert_port_busy, Resources.cec_alert, MessageBoxButtons.OK); + MessageBox.Show(Resources.alert_port_busy, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; case CecAlert.PhysicalAddressError: - MessageBox.Show(Resources.alert_physical_address_error, Resources.cec_alert, MessageBoxButtons.OK); + MessageBox.Show(Resources.alert_physical_address_error, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; case CecAlert.TVPollFailed: - MessageBox.Show(Resources.alert_tv_poll_failed, Resources.cec_alert, MessageBoxButtons.OK); + MessageBox.Show(Resources.alert_tv_poll_failed, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); break; } return 1; diff --git a/src/LibCecTray/controller/actions/ConnectToDevice.cs b/src/LibCecTray/controller/actions/ConnectToDevice.cs index f2ccfc0..6a832c5 100644 --- a/src/LibCecTray/controller/actions/ConnectToDevice.cs +++ b/src/LibCecTray/controller/actions/ConnectToDevice.cs @@ -108,6 +108,11 @@ namespace LibCECTray.controller.actions SendEvent(UpdateEventType.StatusText, Resources.action_polling_active_devices); SendEvent(UpdateEventType.PollDevices); + if (!_lib.IsActiveDevice(CecLogicalAddress.Tv)) + { + MessageBox.Show(Resources.alert_tv_poll_failed, Resources.cec_alert, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + SendEvent(UpdateEventType.ProgressBar, 100); SendEvent(UpdateEventType.StatusText, Resources.ready); }