From fc6695d16854c04bc146cd43e1a5e897a1cbdf83 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 16 Nov 2022 17:07:33 +0100 Subject: c-e: rename vpn_connection_from_file() to connection_import_from_file() It will not only import VPN profiles. Rename. --- src/connection-editor/connection-helpers.c | 4 ++-- src/connection-editor/connection-helpers.h | 2 +- src/connection-editor/nm-connection-list.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c index 0b078eba..0c365808 100644 --- a/src/connection-editor/connection-helpers.c +++ b/src/connection-editor/connection-helpers.c @@ -163,7 +163,7 @@ no_description: } NMConnection * -vpn_connection_from_file (const char *filename, GError **error) +connection_import_from_file (const char *filename, GError **error) { gs_free_error GError *unused_error = NULL; NMConnection *connection = NULL; @@ -237,7 +237,7 @@ import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data) } canceled = FALSE; - connection = vpn_connection_from_file (filename, &error); + connection = connection_import_from_file (filename, &error); if (connection) { /* Wrap around the actual new function so that the page can complete * the missing parts, such as UUID or make up the connection name. */ diff --git a/src/connection-editor/connection-helpers.h b/src/connection-editor/connection-helpers.h index bf7d77fb..7663c827 100644 --- a/src/connection-editor/connection-helpers.h +++ b/src/connection-editor/connection-helpers.h @@ -73,7 +73,7 @@ gboolean connection_supports_proxy (NMConnection *connection); gboolean connection_supports_ip4 (NMConnection *connection); gboolean connection_supports_ip6 (NMConnection *connection); -NMConnection *vpn_connection_from_file (const char *filename, GError **error); +NMConnection *connection_import_from_file (const char *filename, GError **error); #endif /* __CONNECTION_HELPERS_H__ */ diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c index d897d1d0..49583f65 100644 --- a/src/connection-editor/nm-connection-list.c +++ b/src/connection-editor/nm-connection-list.c @@ -1046,13 +1046,13 @@ nm_connection_list_create (NMConnectionList *list, if (import_filename) { if (ctype == G_TYPE_INVALID) { /* Atempt a VPN import */ - connection = vpn_connection_from_file (import_filename, NULL); + connection = connection_import_from_file (import_filename, NULL); if (connection) ctype = NM_TYPE_SETTING_VPN; else g_set_error (&error, NMA_ERROR, NMA_ERROR_GENERIC, _("Unrecognized connection type")); } else if (ctype == NM_TYPE_SETTING_VPN) { - connection = vpn_connection_from_file (import_filename, &error); + connection = connection_import_from_file (import_filename, &error); } else { g_set_error (&error, NMA_ERROR, NMA_ERROR_GENERIC, _("Don’t know how to import “%s” connections"), g_type_name (ctype)); -- cgit v1.2.1