[evolution] Bug 644232 - Support NetworkManager 0.9



commit 8a81ec271ed0ab05b8fdfb5cbf374867b3906352
Author: Dan Williams <dcbw redhat com>
Date:   Tue Mar 8 14:26:18 2011 -0500

    Bug 644232 - Support NetworkManager 0.9

 .../network-manager/evolution-network-manager.c    |   13 +++++++++++++
 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 7546ece..1c15a84 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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]