[network-manager-openvpn/lr/libnm: 6/6] fixup! properties: port the new plugin to libnm



commit be8b159d3cd5d1545be60ed20b380a8112f851b7
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Jul 16 17:04:24 2015 +0200

    fixup! properties: port the new plugin to libnm
    
    Make it use NM_VPN_LIBNM_COMPAT

 configure.ac               |   12 ++++++------
 properties/auth-helpers.c  |    3 +--
 properties/import-export.c |    2 +-
 properties/nm-openvpn.c    |   24 +-----------------------
 4 files changed, 9 insertions(+), 32 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d210751..d371494 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,18 +63,18 @@ GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
 
 PKG_CHECK_MODULES(NM,
-       NetworkManager >= 0.9.10
-       libnm-util >= 0.9.10
-       libnm-glib >= 0.9.10
-       libnm-glib-vpn >= 0.9.10)
-NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_10"
+       NetworkManager >= 1.1.0
+       libnm-util >= 1.1.0
+       libnm-glib >= 1.1.0
+       libnm-glib-vpn >= 1.1.0)
+NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_1_0"
 NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_1_0"
 
 if test x"$with_gnome" != xno; then
        PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
        GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4"
 
-       PKG_CHECK_MODULES(NMGTK, libnm-gtk >= 0.9.10)
+       PKG_CHECK_MODULES(NMGTK, libnm-gtk >= 1.1.0)
        PKG_CHECK_MODULES(LIBSECRET, libsecret-unstable)
 fi
 
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index c2ec743..8352b42 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -36,13 +36,12 @@
 #include <glib/gi18n-lib.h>
 
 #ifdef NM_OPENVPN_OLD
+#define NM_VPN_LIBNM_COMPAT
 #include <nm-setting-connection.h>
 #include <nm-setting-8021x.h>
 #include <nm-utils.h>
 #include <nm-ui-utils.h>
 
-#define NMSettingVpn NMSettingVPN
-
 #define OPENVPN_EDITOR_PLUGIN_ERROR                     NM_SETTING_VPN_ERROR
 #define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY    NM_SETTING_VPN_ERROR_INVALID_PROPERTY
 
diff --git a/properties/import-export.c b/properties/import-export.c
index b39b5ed..d00f94a 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -36,11 +36,11 @@
 #include <glib/gi18n-lib.h>
 
 #ifdef NM_OPENVPN_OLD
+#define NM_VPN_LIBNM_COMPAT
 #include <nm-setting-vpn.h>
 #include <nm-setting-connection.h>
 #include <nm-setting-ip4-config.h>
 
-#define NMSettingVpn NMSettingVPN
 #define nm_simple_connection_new nm_connection_new
 
 #define OPENVPN_EDITOR_PLUGIN_ERROR                     NM_SETTING_VPN_ERROR
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 4ba0923..867d6a7 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -38,32 +38,12 @@
 #include <gtk/gtk.h>
 
 #ifdef NM_OPENVPN_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 OPENVPN_EDITOR_PLUGIN_ERROR                     NM_SETTING_VPN_ERROR
 #define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY    NM_SETTING_VPN_ERROR_INVALID_PROPERTY
 #define OPENVPN_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY    NM_SETTING_VPN_ERROR_MISSING_PROPERTY
@@ -91,14 +71,12 @@
 
 /************** plugin class **************/
 
-#ifndef NM_OPENVPN_OLD
 enum {
        PROP_0,
        PROP_NAME,
        PROP_DESC,
        PROP_SERVICE
 };
-#endif
 
 static void openvpn_editor_plugin_interface_init (NMVpnEditorPluginInterface *iface_class);
 


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