~ubuntu-branches/ubuntu/raring/pidgin/raring

« back to all changes in this revision

Viewing changes to debian/patches/nm09-more.patch

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-01-05 15:46:36 UTC
  • mfrom: (2.3.25 sid)
  • Revision ID: package-import@ubuntu.com-20120105154636-h07dpbrej0ijgj3f
Tags: 1:2.10.2-1ubuntu1
New upstream version based on the Debian update

Show diffs side-by-side

added added

removed removed

Lines of Context:
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");
10
 
        }
11
 
 
12
 
-       if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
13
 
-               return TRUE;
14
 
+       switch (nm_state)
15
 
+       {
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:
21
 
+#else
22
 
+               case NM_STATE_CONNECTED:
23
 
+#endif
24
 
+                       return TRUE;
25
 
+               default:
26
 
+                       break;
27
 
+       }
28
 
 
29
 
        return FALSE;
30
 
 
31
 
@@ -1171,9 +1183,14 @@ purple_network_init(void)
32
 
                                                     NM_DBUS_SERVICE,
33
 
                                                     NM_DBUS_PATH,
34
 
                                                     NM_DBUS_INTERFACE);
35
 
+               /* NM 0.6 signal */
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);
43
 
 
44
 
                dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
45
 
                                                       DBUS_SERVICE_DBUS,
46
 
@@ -1208,6 +1225,7 @@ purple_network_uninit(void)
47
 
 #ifdef HAVE_NETWORKMANAGER
48
 
        if (nm_proxy) {
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));
52
 
        }
53
 
        if (dbus_proxy) {