- Update to 0.5.1

This commit is contained in:
Martin Wilke 2008-09-05 14:15:36 +00:00
parent e902fbd0ab
commit 92598fa071
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=219911
5 changed files with 57 additions and 57 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= xfce4-battery-plugin
PORTVERSION= 0.5.0
PORTREVISION= 6
PORTVERSION= 0.5.1
CATEGORIES= sysutils xfce
MASTER_SITES= http://goodies.xfce.org/releases/${PORTNAME}/
DIST_SUBDIR= xfce4
@ -15,7 +14,7 @@ DIST_SUBDIR= xfce4
MAINTAINER= miwi@FreeBSD.org
COMMENT= Battery monitor panel plugin for XFce4
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS= i386
GNU_CONFIGURE= yes
USE_BZIP2= yes

View File

@ -1,3 +1,3 @@
MD5 (xfce4/xfce4-battery-plugin-0.5.0.tar.bz2) = c1d923bb90b79087ca7044bcc24bab5a
SHA256 (xfce4/xfce4-battery-plugin-0.5.0.tar.bz2) = 4428f2fe1f5f28e6cc711278fd9c5c90f325cf0c5298f98a5d60940116cbcef8
SIZE (xfce4/xfce4-battery-plugin-0.5.0.tar.bz2) = 222269
MD5 (xfce4/xfce4-battery-plugin-0.5.1.tar.bz2) = d8a666d85bb3c1dd007b547de4dd7037
SHA256 (xfce4/xfce4-battery-plugin-0.5.1.tar.bz2) = 6b90a37d8f01d2f042679a3f3f92f08dee96510096115f52fb9210ef4cad7c61
SIZE (xfce4/xfce4-battery-plugin-0.5.1.tar.bz2) = 227940

View File

@ -1,31 +0,0 @@
--- 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__

View File

@ -1,18 +1,5 @@
Patch attached with submission follows:
--- panel-plugin/battery.c (revision 3756)
+++ panel-plugin/battery.c (working copy)
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__))
#include <machine/apm_bios.h>
#elif __OpenBSD__
#include <sys/param.h>
--- panel-plugin/battery.c.orgi 2008-09-04 22:53:40.000000000 +0200
+++ panel-plugin/battery.c 2008-09-05 10:02:08.000000000 +0200
@@ -163,7 +163,9 @@
except that is does not work on FreeBSD
@ -27,11 +14,36 @@ Patch attached with submission follows:
acline = apm.ac_state ? TRUE : FALSE;
#else
+#ifdef APMDEVICE
struct apm_info apm;
- struct apm_info apm;
+#ifdef APMDEVICE
+struct apm_info apm;
+#endif
DBG ("Updating battery status...");
if(battmon->method == BM_BROKEN) {
@@ -382,6 +386,7 @@
rate = last_rate;
}
+#ifdef __linux__
charge = (((float)ccapacity)/((float)lcapacity))*100;
if ( last_acline )
@@ -394,6 +399,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 {

View File

@ -4,14 +4,34 @@ share/icons/hicolor/22x22/devices/battery.png
share/icons/hicolor/24x24/devices/battery.png
share/icons/hicolor/32x32/devices/battery.png
share/icons/hicolor/scalable/devices/battery.svg
share/locale/ar/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/ca/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/cs/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/da/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/de/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/el/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/en_GB/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/eu/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/fi/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/fr/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/gl/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/id/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/it/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/lv/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/nb_NO/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/pl/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/pt_BR/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/pt_PT/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/sq/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/uk/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/ur/LC_MESSAGES/xfce4-battery-plugin.mo
share/locale/zh_TW/LC_MESSAGES/xfce4-battery-plugin.mo
share/xfce4/panel-plugins/battmon.desktop
@dirrmtry share/xfce4/panel-plugins
@dirrmtry share/xfce4
@dirrmtry share/locale/ur/LC_MESSAGES
@dirrmtry share/locale/ur
@dirrmtry share/locale/nb_NO/LC_MESSAGES
@dirrmtry share/locale/nb_NO
@dirrmtry libexec/xfce4/panel-plugins
@dirrmtry libexec/xfce4