summaryrefslogtreecommitdiff
path: root/community/lxpanel
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-05-05 02:43:51 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-05-05 02:43:51 -0300
commit61b68fb9fca39dda7e4b48c5af9567dc60ea3dd2 (patch)
tree6b8b6fb14ede5aae651e92f593252dba143cee74 /community/lxpanel
parentca998b4c054452abed4e01be1d2b28fee0ca904f (diff)
parent5801c5acd80d30d17aaef76b8bc401c61b3ef3c9 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/camlp5/PKGBUILD community/coq/PKGBUILD community/ldns/PKGBUILD community/luxrays/PKGBUILD community/luxrender/PKGBUILD community/nut/PKGBUILD community/root/PKGBUILD community/swi-prolog/PKGBUILD community/vtk/PKGBUILD community/wings3d/wings3d.sh core/sqlite3/PKGBUILD core/tzdata/PKGBUILD extra/cmus/PKGBUILD extra/dcron/PKGBUILD extra/farsight2/PKGBUILD extra/foomatic/PKGBUILD extra/fwbuilder/PKGBUILD extra/gnome-utils/PKGBUILD extra/ivtv-utils/PKGBUILD extra/kdebase-konsole/PKGBUILD extra/kdenetwork/PKGBUILD extra/kdesdk/PKGBUILD extra/koffice/PKGBUILD extra/libxfce4menu/PKGBUILD extra/openmpi/PKGBUILD extra/telepathy-butterfly/PKGBUILD extra/telepathy-farsight/PKGBUILD extra/telepathy-kde-presence-dataengine/PKGBUILD extra/telepathy-qt4/PKGBUILD extra/xfce-utils/PKGBUILD extra/xulrunner/PKGBUILD multilib/lib32-zlib/PKGBUILD staging/gimp-devel/gimp-devel.install testing/gtk3/PKGBUILD testing/php/PKGBUILD ~xihh/couchdb-git/couchdb.install ~xihh/couchdb-git/rc-script.patch ~xihh/gmime24/PKGBUILD
Diffstat (limited to 'community/lxpanel')
-rw-r--r--community/lxpanel/battery.patch72
1 files changed, 0 insertions, 72 deletions
diff --git a/community/lxpanel/battery.patch b/community/lxpanel/battery.patch
deleted file mode 100644
index 5d701ea6d..000000000
--- a/community/lxpanel/battery.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git plugins/batt/batt_sys.c plugins/batt/batt_sys.c
-index 54ff678..1eebab5 100644
---- a/src/plugins/batt/batt_sys.c
-+++ b/src/plugins/batt/batt_sys.c
-@@ -35,15 +35,6 @@
- #include <stdlib.h>
- #include <string.h>
-
--battery* battery_new() {
-- static int battery_num = 1;
-- battery * b = g_new0 ( battery, 1 );
-- battery_reset(b);
-- b->battery_num = battery_num;
-- battery_num++;
-- return b;
--}
--
- void battery_reset( battery * b) {
- b->type_battery = TRUE;
- b->capacity_unit = "mAh";
-@@ -58,6 +49,15 @@ void battery_reset( battery * b) {
- b->state = NULL;
- }
-
-+battery* battery_new() {
-+ static int battery_num = 1;
-+ battery * b = g_new0 ( battery, 1 );
-+ battery_reset(b);
-+ b->battery_num = battery_num;
-+ battery_num++;
-+ return b;
-+}
-+
- static gchar* parse_info_file(char *filename)
- {
- char *buf = NULL;
-@@ -194,7 +194,7 @@ void battery_update( battery *b ) {
-
- /* convert energy values (in mWh) to charge values (in mAh) if needed and possible */
- if (b->last_capacity_unit != -1 && b->last_capacity == -1) {
-- if (b->voltage != -1) {
-+ if (b->voltage > 0) {
- b->last_capacity = b->last_capacity_unit * 1000 / b->voltage;
- } else {
- b->last_capacity = b->last_capacity_unit;
-@@ -202,7 +202,7 @@ void battery_update( battery *b ) {
- }
- }
- if (b->design_capacity_unit != -1 && b->design_capacity == -1) {
-- if (b->voltage != -1) {
-+ if (b->voltage > 0) {
- b->design_capacity = b->design_capacity_unit * 1000 / b->voltage;
- } else {
- b->design_capacity = b->design_capacity_unit;
-@@ -210,7 +210,7 @@ void battery_update( battery *b ) {
- }
- }
- if (b->remaining_energy != -1 && b->remaining_capacity == -1) {
-- if (b->voltage != -1) {
-+ if (b->voltage > 0) {
- b->remaining_capacity = b->remaining_energy * 1000 / b->voltage;
- b->present_rate = b->present_rate * 1000 / b->voltage;
- } else {
-@@ -220,7 +220,7 @@ void battery_update( battery *b ) {
- if (b->last_capacity < MIN_CAPACITY)
- b->percentage = 0;
- else
-- b->percentage = ((float) b->remaining_energy * 100.0) / (float) b->last_capacity_unit;
-+ b->percentage = (float) b->remaining_capacity * 100 / b->last_capacity;
-
- if (b->percentage > 100)
- b->percentage = 100;