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-weather-plugin/files: xfce4-weather-plugin-0.8.3-upower-0.99.patch
Date: Sat, 31 May 2014 19:02:35
Message-Id: 20140531190231.F35612004F@flycatcher.gentoo.org
1 ssuominen 14/05/31 19:02:31
2
3 Added: xfce4-weather-plugin-0.8.3-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-weather-plugin/files/xfce4-weather-plugin-0.8.3-upower-0.99.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-upower-0.99.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-upower-0.99.patch?rev=1.1&content-type=text/plain
14
15 Index: xfce4-weather-plugin-0.8.3-upower-0.99.patch
16 ===================================================================
17 http://bug-attachment.xfce.org/attachment.cgi?id=5500
18
19 From 79887843c58ef21233a0de571474ac656f977d7c Mon Sep 17 00:00:00 2001
20 From: Eric Koegel <eric.koegel@×××××.com>
21 Date: Fri, 30 May 2014 19:01:08 +0300
22 Subject: [PATCH] Update for Upower 0.99
23
24 Upower changed a singal handler.
25 ---
26 panel-plugin/weather.c | 22 +++++++++++++++++-----
27 1 file changed, 17 insertions(+), 5 deletions(-)
28
29 diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
30 index efa8559..30eddb3 100644
31 --- a/panel-plugin/weather.c
32 +++ b/panel-plugin/weather.c
33 @@ -1553,8 +1553,14 @@ proxy_auth(SoupSession *session,
34
35 #ifdef HAVE_UPOWER_GLIB
36 static void
37 +#if UP_CHECK_VERSION(0, 99, 0)
38 upower_changed_cb(UpClient *client,
39 + GParamSpec *pspec,
40 plugin_data *data)
41 +#else /* UP_CHECK_VERSION < 0.99 */
42 +upower_changed_cb(UpClient *client,
43 + plugin_data *data)
44 +#endif /* UP_CHECK_VERSION */
45 {
46 gboolean on_battery;
47
48 @@ -1576,7 +1582,7 @@ upower_changed_cb(UpClient *client,
49 schedule_next_wakeup(data);
50 }
51 }
52 -#endif
53 +#endif /* HAVE_UPOWER_GLIB */
54
55
56 static void
57 @@ -2171,10 +2177,16 @@ weather_construct(XfcePanelPlugin *plugin)
58 G_CALLBACK(xfceweather_show_about), data);
59
60 #ifdef HAVE_UPOWER_GLIB
61 - if (data->upower)
62 - g_signal_connect(data->upower, "changed",
63 - G_CALLBACK(upower_changed_cb), data);
64 -#endif
65 + if (data->upower) {
66 +#if UP_CHECK_VERSION(0, 99, 0)
67 + g_signal_connect (data->upower, "notify",
68 + G_CALLBACK(upower_changed_cb), data);
69 +#else /* UP_CHECK_VERSION < 0.99 */
70 + g_signal_connect (data->upower, "changed",
71 + G_CALLBACK(upower_changed_cb), data);
72 +#endif /* UP_CHECK_VERSION */
73 + }
74 +#endif /* HAVE_UPOWER_GLIB */
75
76 weather_dump(weather_dump_plugindata, data);
77 }
78 --
79 1.9.3