[network-manager-applet/bg/device-empty-mac-rh1380424: 2/2] editor: hide device MAC from combo when NULL
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/bg/device-empty-mac-rh1380424: 2/2] editor: hide device MAC from combo when NULL
- Date: Tue, 3 Jan 2017 22:24:23 +0000 (UTC)
commit 96e1e477c0a07bb41e987cf54dcb928a5474ab9f
Author: Beniamino Galvani <bgalvani redhat com>
Date: Tue Jan 3 23:18:28 2017 +0100
editor: hide device MAC from combo when NULL
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
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 2e9e130..81c436a 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]