summaryrefslogtreecommitdiff
path: root/desktop/lxpanel
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2016-12-28 11:39:30 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-12-31 08:22:26 +0700
commit866989a09dd4d1efa3bede347105eb7d32eef0bc (patch)
tree8dabe64b8e5bf1a2474716791eddc95b3da8ee87 /desktop/lxpanel
parentf543c9919599666e08cb8b7983b7e45fcd2c5b3a (diff)
downloadslackbuilds-866989a09dd4d1efa3bede347105eb7d32eef0bc.tar.gz
desktop/lxpanel: Updated for version 0.9.2.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'desktop/lxpanel')
-rw-r--r--desktop/lxpanel/lxpanel.SlackBuild5
-rw-r--r--desktop/lxpanel/lxpanel.info6
-rw-r--r--desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch115
-rw-r--r--desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch65
4 files changed, 4 insertions, 187 deletions
diff --git a/desktop/lxpanel/lxpanel.SlackBuild b/desktop/lxpanel/lxpanel.SlackBuild
index fbafac868f..6a5a1551ec 100644
--- a/desktop/lxpanel/lxpanel.SlackBuild
+++ b/desktop/lxpanel/lxpanel.SlackBuild
@@ -25,7 +25,7 @@
# Modified by Matteo Bernardini <ponce@slackbuilds.org>
PRGNAM=lxpanel
-VERSION=${VERSION:-0.9.1}
+VERSION=${VERSION:-0.9.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -73,9 +73,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# apply patches from upstream
-for i in $CWD/patches/* ; do patch -p1 < $i ; done
-
sh autogen.sh || true
CFLAGS="$SLKCFLAGS" \
diff --git a/desktop/lxpanel/lxpanel.info b/desktop/lxpanel/lxpanel.info
index 2f064184c4..3fc80f2940 100644
--- a/desktop/lxpanel/lxpanel.info
+++ b/desktop/lxpanel/lxpanel.info
@@ -1,8 +1,8 @@
PRGNAM="lxpanel"
-VERSION="0.9.1"
+VERSION="0.9.2"
HOMEPAGE="http://wiki.lxde.org/en/LXPanel"
-DOWNLOAD="http://downloads.sf.net/lxde/lxpanel-0.9.1.tar.xz"
-MD5SUM="66500a36b905a7a5c14c0a4fcce9d8da"
+DOWNLOAD="http://downloads.sf.net/lxde/lxpanel-0.9.2.tar.xz"
+MD5SUM="0315a3d27cb5dc4b48b2d9efc9b2e284"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libfm"
diff --git a/desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch b/desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch
deleted file mode 100644
index 6210cf8d8b..0000000000
--- a/desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From ad0022eb8b1524b18d2b512d7dd8d2920c0f8dab Mon Sep 17 00:00:00 2001
-From: Andriy Grytsenko <andrej@rep.kiev.ua>
-Date: Fri, 25 Nov 2016 01:18:47 +0200
-Subject: [PATCH 1/2] Fix battery selection, it appears incompatible with 0.7.2
- behavior.
-
-See https://bugs.debian.org/845555
----
- ChangeLog | 2 ++
- TODO | 2 +-
- plugins/batt/batt_sys.c | 30 +++++++++++++++---------------
- 3 files changed, 18 insertions(+), 16 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index a21a14e..0abe16b 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,5 @@
-+* Fixed battery selection, it appears incompatible with 0.7.2 behavior.
-+
- 0.9.1
- -------------------------------------------------------------------------
- * Fixed build failure without ALSA.
-diff --git a/TODO b/TODO
-index 965b17c..8d9f91f 100644
---- a/TODO
-+++ b/TODO
-@@ -17,7 +17,7 @@
- * decide 'netstat' vs 'netstatus'
- * optional libnotify support (useful for battery and volume plugins)
- * pull improvements from Raspbian
--* add Most Recent support into 'menu' plugin
-+* add Most Recent support into 'menu' plugin (option: ones not by Run too)
- * check and use weather-* standard themed icons for weather plugin
- * "Remove this Launch Button" option in launchbar context menu
- * 'usb-unmount' plugin
-diff --git a/plugins/batt/batt_sys.c b/plugins/batt/batt_sys.c
-index 154bd3d..2482c6f 100644
---- a/plugins/batt/batt_sys.c
-+++ b/plugins/batt/batt_sys.c
-@@ -4,6 +4,7 @@
- * Copyright 2009 Juergen Hötzel <juergen@archlinux.org>
- * 2015 Henry Gebhardt <hsggebhardt@googlemail.com>
- * 2015 Stanislav Kozina, Ersin <xersin@users.sf.net>
-+ * 2016 Andriy Grytsenko <andrej@rep.kiev.ua>
- *
- * Parts shameless stolen and glibified from acpi package
- * Copyright (C) 2001 Grahame Bowland <grahame@angrygoats.net>
-@@ -295,15 +296,8 @@ battery *battery_get(int battery_number) {
- const gchar *entry;
- gchar *batt_name = NULL;
- gchar *batt_path = NULL;
-- GDir * dir = g_dir_open( ACPI_PATH_SYS_POWER_SUPPLY, 0, &error );
-+ GDir * dir;
- battery *b = NULL;
-- int i;
--
-- if ( dir == NULL )
-- {
-- g_warning( "NO ACPI/sysfs support in kernel: %s", error->message );
-- return NULL;
-- }
-
- /* Try the expected path in sysfs first */
- batt_name = g_strdup_printf(ACPI_BATTERY_DEVICE_NAME "%d", battery_number);
-@@ -324,13 +318,20 @@ battery *battery_get(int battery_number) {
- g_free(batt_path);
-
- if (b != NULL)
-- goto done;
-+ return b;
-
- /*
- * We didn't find the expected path in sysfs.
-- * Walk the dir and blindly return n-th entry.
-+ * Walk the dir and return any battery.
- */
-- i = 0;
-+ dir = g_dir_open( ACPI_PATH_SYS_POWER_SUPPLY, 0, &error );
-+ if ( dir == NULL )
-+ {
-+ g_warning( "NO ACPI/sysfs support in kernel: %s", error->message );
-+ g_error_free(error);
-+ return NULL;
-+ }
-+
- while ( ( entry = g_dir_read_name (dir) ) != NULL )
- {
- b = battery_new();
-@@ -339,9 +340,7 @@ battery *battery_get(int battery_number) {
-
- /* We're looking for a battery with the selected ID */
- if (b->type_battery == TRUE) {
-- if (i == battery_number)
-- break;
-- i++;
-+ break;
- }
- battery_free(b);
- b = NULL;
-@@ -349,9 +348,10 @@ battery *battery_get(int battery_number) {
- if (b != NULL)
- g_warning( "Battery entry " ACPI_BATTERY_DEVICE_NAME "%d not found, using %s",
- battery_number, b->path);
-+ // FIXME: update config?
- else
- g_warning( "Battery %d not found", battery_number );
--done:
-+
- g_dir_close( dir );
- return b;
- }
---
-2.11.0
-
diff --git a/desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch b/desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch
deleted file mode 100644
index 3d3bf993c0..0000000000
--- a/desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 138ff9b22b45192a3b020ebbbed04e9060470a66 Mon Sep 17 00:00:00 2001
-From: Andriy Grytsenko <andrej@rep.kiev.ua>
-Date: Fri, 25 Nov 2016 02:06:39 +0200
-Subject: [PATCH 2/2] Fix battery percentage calculations if charge isn't
- available but energy is.
-
-Should fix https://bugs.debian.org/845555 bug.
----
- ChangeLog | 4 +++-
- plugins/batt/batt_sys.c | 17 ++++++++++-------
- 2 files changed, 13 insertions(+), 8 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 0abe16b..f4e4f61 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,4 +1,6 @@
--* Fixed battery selection, it appears incompatible with 0.7.2 behavior.
-+* Fixed battery selection if battery detached but another is available.
-+* Fixed battery percentage calculations if charge isn't available but
-+ energy is, it appears broken in 0.9.0.
-
- 0.9.1
- -------------------------------------------------------------------------
-diff --git a/plugins/batt/batt_sys.c b/plugins/batt/batt_sys.c
-index 2482c6f..bd01e08 100644
---- a/plugins/batt/batt_sys.c
-+++ b/plugins/batt/batt_sys.c
-@@ -167,6 +167,7 @@ static gboolean battery_inserted(gchar* path)
- battery* battery_update(battery *b)
- {
- gchar *gctmp;
-+ int promille;
-
- if (b == NULL)
- return NULL;
-@@ -253,16 +254,18 @@ battery* battery_update(battery *b)
- }
- #endif
-
-- if (b->charge_full < MIN_CAPACITY)
-- b->percentage = 0;
-- else {
-- int promille = (b->charge_now * 1000) / b->charge_full;
-- b->percentage = (promille + 5) / 10; /* round properly */
-- }
-+ if (b->charge_now != -1 && b->charge_full != -1)
-+ promille = (b->charge_now * 1000) / b->charge_full;
-+ else if (b->energy_full != -1 && b->energy_now != -1)
-+ /* no charge data, let try energy instead */
-+ promille = (b->energy_now * 1000) / b->energy_full;
-+ else
-+ promille = 0;
-+
-+ b->percentage = (promille + 5) / 10; /* round properly */
- if (b->percentage > 100)
- b->percentage = 100;
-
--
- if (b->current_now == -1) {
- //b->poststr = "rate information unavailable";
- b->seconds = -1;
---
-2.11.0
-