Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in xfce-extra/xfce4-systemload-plugin/files: xfce4-systemload-plugin-1.1.1-upower-0.99.patch
Date: Sat, 31 May 2014 18:48:03
Message-Id: 20140531184759.3EF962004F@flycatcher.gentoo.org
1 ssuominen 14/05/31 18:47:59
2
3 Added: xfce4-systemload-plugin-1.1.1-upower-0.99.patch
4 Log:
5 Restrict -r0 to old UPower and add -r1 for compability with UPower >= 0.99
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
8
9 Revision Changes Path
10 1.1 xfce-extra/xfce4-systemload-plugin/files/xfce4-systemload-plugin-1.1.1-upower-0.99.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-extra/xfce4-systemload-plugin/files/xfce4-systemload-plugin-1.1.1-upower-0.99.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-extra/xfce4-systemload-plugin/files/xfce4-systemload-plugin-1.1.1-upower-0.99.patch?rev=1.1&content-type=text/plain
14
15 Index: xfce4-systemload-plugin-1.1.1-upower-0.99.patch
16 ===================================================================
17 http://bugzilla.xfce.org/show_bug.cgi?id=10923
18
19 From 1bc7f32ea8244575124420bd34d52913831a1ae1 Mon Sep 17 00:00:00 2001
20 From: Eric Koegel <eric.koegel@×××××.com>
21 Date: Fri, 30 May 2014 19:12:02 +0300
22 Subject: [PATCH] Update for Upower 0.99
23
24 Upower 0.99 changed from the "changed" signal to "notify" as well as
25 the function signature. This patch adds that while still supporting
26 the previous versions of upower.
27 ---
28 panel-plugin/systemload.c | 13 +++++++++++--
29 1 file changed, 11 insertions(+), 2 deletions(-)
30
31 diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
32 index c0572a3..30636e9 100644
33 --- a/panel-plugin/systemload.c
34 +++ b/panel-plugin/systemload.c
35 @@ -624,11 +624,15 @@ monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation orientation,
36
37 #ifdef HAVE_UPOWER_GLIB
38 static void
39 +#if UP_CHECK_VERSION(0, 99, 0)
40 +upower_changed_cb(UpClient *client, GParamSpec *pspec, t_global_monitor *global)
41 +#else /* UP_CHECK_VERSION < 0.99 */
42 upower_changed_cb(UpClient *client, t_global_monitor *global)
43 +#endif /* UP_CHECK_VERSION */
44 {
45 setup_timer(global);
46 }
47 -#endif
48 +#endif /* HAVE_UPOWER_GLIB */
49
50 static void
51 entry_changed_cb(GtkEntry *entry, t_global_monitor *global)
52 @@ -925,10 +929,15 @@ systemload_construct (XfcePanelPlugin *plugin)
53
54 #ifdef HAVE_UPOWER_GLIB
55 if (global->upower) {
56 +#if UP_CHECK_VERSION(0, 99, 0)
57 + g_signal_connect (global->upower, "notify",
58 + G_CALLBACK(upower_changed_cb), global);
59 +#else /* UP_CHECK_VERSION < 0.99 */
60 g_signal_connect (global->upower, "changed",
61 G_CALLBACK(upower_changed_cb), global);
62 +#endif /* UP_CHECK_VERSION */
63 }
64 -#endif
65 +#endif /* HAVE_UPOWER_GLIB */
66
67 g_signal_connect (plugin, "free-data", G_CALLBACK (monitor_free), global);
68
69 --
70 1.9.3