aboutsummaryrefslogtreecommitdiffstats
path: root/modules/network-manager/evolution-network-manager.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-03-09 03:26:18 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:43 +0800
commitacb4f0e3af2b238b7792613353712a037df1fd3c (patch)
treea677d459c37094e14fb627da8cd26a8dd7f44a80 /modules/network-manager/evolution-network-manager.c
parent3cd443a62dd828c8dbc98ef441c2d960eebf6b3c (diff)
downloadgsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.tar
gsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.tar.gz
gsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.tar.bz2
gsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.tar.lz
gsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.tar.xz
gsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.tar.zst
gsoc2013-evolution-acb4f0e3af2b238b7792613353712a037df1fd3c.zip
Bug 644232 - Support NetworkManager 0.9
Diffstat (limited to 'modules/network-manager/evolution-network-manager.c')
-rw-r--r--modules/network-manager/evolution-network-manager.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/network-manager/evolution-network-manager.c b/modules/network-manager/evolution-network-manager.c
index 7546ece205..1c15a84a16 100644
--- a/modules/network-manager/evolution-network-manager.c
+++ b/modules/network-manager/evolution-network-manager.c
@@ -19,6 +19,10 @@
#include <gio/gio.h>
#include <NetworkManager/NetworkManager.h>
+#if !defined(NM_CHECK_VERSION)
+#define NM_CHECK_VERSION(x,y,z) 0
+#endif
+
#include <shell/e-shell.h>
#include <e-util/e-extension.h>
@@ -95,11 +99,20 @@ network_manager_signal_cb (GDBusConnection *connection,
g_variant_get (parameters, "(u)", &state);
switch (state) {
+#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
e_shell_set_network_available (shell, TRUE);
break;
case NM_STATE_ASLEEP:
case NM_STATE_DISCONNECTED:
+#if NM_CHECK_VERSION(0,8,992)
+ case NM_STATE_DISCONNECTING:
+#endif
e_shell_set_network_available (shell, FALSE);
break;
default: