summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-11-16 17:07:33 +0100
committerThomas Haller <thaller@redhat.com>2022-11-16 17:07:33 +0100
commitfc6695d16854c04bc146cd43e1a5e897a1cbdf83 (patch)
tree954841a2c0d56020b5ebfd17cb28333cdf526b55
parent9cc73295ec0c2be066c4a5eb3869a0a592f7c7f7 (diff)
downloadnetwork-manager-applet-fc6695d16854c04bc146cd43e1a5e897a1cbdf83.tar.gz
c-e: rename vpn_connection_from_file() to connection_import_from_file()
It will not only import VPN profiles. Rename.
-rw-r--r--src/connection-editor/connection-helpers.c4
-rw-r--r--src/connection-editor/connection-helpers.h2
-rw-r--r--src/connection-editor/nm-connection-list.c4
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));