[Xfce4-commits] <xfce4-power-manager:master> Fix Broken empty battery icon..
Ali Abdallah
noreply at xfce.org
Mon Jun 27 16:28:01 CEST 2011
Updating branch refs/heads/master
to 643962eb2d46d48042db0ab278c46813da8b6e9b (commit)
from 41ddd1adfc2d0f527a977a6202ff67785bb414d9 (commit)
commit 643962eb2d46d48042db0ab278c46813da8b6e9b
Author: Ali Abdallah <aliov at xfce.org>
Date: Mon Jun 27 16:27:15 2011 +0200
Fix Broken empty battery icon..
src/xfpm-battery.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
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);
}
More information about the Xfce4-commits
mailing list