[Xfce4-commits] [xfce/xfce4-settings] 02/02: Add support for upower 0.99 (bug #10918)
noreply at xfce.org
noreply at xfce.org
Mon Jul 28 17:23:39 CEST 2014
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository xfce/xfce4-settings.
commit 4b89e20c97a3cf526aca831fe384f53db1c1691c
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Wed May 28 07:55:39 2014 +0300
Add support for upower 0.99 (bug #10918)
Amend the signal handler for the changing of display properties to work
with upower 0.99.
---
xfsettingsd/displays-upower.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/xfsettingsd/displays-upower.c b/xfsettingsd/displays-upower.c
index bbb3028..e1fab38 100644
--- a/xfsettingsd/displays-upower.c
+++ b/xfsettingsd/displays-upower.c
@@ -34,9 +34,15 @@
static void xfce_displays_upower_dispose (GObject *object);
+
+#if UP_CHECK_VERSION(0, 99, 0)
static void xfce_displays_upower_property_changed (UpClient *client,
+ GParamSpec *pspec,
XfceDisplaysUPower *upower);
-
+#else
+static void xfce_displays_upower_property_changed (UpClient *client,
+ XfceDisplaysUPower *upower);
+#endif
struct _XfceDisplaysUPowerClass
@@ -95,10 +101,17 @@ xfce_displays_upower_init (XfceDisplaysUPower *upower)
{
upower->client = up_client_new ();
upower->lid_is_closed = up_client_get_lid_is_closed (upower->client);
+#if UP_CHECK_VERSION(0, 99, 0)
+ upower->handler = g_signal_connect (G_OBJECT (upower->client),
+ "notify",
+ G_CALLBACK (xfce_displays_upower_property_changed),
+ upower);
+#else
upower->handler = g_signal_connect (G_OBJECT (upower->client),
"changed",
G_CALLBACK (xfce_displays_upower_property_changed),
upower);
+#endif
}
@@ -122,8 +135,14 @@ xfce_displays_upower_dispose (GObject *object)
static void
+#if UP_CHECK_VERSION(0, 99, 0)
xfce_displays_upower_property_changed (UpClient *client,
+ GParamSpec *pspec,
XfceDisplaysUPower *upower)
+#else
+xfce_displays_upower_property_changed (UpClient *client,
+ XfceDisplaysUPower *upower)
+#endif
{
gboolean lid_is_closed;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list