From 50439c50f0ae2c3d51375e17f403996d1a9cdab9 Mon Sep 17 00:00:00 2001 From: monsta Date: Wed, 4 Mar 2015 15:15:51 +0300 Subject: upower: handle UP_DEVICE_STATE_UNKNOWN, avoid assert Closes https://github.com/mate-desktop/mate-power-manager/pull/130 --- src/gpm-upower.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gpm-upower.c b/src/gpm-upower.c index 744eae4..82d12e9 100644 --- a/src/gpm-upower.c +++ b/src/gpm-upower.c @@ -648,6 +648,10 @@ gpm_device_state_to_localised_string (UpDeviceState state) /* TRANSLATORS: battery state */ state_string = _("Waiting to discharge"); break; + case UP_DEVICE_STATE_UNKNOWN: + /* TRANSLATORS: battery state */ + state_string = _("Unknown state"); + break; default: g_assert_not_reached (); break; -- cgit v1.2.1