--- xbattbar-old.c	2005-02-08 17:22:10.000000000 +0100
+++ xbattbar.c	2005-02-08 17:08:54.000000000 +0100
@@ -1005,15 +1005,14 @@
     timefull = (float)(acpi_batt_capacity[index] - pcap) / (float) rate * 60;
 
     /* Status. */
-    status = scan_acpi_value(buf, acpi_labels[label_charging_state]);
-    if (strcmp(status, "charging") == 0)
+    if (on_ac_power())
     {
-      /* Time left till full. */
+      /* System is on ac power */
       ac_line = ACPI_STAT_LINE_ON;
     }
     else
     {
-      /* Time left till empty. */
+      /* System runs on batteries */
       ac_line = ACPI_STAT_LINE_OFF;
     }
 

