[gnome-control-center] network: Fix cloned MAC not being saved for Ethernet
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Fix cloned MAC not being saved for Ethernet
- Date: Tue, 6 Feb 2018 09:47:13 +0000 (UTC)
commit 6b043fd3ddbd9306b677471a49835404d6be0ba6
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 31 17:00:47 2018 +0100
network: Fix cloned MAC not being saved for Ethernet
We read the MAC as being the cloned MAC, which NM would likely take to
mean that we didn't want a cloned MAC.
See https://bugzilla.redhat.com/show_bug.cgi?id=1467295
https://bugzilla.gnome.org/show_bug.cgi?id=793072
.../network/connection-editor/ce-page-ethernet.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ethernet.c
b/panels/network/connection-editor/ce-page-ethernet.c
index 2163cdb..dbca6b9 100644
--- a/panels/network/connection-editor/ce-page-ethernet.c
+++ b/panels/network/connection-editor/ce-page-ethernet.c
@@ -86,7 +86,7 @@ static void
ui_to_setting (CEPageEthernet *page)
{
gchar *device_mac = NULL;
- gchar *cloned_mac;
+ gchar *cloned_mac = NULL;
const gchar *text;
GtkWidget *entry;
@@ -95,8 +95,12 @@ ui_to_setting (CEPageEthernet *page)
text = gtk_entry_get_text (GTK_ENTRY (entry));
device_mac = ce_page_trim_address (text);
}
- text = gtk_entry_get_text (GTK_ENTRY (entry));
- cloned_mac = ce_page_trim_address (text);
+
+ entry = gtk_bin_get_child (GTK_BIN (page->cloned_mac));
+ if (entry) {
+ text = gtk_entry_get_text (GTK_ENTRY (entry));
+ cloned_mac = ce_page_trim_address (text);
+ }
g_object_set (page->setting_wired,
NM_SETTING_WIRED_MAC_ADDRESS, device_mac,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]