From 643962eb2d46d48042db0ab278c46813da8b6e9b Mon Sep 17 00:00:00 2001 From: Ali Abdallah <aliov@xfce.org> Date: Mon, 27 Jun 2011 14:27:15 +0000 Subject: Fix Broken empty battery icon.. --- diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 9d8bbd9..763b014 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -309,10 +309,14 @@ xfpm_battery_refresh_icon (XfpmBattery *battery) battery->priv->icon_prefix, xfpm_battery_get_icon_index (battery->priv->type, battery->priv->percentage)); } + else if ( battery->priv->state == XFPM_DEVICE_STATE_EMPTY) + { + g_snprintf (icon_name, 128, "%s%s", battery->priv->icon_prefix, battery->priv->ac_online ? "000-charging" : "000"); + } } else { - if ( !battery->priv->present ) + if ( !battery->priv->present || battery->priv->state == XFPM_DEVICE_STATE_EMPTY ) { g_snprintf (icon_name, 128, "%s-000", battery->priv->icon_prefix); } -- cgit