Bug#234889: gnome-applets: battery monitor on Linux 2.6.5: patch
Ludovic Rousseau
Ludovic Rousseau <rousseau@debian.org>, 234889@bugs.debian.org
Sun, 18 Apr 2004 12:59:44 +0200
Package: gnome-applets
Version: 2.4.2-6
Severity: normal
Tags: patch
Followup-For: Bug #234889
Here is a simple patch for this bug:
diff -ru old/gnome-applets-2.4.2/battstat/acpi-linux.c gnome-applets-2.4.2/battstat/acpi-linux.c
--- old/gnome-applets-2.4.2/battstat/acpi-linux.c 2004-01-14 22:16:49.000000000 +0100
+++ gnome-applets-2.4.2/battstat/acpi-linux.c 2004-04-18 12:19:26.000000000 +0200
@@ -330,6 +330,7 @@
break;
case ACPI_EVENT_BATTERY_INFO:
update_battery_info(acpiinfo);
+ update_ac_info(acpiinfo);
result = TRUE;
break;
}
It seems that the event generated changed in recent Linux kernels.
Since an extra call to update_ac_info() is very cheap I think my
proposed patch is not very harmfull for older Linux kernels.