summaryrefslogtreecommitdiff
path: root/xfce-extra
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-08-20 14:49:18 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-08-20 14:49:18 +0100
commit2b498836501ef7b30b0bc64d3c00868c7788e946 (patch)
tree3e7545d5a637e2b72e3239fadbe84b68523dc327 /xfce-extra
parent5683b051b5e931df2bdd960b439e377493c03a87 (diff)
reimport xfce4-power-manager 1.4.4 into tree, since gentoo dropped it
Diffstat (limited to 'xfce-extra')
-rw-r--r--xfce-extra/xfce4-power-manager/Manifest1
-rw-r--r--xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch70
-rw-r--r--xfce-extra/xfce4-power-manager/xfce4-power-manager-1.4.4.ebuild57
3 files changed, 128 insertions, 0 deletions
diff --git a/xfce-extra/xfce4-power-manager/Manifest b/xfce-extra/xfce4-power-manager/Manifest
new file mode 100644
index 00000000..abe90630
--- /dev/null
+++ b/xfce-extra/xfce4-power-manager/Manifest
@@ -0,0 +1 @@
+DIST xfce4-power-manager-1.4.4.tar.bz2 1144421 SHA256 c50ec8aa7e7848c57c0f856dceb8132eb5f37585f0ac1627459ab8c882c73b07 SHA512 40eb886e9316bedf02d2a6ff94f9045bd4094070a09b77e0005a1a7e5d281db7ab2ea96d6846efadeb3bb852bd301af03a0fd5b99d611fe43a763154c77390dc WHIRLPOOL 7e60e40e6bdadbd0d2ce421c308266244485b503e7a42aafd71a3d794ac2150dd4a7dd7cbeac0829d95e3be5ba43bf3b5cabeaa1ebe50a2d4082d46c1edd4977
diff --git a/xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch b/xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch
new file mode 100644
index 00000000..7687ae4e
--- /dev/null
+++ b/xfce-extra/xfce4-power-manager/files/xfce4-power-manager-1.3.0-restore_brightness_level_after_sleep.patch
@@ -0,0 +1,70 @@
+http://bugzilla.xfce.org/show_bug.cgi?id=10535
+
+From 4c14d83794b94ac18519806314464599d5e905f6 Mon Sep 17 00:00:00 2001
+From: Eric Koegel <eric.koegel@gmail.com>
+Date: Sat, 31 May 2014 20:09:56 +0300
+Subject: Restore screen power after sleep
+
+With this patch xfpm will cache the brightness level before going
+to sleep and set it back to that level after resuming from sleep.
+
+diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c
+index e18c617..e49338e 100644
+--- a/common/xfpm-brightness.c
++++ b/common/xfpm-brightness.c
+@@ -382,7 +382,7 @@ xfpm_brightness_helper_get_level (XfpmBrightness *brg, gint32 *level)
+ }
+
+ static gboolean
+-xfpm_brightness_helper_set_level (XfpmBrightness *brg, gint level)
++xfpm_brightness_helper_set_level (XfpmBrightness *brg, gint32 level)
+ {
+ gboolean ret;
+ GError *error = NULL;
+diff --git a/src/xfpm-power.c b/src/xfpm-power.c
+index 9d98fab..b42210b 100644
+--- a/src/xfpm-power.c
++++ b/src/xfpm-power.c
+@@ -60,6 +60,7 @@
+ #include "egg-idletime.h"
+ #include "xfpm-systemd.h"
+ #include "xfpm-suspend.h"
++#include "xfpm-brightness.h"
+
+
+ static void xfpm_power_finalize (GObject *object);
+@@ -312,6 +313,8 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force)
+ #ifdef WITH_NETWORK_MANAGER
+ gboolean network_manager_sleep;
+ #endif
++ XfpmBrightness *brightness;
++ gint32 brightness_level;
+
+ if ( power->priv->inhibited && force == FALSE)
+ {
+@@ -344,6 +347,10 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force)
+ #endif
+
+ g_signal_emit (G_OBJECT (power), signals [SLEEPING], 0);
++ /* Get the current brightness level so we can use it after we suspend */
++ brightness = xfpm_brightness_new();
++ xfpm_brightness_setup (brightness);
++ xfpm_brightness_get_level (brightness, &brightness_level);
+
+ #ifdef WITH_NETWORK_MANAGER
+ g_object_get (G_OBJECT (power->priv->conf),
+@@ -429,6 +436,11 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force)
+ }
+
+ g_signal_emit (G_OBJECT (power), signals [WAKING_UP], 0);
++ /* Check/update any changes while we slept */
++ xfpm_power_get_properties (power);
++ /* Restore the brightness level from before we suspended */
++ xfpm_brightness_set_level (brightness, brightness_level);
++
+ #ifdef WITH_NETWORK_MANAGER
+ if ( network_manager_sleep )
+ {
+--
+cgit v0.10.1
+
diff --git a/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.4.4.ebuild b/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.4.4.ebuild
new file mode 100644
index 00000000..0921e422
--- /dev/null
+++ b/xfce-extra/xfce4-power-manager/xfce4-power-manager-1.4.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-info xfconf
+
+DESCRIPTION="Power manager for the Xfce desktop environment"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/xfce4-power-manager"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="debug kernel_linux lxpanel networkmanager policykit systemd +xfce_plugins_power"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.100.2:=
+ >=dev-libs/glib-2.30:=
+ >=sys-apps/dbus-1.6.18:=
+ || ( >=sys-power/upower-0.9.23 >=sys-power/upower-pm-utils-0.9.23-r2 )
+ >=x11-libs/gtk+-2.24:2=
+ >=x11-libs/libnotify-0.7
+ x11-libs/libX11:=
+ >=x11-libs/libXrandr-1.2:=
+ x11-libs/libXext:=
+ >=xfce-base/xfconf-4.10:=
+ >=xfce-base/libxfce4ui-4.10:=
+ >=xfce-base/libxfce4util-4.10:=
+ lxpanel? ( lxde-base/lxpanel:= )
+ policykit? ( >=sys-auth/polkit-0.112 )
+ xfce_plugins_power? ( >=xfce-base/xfce4-panel-4.10:= )"
+# USE="systemd" is for ensuring hibernate/suspend works by enforcing correct runtime -only dependencies
+RDEPEND="${COMMON_DEPEND}
+ networkmanager? ( net-misc/networkmanager )
+ !systemd? ( || ( sys-power/pm-utils sys-power/upower-pm-utils ) )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+pkg_setup() {
+ if use kernel_linux; then
+ CONFIG_CHECK="~TIMER_STATS"
+ linux-info_pkg_setup
+ fi
+
+ XFCONF=(
+ $(use_enable policykit polkit)
+ $(use_enable networkmanager network-manager)
+ $(use_enable xfce_plugins_power xfce4panel)
+ $(use_enable lxpanel lxdepanel)
+ $(xfconf_use_debug)
+ )
+
+ DOCS=( AUTHORS NEWS README TODO )
+}