Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > 6fbbfac04a44f78715f1c5b19a278f7a > files > 3

xfce4-power-manager-1.0.10-2.fc16.src.rpm

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