aboutsummaryrefslogtreecommitdiff
path: root/sysutils/xfce4-battery-plugin/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2011-03-17 15:46:49 +0000
committerMartin Wilke <miwi@FreeBSD.org>2011-03-17 15:46:49 +0000
commit9fc8f267f405bda41b14ea8d0020c5e5e02938ae (patch)
tree02c4c63efcb44801c23dfc8944f6ce99093353a1 /sysutils/xfce4-battery-plugin/files
parentd9106b3dbac84a14015c7d5df3c3a4fc7bcd349c (diff)
Notes
Diffstat (limited to 'sysutils/xfce4-battery-plugin/files')
-rw-r--r--sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c
deleted file mode 100644
index e3b9a4b423ee..000000000000
--- a/sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c
+++ /dev/null
@@ -1,59 +0,0 @@
---- panel-plugin/battery.c.orig 2008-09-04 17:53:40.000000000 -0300
-+++ panel-plugin/battery.c 2008-09-10 21:53:56.000000000 -0300
-@@ -26,7 +26,9 @@
- #endif
-
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+#if defined(__i386___)
- #include <machine/apm_bios.h>
-+#endif
- #elif __OpenBSD__
- #include <sys/param.h>
- #include <machine/apmvar.h>
-@@ -163,7 +165,9 @@
- except that is does not work on FreeBSD
-
- */
-+#ifdef APMDEVICE
- struct apm_info apm;
-+#endif
- int fd;
-
- /* First check to see if ACPI is available */
-@@ -310,7 +314,9 @@
- acline = apm.ac_state ? TRUE : FALSE;
-
- #else
-- struct apm_info apm;
-+#ifdef APMDEVICE
-+struct apm_info apm;
-+#endif
- DBG ("Updating battery status...");
-
- if(battmon->method == BM_BROKEN) {
-@@ -382,6 +388,7 @@
- rate = last_rate;
- }
-
-+#ifdef __linux__
- charge = (((float)ccapacity)/((float)lcapacity))*100;
-
- if ( last_acline )
-@@ -394,6 +401,17 @@
-
- last_acline = acline;
-
-+#elif __FreeBSD__
-+ charge = acpistate->percentage;
-+
-+ if ( last_acline)
-+ time_remaining = acpistate->rtime;
-+ else
-+ time_remaining = acpistate->rtime;
-+
-+ if ( time_remaining < 0 )
-+ time_remaining = 0;
-+#endif
- }
- #ifdef __linux__
- else {