commit 832445c6a2bfdd308da439f7fbff56808041f3b2
parent ec9cbb7e8f9fdc00d73d1c44f971fe0f9e329762
Author: Colin Leroy <colin@colino.net>
Date: Tue, 15 Mar 2011 18:29:44 +0000
2011-03-15 [colin] 3.7.8cvs64
* AUTHORS
* src/gtk/authors.h
* src/main.c
Fix bug #2381, "Support for NetworkManager 0.9".
Patch by Mikhail Efremov
Diffstat:
6 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -283,3 +283,4 @@ contributors (in addition to the above; based on Changelog)
Yotam Medini
Reed Loden
Sebastien Bigaret
+ Mikhail Efremov
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-15 [colin] 3.7.8cvs64
+
+ * AUTHORS
+ * src/gtk/authors.h
+ * src/main.c
+ Fix bug #2381, "Support for NetworkManager 0.9".
+ Patch by Mikhail Efremov
+
2011-03-04 [colin] 3.7.8cvs63
* src/mimeview.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -4137,3 +4137,4 @@
( cvs diff -u -r 1.1.2.81 -r 1.1.2.82 src/wizard.c; ) > 3.7.8cvs61.patchset
( cvs diff -u -r 1.1.2.82 -r 1.1.2.83 src/wizard.c; ) > 3.7.8cvs62.patchset
( cvs diff -u -r 1.155.2.97 -r 1.155.2.98 src/Makefile.am; cvs diff -u -r 1.5.2.29 -r 1.5.2.30 src/exporthtml.c; cvs diff -u -r 1.83.2.167 -r 1.83.2.168 src/mimeview.c; cvs diff -u -r 1.20.2.31 -r 1.20.2.32 src/mimeview.h; cvs diff -u -r 1.36.2.191 -r 1.36.2.192 src/common/utils.c; cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/common/w32_unistd.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/common/w32lib.h; ) > 3.7.8cvs63.patchset
+( cvs diff -u -r 1.100.2.77 -r 1.100.2.78 AUTHORS; cvs diff -u -r 1.1.2.71 -r 1.1.2.72 src/gtk/authors.h; cvs diff -u -r 1.115.2.234 -r 1.115.2.235 src/main.c; ) > 3.7.8cvs64.patchset
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,7 @@ MINOR_VERSION=7
MICRO_VERSION=8
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=63
+EXTRA_VERSION=64
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
@@ -117,6 +117,7 @@ static char *CONTRIBS_LIST[] = {
"Felix Eckhofer",
"Charles A. Edwards",
"Stefaan Eeckels",
+"Mikhail Efremov",
"Willem van Engen",
"Paul Evans",
"Leonid Evdokimov",
diff --git a/src/main.c b/src/main.c
@@ -160,6 +160,10 @@ static GnomeVFSVolumeMonitor *volmon;
static gboolean went_offline_nm;
#endif
+#if !defined(NM_CHECK_VERSION)
+#define NM_CHECK_VERSION(x,y,z) 0
+#endif
+
#ifdef HAVE_DBUS_GLIB
static DBusGProxy *awn_proxy = NULL;
#endif
@@ -1139,10 +1143,17 @@ int main(int argc, char *argv[])
"/org/freedesktop/NetworkManager",
"org.freedesktop.NetworkManager");
if (nm_proxy) {
+#if NM_CHECK_VERSION(0,8,992)
+ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
+ G_CALLBACK(networkmanager_state_change_cb),
+ NULL,NULL);
+#else
dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
G_CALLBACK(networkmanager_state_change_cb),
NULL,NULL);
+#endif
}
#endif
install_dbus_status_handler();
@@ -2738,7 +2749,14 @@ gboolean networkmanager_is_online(GError **error)
g_propagate_error(error, tmp_error);
return TRUE;
}
-
- return (state == NM_STATE_CONNECTED || state == NM_STATE_UNKNOWN);
+#if NM_CHECK_VERSION(0,8,992)
+ return (state == NM_STATE_CONNECTED_LOCAL ||
+ state == NM_STATE_CONNECTED_SITE ||
+ state == NM_STATE_CONNECTED_GLOBAL ||
+ state == NM_STATE_UNKNOWN);
+#else
+ return (state == NM_STATE_CONNECTED ||
+ state == NM_STATE_UNKNOWN);
+#endif
}
#endif