From: | "Christoph Mende (angelos)" <angelos@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in xfce-extra/xfce4-battery/files: xfce4-battery-0.5.1-freebsd.patch |
Date: | Mon, 08 Sep 2008 16:20:37 |
Message-Id: | E1KcjTf-0008Gd-3c@stork.gentoo.org |
1 | angelos 08/09/08 16:20:35 |
2 | |
3 | Added: xfce4-battery-0.5.1-freebsd.patch |
4 | Log: |
5 | Version bump |
6 | (Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.1 xfce-extra/xfce4-battery/files/xfce4-battery-0.5.1-freebsd.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.1-freebsd.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.1-freebsd.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: xfce4-battery-0.5.1-freebsd.patch |
15 | =================================================================== |
16 | --- panel-plugin/battery.c.orig 2008-09-04 22:53:40.000000000 +0200 |
17 | +++ panel-plugin/battery.c 2008-09-08 18:12:12.000000000 +0200 |
18 | @@ -382,6 +382,7 @@ |
19 | rate = last_rate; |
20 | } |
21 | |
22 | +#ifdef __linux__ |
23 | charge = (((float)ccapacity)/((float)lcapacity))*100; |
24 | |
25 | if ( last_acline ) |
26 | @@ -394,6 +395,20 @@ |
27 | |
28 | last_acline = acline; |
29 | |
30 | +#elif __FreeBSD__ |
31 | + charge = acpistate->percentage; |
32 | + |
33 | + if ( last_acline ) |
34 | + time_remaining = acpistate->rtime; |
35 | + else |
36 | + time_remaining = acpistate->rtime; |
37 | + |
38 | + if ( time_remaining < 0 ) |
39 | + time_remaining = 0; |
40 | + |
41 | + last_acline = acline; |
42 | +#endif |
43 | + |
44 | } |
45 | #ifdef __linux__ |
46 | else { |