1
Description: Update deprecated Network Manager signal name
2
Bug: http://developer.pidgin.im/ticket/13859
3
Bug-Debian: http://bugs.debian.org/642117
4
Index: pidgin/libpurple/network.c
5
===================================================================
6
--- pidgin.orig/libpurple/network.c
7
+++ pidgin/libpurple/network.c
8
@@ -833,8 +833,20 @@ purple_network_is_available(void)
9
purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
12
- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
16
+ case NM_STATE_UNKNOWN:
17
+#if NM_CHECK_VERSION(0,8,992)
18
+ case NM_STATE_CONNECTED_LOCAL:
19
+ case NM_STATE_CONNECTED_SITE:
20
+ case NM_STATE_CONNECTED_GLOBAL:
22
+ case NM_STATE_CONNECTED:
31
@@ -1171,9 +1183,14 @@ purple_network_init(void)
36
dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
37
dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
38
G_CALLBACK(nm_state_change_cb), NULL, NULL);
39
+ /* NM 0.7 and later signal */
40
+ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
41
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
42
+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
44
dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
46
@@ -1208,6 +1225,7 @@ purple_network_uninit(void)
47
#ifdef HAVE_NETWORKMANAGER
49
dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
50
+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
51
g_object_unref(G_OBJECT(nm_proxy));