--- gnome-applets-2.0.3/battstat/acpi-linux.c	2002-09-13 21:58:51.000000000 +0200
+++ gnome-applets-2.0.3-patched/battstat/acpi-linux.c	2002-09-29 18:51:21.000000000 +0200
@@ -146,7 +146,7 @@
   gulong acpi_ver;
   char buf[BUFSIZ];
   GHashTable *hash;
-  const char *batt_info, *batt_state, *ac_state, *ac_state_state, *charging_state;
+  const char *batt_info1, *batt_info2, *batt_state1, *batt_state2, *ac_state, *ac_state_state, *charging_state;
 
   /*
    * apminfo.ac_line_status must be one when on ac power
@@ -169,20 +169,24 @@
   g_hash_table_destroy (hash);
 
   if (acpi_ver < (gulong)20020208) {
-    batt_info  = "/proc/acpi/battery/1/info";
-    batt_state = "/proc/acpi/battery/1/status";
-    ac_state   = "/proc/acpi/ac_adapter/0/status";
+    batt_info1  = "/proc/acpi/battery/1/info";
+    batt_state1 = "/proc/acpi/battery/1/status";
+    batt_info2  = "/proc/acpi/battery/2/info";
+    batt_state2 = "/proc/acpi/battery/2/status";
+    ac_state    = "/proc/acpi/ac_adapter/0/status";
     ac_state_state = "status";
     charging_state = "state";
   } else {
-    batt_info  = "/proc/acpi/battery/BAT1/info";
-    batt_state = "/proc/acpi/battery/BAT1/state";
-    ac_state   = "/proc/acpi/ac_adapter/ACAD/state";
+    batt_info1  = "/proc/acpi/battery/BAT1/info";
+    batt_state1 = "/proc/acpi/battery/BAT1/state";
+    batt_info2  = "/proc/acpi/battery/BAT2/info";
+    batt_state2 = "/proc/acpi/battery/BAT2/state";
+    ac_state    = "/proc/acpi/ac_adapter/ACAD/state";
     ac_state_state = "state";
     charging_state = "charging state";
   }
 
-  hash = read_file (batt_info, buf, sizeof (buf));
+  hash = read_file (batt_info1, buf, sizeof (buf));
   if (hash)
     {
       max_capacity = read_long (hash, "design capacity");
@@ -190,14 +194,23 @@
       critical_capacity = read_long (hash, "design capacity low");
       g_hash_table_destroy (hash);
     }
-  
+
+  hash = read_file (batt_info2, buf, sizeof (buf));
+  if (hash)
+    {
+      max_capacity += read_long (hash, "design capacity");
+      low_capacity += read_long (hash, "design capacity warning");
+      critical_capacity += read_long (hash, "design capacity low");
+      g_hash_table_destroy (hash);
+    }
+
   if (!max_capacity)
     return FALSE;
   
   charging = FALSE;
   remain = 0;
 
-  hash = read_file (batt_state, buf, sizeof (buf));
+  hash = read_file (batt_state1, buf, sizeof (buf));
   if (hash)
     {
       const char *s;
@@ -207,6 +220,13 @@
       g_hash_table_destroy (hash);
     }
 
+  hash = read_file (batt_state2, buf, sizeof (buf));
+  if (hash)
+    {
+      remain += read_long (hash, "remaining capacity");
+      g_hash_table_destroy (hash);
+    }
+
   ac_online = FALSE;
   
   hash = read_file (ac_state, buf, sizeof (buf));
