diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-01-03 23:18:28 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-01-03 23:20:20 +0100 |
commit | 96e1e477c0a07bb41e987cf54dcb928a5474ab9f (patch) | |
tree | 94e1fd75f6ccefbd84f7e5d88ea15d50d2883e88 | |
parent | 6937c9fbc892f6d6633faa054d780e62cf6f8227 (diff) | |
download | network-manager-applet-bg/device-empty-mac-rh1380424.tar.gz |
editor: hide device MAC from combo when NULLbg/device-empty-mac-rh1380424
Hide the device MAC address from the device combo when the device
doesn't have a permanent MAC.
https://bugzilla.redhat.com/show_bug.cgi?id=1380424
-rw-r--r-- | src/connection-editor/ce-page.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c index 2e9e1307..81c436a7 100644 --- a/src/connection-editor/ce-page.c +++ b/src/connection-editor/ce-page.c @@ -371,11 +371,12 @@ _get_device_list (CEPage *self, g_object_get (G_OBJECT (dev), mac_property, &mac, NULL); if (set_ifname && mac_property) - item = g_strdup_printf ("%s (%s)", ifname, mac); + item = g_strdup_printf ("%s%s%s%s", ifname, NM_PRINT_FMT_QUOTED (mac, " (", mac, ")", "")); else item = g_strdup (set_ifname ? ifname : mac); - g_ptr_array_add (interfaces, item); + if (item) + g_ptr_array_add (interfaces, item); if (mac_property) g_free (mac); } |