[network-manager-libreswan/th/vpn-editor-split: 4/18] properties/trivial: rename LIBRESWAN_EDITOR_PLUGIN_ERROR to NMV_EDITOR_PLUGIN_ERROR



commit 4ec1c05e8ac114a0fef5c3145f00078f76d05edd
Author: Thomas Haller <thaller redhat com>
Date:   Tue May 10 12:39:51 2016 +0200

    properties/trivial: rename LIBRESWAN_EDITOR_PLUGIN_ERROR to NMV_EDITOR_PLUGIN_ERROR
    
    That is what the error is called for nm-vpnc and nm-openvpn.

 properties/nm-libreswan.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/properties/nm-libreswan.c b/properties/nm-libreswan.c
index a510168..7a5831a 100644
--- a/properties/nm-libreswan.c
+++ b/properties/nm-libreswan.c
@@ -45,16 +45,16 @@
 #include <nm-setting-ip4-config.h>
 #include <nm-ui-utils.h>
 
-#define LIBRESWAN_EDITOR_PLUGIN_ERROR                  NM_SETTING_VPN_ERROR
-#define LIBRESWAN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
+#define NMV_EDITOR_PLUGIN_ERROR                  NM_SETTING_VPN_ERROR
+#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 LIBRESWAN_EDITOR_PLUGIN_ERROR                  NM_CONNECTION_ERROR
-#define LIBRESWAN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
+#define NMV_EDITOR_PLUGIN_ERROR                  NM_CONNECTION_ERROR
+#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
 #endif
 
 #include "nm-service-defines.h"
@@ -116,8 +116,8 @@ check_validity (LibreswanEditor *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,
-                            LIBRESWAN_EDITOR_PLUGIN_ERROR,
-                            LIBRESWAN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY,
+                            NMV_EDITOR_PLUGIN_ERROR,
+                            NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY,
                             NM_LIBRESWAN_RIGHT);
                return FALSE;
        }
@@ -486,7 +486,7 @@ nm_vpn_editor_new (NMConnection *connection, GError **error)
 
        object = g_object_new (LIBRESWAN_TYPE_EDITOR, NULL);
        if (!object) {
-               g_set_error (error, LIBRESWAN_EDITOR_PLUGIN_ERROR, 0, "could not create libreswan object");
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, 0, "could not create libreswan object");
                return NULL;
        }
 
@@ -502,7 +502,7 @@ nm_vpn_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, LIBRESWAN_EDITOR_PLUGIN_ERROR, 0,
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, 0,
                             "could not load required resources at %s", ui_file);
                g_free (ui_file);
                g_object_unref (object);
@@ -512,7 +512,7 @@ nm_vpn_editor_new (NMConnection *connection, GError **error)
 
        priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "libreswan-vbox"));
        if (!priv->widget) {
-               g_set_error (error, LIBRESWAN_EDITOR_PLUGIN_ERROR, 0, "could not load UI widget");
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, 0, "could not load UI widget");
                g_object_unref (object);
                return NULL;
        }
@@ -592,7 +592,7 @@ import_from_file (NMVpnEditorPlugin *self,
 
        fd = g_open (path, O_RDONLY, 0777);
        if (fd == -1) {
-               g_set_error (error, LIBRESWAN_EDITOR_PLUGIN_ERROR, 0,
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, 0,
                             _("Can't open file '%s': %s"), path, g_strerror (errno));
                return FALSE;
        }
@@ -614,7 +614,7 @@ export_to_file (NMVpnEditorPlugin *self,
 
        fd = g_open (path, O_WRONLY | O_CREAT, 0777);
        if (fd == -1) {
-               g_set_error (error, LIBRESWAN_EDITOR_PLUGIN_ERROR, 0,
+               g_set_error (error, NMV_EDITOR_PLUGIN_ERROR, 0,
                             _("Can't open file '%s': %s"), path, g_strerror (errno));
                return FALSE;
        }


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