[network-manager-applet] editor: fix setting of interface-name property for virtual connections
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: fix setting of interface-name property for virtual connections
- Date: Fri, 27 Feb 2015 12:52:51 +0000 (UTC)
commit 1347d8580186bbf4491fc880fbf26396a29f3ea6
Author: Jiří Klimeš <jklimes redhat com>
Date: Fri Feb 27 10:48:44 2015 +0100
editor: fix setting of interface-name property for virtual connections
src/connection-editor/page-master.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/connection-editor/page-master.c b/src/connection-editor/page-master.c
index 71da39b..1b2b775 100644
--- a/src/connection-editor/page-master.c
+++ b/src/connection-editor/page-master.c
@@ -565,20 +565,14 @@ ui_to_setting (CEPageMaster *self)
{
CEPageMasterPrivate *priv = CE_PAGE_MASTER_GET_PRIVATE (self);
NMSettingConnection *s_con;
- const char *connection_type;
- NMSetting *setting;
const char *interface_name;
- /* Find the "toplevel" NMSetting for this connection */
- s_con = nm_connection_get_setting_connection (CE_PAGE (self)->connection);
- connection_type = nm_setting_connection_get_connection_type (s_con);
- setting = nm_connection_get_setting_by_name (CE_PAGE (self)->connection, connection_type);
-
/* Interface name */
+ s_con = nm_connection_get_setting_connection (CE_PAGE (self)->connection);
interface_name = gtk_entry_get_text (priv->interface_name);
- g_object_set (setting,
- "interface-name", interface_name,
- NULL);
+ if (!*interface_name)
+ interface_name = NULL;
+ g_object_set (s_con, "interface-name", interface_name, NULL);
/* Slaves are updated as they're edited, so nothing to do */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]