[network-manager-openconnect/lr/libnm] fixup! properties: port the new plugin to libnm
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect/lr/libnm] fixup! properties: port the new plugin to libnm
- Date: Thu, 16 Jul 2015 15:45:25 +0000 (UTC)
commit 46047911140f573c06720ab6bb5a64868f28896e
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Thu Jul 16 17:44:25 2015 +0200
fixup! properties: port the new plugin to libnm
Make it use NM_VPN_LIBNM_COMPAT
configure.ac | 8 ++++----
properties/auth-helpers.h | 5 +----
properties/nm-openconnect.c | 23 +----------------------
3 files changed, 6 insertions(+), 30 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f30ec6c..9dbf580 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,10 +71,10 @@ if test x"$with_gnome" != xno; then
fi
PKG_CHECK_MODULES(NM,
- NetworkManager >= 0.9.10
- libnm-util >= 0.9.10
- libnm-glib >= 0.9.10
- libnm-glib-vpn >= 0.9.10)
+ NetworkManager >= 1.1.0
+ libnm-util >= 1.1.0
+ libnm-glib >= 1.1.0
+ libnm-glib-vpn >= 1.1.0)
dnl
dnl Distribution version string
diff --git a/properties/auth-helpers.h b/properties/auth-helpers.h
index 97370af..19ac773 100644
--- a/properties/auth-helpers.h
+++ b/properties/auth-helpers.h
@@ -27,13 +27,10 @@
#include <gtk/gtk.h>
#ifdef NM_OPENCONNECT_OLD
+#define NM_VPN_LIBNM_COMPAT
#include <nm-connection.h>
#include <nm-setting-vpn.h>
-
-#define NMSettingVpn NMSettingVPN
-
#else /* !NM_OPENCONNECT_OLD */
-
#include <NetworkManager.h>
#endif
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 7a64bf9..42063a9 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -50,31 +50,12 @@
#endif
#ifdef NM_OPENCONNECT_OLD
+#define NM_VPN_LIBNM_COMPAT
#include <nm-vpn-plugin-ui-interface.h>
#include <nm-setting-vpn.h>
#include <nm-setting-connection.h>
#include <nm-setting-ip4-config.h>
-// FIXME: Check what danw's NM_VPN_LIBNM_COMPAT does
-#define NMVpnEditorPluginInterface NMVpnPluginUiInterface
-#define NM_TYPE_VPN_EDITOR_PLUGIN NM_TYPE_VPN_PLUGIN_UI_INTERFACE
-#define NMVpnEditorInterface NMVpnPluginUiWidgetInterface
-#define NM_TYPE_VPN_EDITOR NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE
-#define NMSettingVpn NMSettingVPN
-#define NMVpnEditor NMVpnPluginUiWidgetInterface
-#define NMVpnEditorPlugin NMVpnPluginUiInterface
-#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT NM_VPN_PLUGIN_UI_CAPABILITY_IMPORT
-#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT NM_VPN_PLUGIN_UI_CAPABILITY_EXPORT
-#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6 NM_VPN_PLUGIN_UI_CAPABILITY_IPV6
-#define PROP_DESC NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC
-#define PROP_NAME NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME
-#define PROP_SERVICE NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE
-#define NM_VPN_EDITOR_PLUGIN_NAME NM_VPN_PLUGIN_UI_INTERFACE_NAME
-#define NM_VPN_EDITOR_PLUGIN_DESCRIPTION NM_VPN_PLUGIN_UI_INTERFACE_DESC
-#define NM_VPN_EDITOR_PLUGIN_SERVICE NM_VPN_PLUGIN_UI_INTERFACE_SERVICE
-#define get_editor ui_factory
-#define get_suggested_filename get_suggested_name
-#define nm_vpn_editor_plugin_factory nm_vpn_plugin_ui_factory
#define nm_simple_connection_new nm_connection_new
#define OPENCONNECT_PLUGIN_UI_ERROR NM_SETTING_VPN_ERROR
@@ -99,14 +80,12 @@
/************** plugin class **************/
-#ifndef NM_OPENCONNECT_OLD
enum {
PROP_0,
PROP_NAME,
PROP_DESC,
PROP_SERVICE
};
-#endif
static void openconnect_plugin_ui_interface_init (NMVpnEditorPluginInterface *iface_class);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]