[network-manager-vpnc/th/vpn-editor-split-bgo766170: 4/20] properties/trivial: rename VPNC_PLUGIN_UI_ERROR to NMV_EDITOR_PLUGIN_ERROR



commit d1f48eb9ccc748992a408428988c4ffc10cd06d6
Author: Thomas Haller <thaller redhat com>
Date:   Mon May 9 13:40:30 2016 +0200

    properties/trivial: rename VPNC_PLUGIN_UI_ERROR to NMV_EDITOR_PLUGIN_ERROR
    
    nm-openvpn has NMV_EDITOR_PLUGIN_ERROR too. Rename the defines that
    serve the same purpose.

 properties/nm-vpnc.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index ccf45b2..0b00db5 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -57,18 +57,18 @@
 #define nm_setting_ip_config_add_route nm_setting_ip4_config_add_route
 #define NM_SETTING_IP_CONFIG_NEVER_DEFAULT NM_SETTING_IP4_CONFIG_NEVER_DEFAULT
 
-#define VPNC_PLUGIN_UI_ERROR                  NM_SETTING_VPN_ERROR
-#define VPNC_PLUGIN_UI_ERROR_FAILED           NM_SETTING_VPN_ERROR_UNKNOWN
-#define VPNC_PLUGIN_UI_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
+#define NMV_EDITOR_PLUGIN_ERROR                  NM_SETTING_VPN_ERROR
+#define NMV_EDITOR_PLUGIN_ERROR_FAILED           NM_SETTING_VPN_ERROR_UNKNOWN
+#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
 
 #else /* !NM_VPN_OLD */
 
 #include <NetworkManager.h>
 #include <nma-ui-utils.h>
 
-#define VPNC_PLUGIN_UI_ERROR                  NM_CONNECTION_ERROR
-#define VPNC_PLUGIN_UI_ERROR_FAILED           NM_CONNECTION_ERROR_FAILED
-#define VPNC_PLUGIN_UI_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
+#define NMV_EDITOR_PLUGIN_ERROR                  NM_CONNECTION_ERROR
+#define NMV_EDITOR_PLUGIN_ERROR_FAILED           NM_CONNECTION_ERROR_FAILED
+#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
 #endif
 
 #include "nm-vpnc-service-defines.h"
@@ -129,8 +129,8 @@ check_validity (VpncEditor *self, GError **error)
        str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
        if (!str || !strlen (str) || strstr (str, " ") || strstr (str, "\t")) {
                g_set_error (error,
-                            VPNC_PLUGIN_UI_ERROR,
-                            VPNC_PLUGIN_UI_ERROR_INVALID_PROPERTY,
+                            NMV_EDITOR_PLUGIN_ERROR,
+                            NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY,
                             NM_VPNC_KEY_GATEWAY);
                return FALSE;
        }
@@ -139,8 +139,8 @@ check_validity (VpncEditor *self, GError **error)
        str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
        if (!str || !strlen (str)) {
                g_set_error (error,
-                            VPNC_PLUGIN_UI_ERROR,
-                            VPNC_PLUGIN_UI_ERROR_INVALID_PROPERTY,
+                            NMV_EDITOR_PLUGIN_ERROR,
+                            NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY,
                             NM_VPNC_KEY_ID);
                return FALSE;
        }
@@ -1001,7 +1001,7 @@ nm_vpnc_editor_new (NMConnection *connection, GError **error)
 
        object = g_object_new (VPNC_TYPE_EDITOR, NULL);
        if (!object) {
-               g_set_error (error, VPNC_PLUGIN_UI_ERROR, VPNC_PLUGIN_UI_ERROR_FAILED,
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
                             "could not create vpnc object");
                return NULL;
        }
@@ -1017,7 +1017,7 @@ nm_vpnc_editor_new (NMConnection *connection, GError **error)
                g_warning ("Couldn't load builder file: %s",
                           error && *error ? (*error)->message : "(unknown)");
                g_clear_error (error);
-               g_set_error (error, VPNC_PLUGIN_UI_ERROR, VPNC_PLUGIN_UI_ERROR_FAILED,
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
                             "could not load required resources at %s", ui_file);
                g_free (ui_file);
                g_object_unref (object);
@@ -1027,7 +1027,7 @@ nm_vpnc_editor_new (NMConnection *connection, GError **error)
 
        priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "vpnc-vbox"));
        if (!priv->widget) {
-               g_set_error (error, VPNC_PLUGIN_UI_ERROR, VPNC_PLUGIN_UI_ERROR_FAILED,
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
                             "could not load UI widget");
                g_object_unref (object);
                return NULL;


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