aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-02-09 17:14:15 +0800
committermiwi <miwi@FreeBSD.org>2007-02-09 17:14:15 +0800
commit7772bcb994a60a101c8bfd9f035990f52432b6c2 (patch)
tree0fb59f5d7fdeb106019b5cdd3b8dc43235957a3c /sysutils
parent1d3a4843a9edbd657dd58e611ddfc98d185d09d1 (diff)
downloadfreebsd-ports-graphics-7772bcb994a60a101c8bfd9f035990f52432b6c2.tar.gz
freebsd-ports-graphics-7772bcb994a60a101c8bfd9f035990f52432b6c2.tar.zst
freebsd-ports-graphics-7772bcb994a60a101c8bfd9f035990f52432b6c2.zip
- Fix Display the correct battery level
PR: 108322 Submitted by: miwi Approved by: maintainer timeout
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xfce4-battery-plugin/Makefile1
-rw-r--r--sysutils/xfce4-battery-plugin/files/patch-battery.c31
-rw-r--r--sysutils/xfce4-battery-plugin/pkg-descr2
3 files changed, 33 insertions, 1 deletions
diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile
index ee5b1767559..fca12933190 100644
--- a/sysutils/xfce4-battery-plugin/Makefile
+++ b/sysutils/xfce4-battery-plugin/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xfce4-battery-plugin
PORTVERSION= 0.5.0
+PORTREVISION= 1
CATEGORIES= sysutils xfce
MASTER_SITES= http://goodies.xfce.org/releases/${PORTNAME}/
DIST_SUBDIR= xfce4
diff --git a/sysutils/xfce4-battery-plugin/files/patch-battery.c b/sysutils/xfce4-battery-plugin/files/patch-battery.c
new file mode 100644
index 00000000000..847a8f9cd88
--- /dev/null
+++ b/sysutils/xfce4-battery-plugin/files/patch-battery.c
@@ -0,0 +1,31 @@
+--- panel-plugin/battery.c.orig Wed Jan 24 20:42:09 2007
++++ panel-plugin/battery.c Wed Jan 24 20:46:51 2007
+@@ -378,6 +378,7 @@
+ rate = last_rate;
+ }
+
++#ifdef __linux__
+ charge = (((float)ccapacity)/((float)lcapacity))*100;
+
+ if ( last_acline )
+@@ -389,6 +390,20 @@
+ time_remaining = 0;
+
+ 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;
++
++ last_acline = acline;
++#endif
+
+ }
+ #ifdef __linux__
diff --git a/sysutils/xfce4-battery-plugin/pkg-descr b/sysutils/xfce4-battery-plugin/pkg-descr
index cfaa0e46e1e..ebeeca3d4ea 100644
--- a/sysutils/xfce4-battery-plugin/pkg-descr
+++ b/sysutils/xfce4-battery-plugin/pkg-descr
@@ -1,3 +1,3 @@
Battery monitor panel plugin for XFce4.
-WWW: http://www.xfce.org/
+WWW: http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin