Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > ecd2520126fdccc9a6cefe67e120e770 > files > 2

xfce4-battery-plugin-0.5.1-5.fc13.src.rpm

--- panel-plugin/battery.c.old	2007-09-14 23:40:34.282880732 +0100
+++ panel-plugin/battery.c	2007-09-15 00:31:27.768941875 +0100
@@ -502,8 +502,16 @@ battmon.c:241: for each function it appe
 
 
     if(acline) {
-        char *t=(charge<99.9)?_("(Charging from AC)"):_("(AC on-line)");
-        if(battmon->options.tooltip_display_percentage) {
+        char *t1=(charge<99.9)?_("(Charging from AC)"):_("(AC on-line)");
+        char *t2=_("(No battery, AC on-line)");
+	char *t;
+
+        if((battmon->method == BM_USE_ACPI) && (acpiinfo->present == 0))
+	    t=t2;
+	else
+            t=t1;
+        
+	if(battmon->options.tooltip_display_percentage) {
             g_snprintf(buffer, sizeof(buffer), "%d%% %s", charge,t);
         }
         else