d9f60258cc
Fix evo build, add new NM patch + tweaks (warning, diff might appear as empty, talk to me if this happens) (forwarded request 73949 from vuntz) OBS-URL: https://build.opensuse.org/request/show/73986 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pidgin?expand=0&rev=71
50 lines
1.9 KiB
Diff
50 lines
1.9 KiB
Diff
diff -up pidgin-2.7.11/libpurple/network.c.nm09more pidgin-2.7.11/libpurple/network.c
|
|
--- pidgin-2.7.11/libpurple/network.c.nm09more 2011-04-26 12:01:27.700085246 -0500
|
|
+++ pidgin-2.7.11/libpurple/network.c 2011-05-24 13:13:28.185165657 -0500
|
|
@@ -833,8 +833,20 @@ purple_network_is_available(void)
|
|
purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
|
|
}
|
|
|
|
- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
|
|
- return TRUE;
|
|
+ switch (nm_state)
|
|
+ {
|
|
+ case NM_STATE_UNKNOWN:
|
|
+#if NM_CHECK_VERSION(0,8,992)
|
|
+ case NM_STATE_CONNECTED_LOCAL:
|
|
+ case NM_STATE_CONNECTED_SITE:
|
|
+ case NM_STATE_CONNECTED_GLOBAL:
|
|
+#else
|
|
+ case NM_STATE_CONNECTED:
|
|
+#endif
|
|
+ return TRUE;
|
|
+ default:
|
|
+ break;
|
|
+ }
|
|
|
|
return FALSE;
|
|
|
|
@@ -1170,9 +1182,14 @@ purple_network_init(void)
|
|
NM_DBUS_SERVICE,
|
|
NM_DBUS_PATH,
|
|
NM_DBUS_INTERFACE);
|
|
+ /* NM 0.6 signal */
|
|
dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
|
|
dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
|
|
G_CALLBACK(nm_state_change_cb), NULL, NULL);
|
|
+ /* NM 0.7 and later signal */
|
|
+ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
|
|
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
|
|
+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
|
|
|
|
dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
|
|
DBUS_SERVICE_DBUS,
|
|
@@ -1207,6 +1224,7 @@ purple_network_uninit(void)
|
|
#ifdef HAVE_NETWORKMANAGER
|
|
if (nm_proxy) {
|
|
dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
|
|
+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
|
|
g_object_unref(G_OBJECT(nm_proxy));
|
|
}
|
|
if (dbus_proxy) {
|