forked from pool/NetworkManager-vpnc
- Add nm-vpnc-editor-interface-name.patch: properties: Don't set interface name as empty string by default (glgo#GNOME/NetworkManager-vpnc/commit/f4df2db6c, bsc#1213769). OBS-URL: https://build.opensuse.org/request/show/1102116 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/NetworkManager-vpnc?expand=0&rev=99
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 188a6bc239fd148a2468d8e9d935d19da38b37f0 Mon Sep 17 00:00:00 2001
|
|
From: Jonathan Kang <jonathankang@gnome.org>
|
|
Date: Mon, 18 Apr 2022 16:00:05 +0800
|
|
Subject: [PATCH] test
|
|
|
|
---
|
|
properties/nm-vpnc-editor.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/properties/nm-vpnc-editor.c b/properties/nm-vpnc-editor.c
|
|
index b7d3ca3..b5236c0 100644
|
|
--- a/properties/nm-vpnc-editor.c
|
|
+++ b/properties/nm-vpnc-editor.c
|
|
@@ -288,8 +288,6 @@ populate_adv_dialog (VpncEditor *self)
|
|
g_return_if_fail (widget != NULL);
|
|
if (priv->interface_name)
|
|
gtk_editable_set_text (GTK_EDITABLE (widget), priv->interface_name);
|
|
- else
|
|
- gtk_editable_set_text (GTK_EDITABLE (widget), "");
|
|
|
|
/* Encryption combo */
|
|
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "encryption_combo"));
|
|
@@ -900,9 +898,8 @@ update_connection (NMVpnEditor *editor,
|
|
update_adv_settings (self, s_vpn);
|
|
|
|
str = priv->interface_name;
|
|
- if (!str)
|
|
- str = "";
|
|
- g_object_set (G_OBJECT (s_con), NM_SETTING_CONNECTION_INTERFACE_NAME, str, NULL);
|
|
+ if (str && strlen (str))
|
|
+ g_object_set (G_OBJECT (s_con), NM_SETTING_CONNECTION_INTERFACE_NAME, str, NULL);
|
|
|
|
nm_connection_add_setting (connection, NM_SETTING (s_vpn));
|
|
return TRUE;
|
|
--
|
|
2.34.1
|
|
|