2011-03-15 [colin] 3.7.8cvs64
authorColin Leroy <colin@colino.net>
Tue, 15 Mar 2011 18:29:44 +0000 (18:29 +0000)
committerColin Leroy <colin@colino.net>
Tue, 15 Mar 2011 18:29:44 +0000 (18:29 +0000)
* AUTHORS
* src/gtk/authors.h
* src/main.c
Fix bug #2381, "Support for NetworkManager 0.9".
Patch by Mikhail Efremov

AUTHORS
ChangeLog
PATCHSETS
configure.ac
src/gtk/authors.h
src/main.c

diff --git a/AUTHORS b/AUTHORS
index a049d83..6b3c4cb 100644 (file)
--- 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
index e15e633..b8dd7f5 100644 (file)
--- 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
index fa1bf7b..9260bf3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index 92c90a5..b3091c7 100644 (file)
@@ -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=
 
index b043380..512663a 100644 (file)
@@ -117,6 +117,7 @@ static char *CONTRIBS_LIST[] = {
 "Felix Eckhofer",
 "Charles A. Edwards",
 "Stefaan Eeckels",
+"Mikhail Efremov",
 "Willem van Engen",
 "Paul Evans",
 "Leonid Evdokimov",
index 92050c1..61509ca 100644 (file)
@@ -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