[gnome-control-center] network: Really hide all of the virtualisation bridges



commit 034d269fe0e6fa06c92f3f50e381a371a55630d3
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Sep 8 14:29:21 2014 +0200

    network: Really hide all of the virtualisation bridges
    
    Follow-up to ddc35609bd321dfb82ebb62af719f2e8fac16210.

 panels/network/cc-network-panel.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index a81ca56..fe17718 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -701,18 +701,24 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
         GtkNotebook *notebook;
         GtkSizeGroup *size_group;
         GType device_g_type;
+        const char *udi;
 
         if (!nm_device_get_managed (device))
                 goto out;
 
         /* do we have an existing object with this id? */
-        if (find_in_model_by_id (panel, nm_device_get_udi (device), NULL) != NULL)
+        udi = nm_device_get_udi (device);
+        if (find_in_model_by_id (panel, udi, NULL) != NULL)
+                goto out;
+
+        /* Don't add the libvirtd bridge to the UI */
+        if (g_strrstr (udi, "/virbr0") != NULL)
                 goto out;
 
         type = nm_device_get_device_type (device);
 
         g_debug ("device %s type %i path %s",
-                 nm_device_get_udi (device), type, nm_object_get_path (NM_OBJECT (device)));
+                 udi, type, nm_object_get_path (NM_OBJECT (device)));
 
         /* map the NMDeviceType to the GType */
         switch (type) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]