diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-09-24 12:01:53 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-09-24 12:01:53 +0000 |
commit | edf55c7a6d6f32b9e91e55a77c9a146db43caaac (patch) | |
tree | a276e1f58a1f17c69bb8aaf6d6e33b8cad555755 /sysutils/xfce4-battery-plugin/files | |
parent | e927e0b28602874e5f2de0294bd8b6bb90a527a8 (diff) |
Notes
Diffstat (limited to 'sysutils/xfce4-battery-plugin/files')
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-configure | 6 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c | 63 |
2 files changed, 13 insertions, 56 deletions
diff --git a/sysutils/xfce4-battery-plugin/files/patch-configure b/sysutils/xfce4-battery-plugin/files/patch-configure index a1d6a0e2fed0..20507a42bf52 100644 --- a/sysutils/xfce4-battery-plugin/files/patch-configure +++ b/sysutils/xfce4-battery-plugin/files/patch-configure @@ -1,5 +1,5 @@ ---- configure.orig Wed Jul 23 22:20:56 2003 -+++ configure Fri Aug 1 12:56:48 2003 +--- configure.orig Sat Aug 9 04:05:09 2003 ++++ configure Fri Sep 12 23:28:29 2003 @@ -19273,7 +19273,8 @@ @@ -10,7 +10,7 @@ # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' -@@ -19567,7 +19568,7 @@ +@@ -19651,7 +19652,7 @@ echo "$as_me:$LINENO: checking where to install panel plugins" >&5 echo $ECHO_N "checking where to install panel plugins... $ECHO_C" >&6 diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c index 036526de39cf..eb040a1e0f44 100644 --- a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c +++ b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c @@ -1,53 +1,10 @@ ---- panel-plugin/battmon.c.orig Fri Jul 18 15:15:29 2003 -+++ panel-plugin/battmon.c Fri Aug 1 12:14:50 2003 -@@ -32,6 +32,10 @@ - - #ifdef __FreeBSD__ - #include <machine/apm_bios.h> -+#include <fcntl.h> -+#ifndef APMDEVICE -+#define APMDEVICE "/dev/apm" -+#endif - #elif __OpenBSD__ - #include <sys/param.h> - #include <machine/apmvar.h> -@@ -187,6 +191,9 @@ - #else - struct apm_info apm; - #endif -+#if defined(__FreeBSD__) || defined(__OpenBSD__) -+ int fd; -+#endif - int charge; - int time_remaining; - gboolean acline; -@@ -217,8 +224,6 @@ - FreeBSD. Each time this functions is called (once every second) - the APM device is opened, read from and then closed. - */ -- int fd; -- - battmon->method = BM_BROKEN; - fd = open(APMDEVICE, O_RDONLY); - if (fd == -1) return TRUE; -@@ -232,12 +237,18 @@ - time_remaining = apm.ai_batt_time; - time_remaining = time_remaining / 60; /* convert from seconds to minutes */ - charge = apm.ai_batt_life; -+ -+ /* -+ * Work around a bug in the FreeBSD ACPI APM emulation layer which will -+ * sometimes return funny values for the battery life. -+ */ -+ if(charge > 100) { -+ charge = 100; -+ } - #elif __OpenBSD__ - /* Code for OpenBSD by Joe Ammond <jra@twinight.org>. Using the same - procedure as for FreeBSD. - */ -- int fd; -- - battmon->method = BM_BROKEN; - fd = open(APMDEVICE, O_RDONLY); - if (fd == -1) return TRUE; +--- panel-plugin/battmon.c.orig Fri Sep 12 23:38:01 2003 ++++ panel-plugin/battmon.c Fri Sep 12 23:38:24 2003 +@@ -362,6 +362,7 @@ + + + if(charge < 0) charge = 0; ++ if(charge > 100) charge = 100; + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(battmon->battstatus), charge / 100.0); + + if(battmon->options.display_label){ |