I knew this would happen. The battery applet is broken on BSD because I took a guess and it wasn't tested till now. Bug is: http://bugzilla.gnome.org/show_bug.cgi?id=151824 Patch is attached for review. Thanks --davyd -- http://davyd.ucc.asn.au/ PGP Fingerprint <http://davyd.ucc.asn.au/pgp> 08B0 341A 0B9B 08BB 2118 C060 2EDD BB4F 5191 6CDA
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-applets/battstat/ChangeLog,v
retrieving revision 1.133
diff -u -p -r1.133 ChangeLog
--- ChangeLog 30 Aug 2004 12:24:26 -0000 1.133
+++ ChangeLog 4 Sep 2004 14:22:37 -0000
@@ -1,3 +1,8 @@
+2004-09-04 Davyd Madeley <davyd madeley id au>
+
+ * battstat_applet.c: Fix a build problem for BSD. Closes #151824.
+ Patch from Julio M. Merino Vidal <jmmv menta net>.
+
2004-08-30 Davyd Madeley <davyd madeley id au>
* battstat_applet.c: Fix a crasher with battery notifications. Closes
Index: battstat_applet.c
===================================================================
RCS file: /cvs/gnome/gnome-applets/battstat/battstat_applet.c,v
retrieving revision 1.81
diff -u -p -r1.81 battstat_applet.c
--- battstat_applet.c 30 Aug 2004 12:24:26 -0000 1.81
+++ battstat_applet.c 4 Sep 2004 14:22:41 -0000
@@ -59,7 +59,9 @@
#include "battstat.h"
#include "pixmaps.h"
+#ifdef __linux__
#include "acpi-linux.h"
+#endif
#ifndef gettext_noop
#define gettext_noop(String) (String)
@@ -224,7 +226,7 @@ GdkColor darkred[] = {
};
#if defined(__NetBSD__) || defined(__OpenBSD__)
-typedef apm_power_info apm_info;
+#define apm_info apm_power_info
#endif
struct apm_info apminfo;
@@ -349,7 +351,7 @@ apm_readinfo (PanelApplet *applet, Progr
/* } */
-static char *get_remaining (apm_info apminfo)
+static char *get_remaining (struct apm_info apminfo)
{
int time;
int hours;
@@ -363,7 +365,7 @@ static char *get_remaining (apm_info apm
batt_life = apminfo.ai_batt_life;
#elif defined (__NetBSD__) || defined(__OpenBSD__)
acline_status = apminfo.ac_state ? 1 : 0;
- time = apminfo.battery_time;
+ time = apminfo.minutes_left;
batt_life = apminfo.battery_life;
#elif __linux__
acline_status = apminfo.ac_line_status ? 1 : 0;
Attachment:
signature.asc
Description: This is a digitally signed message part