[gnome-control-center] network: Simplify the ignored Network interface types



commit 11c81f18092965b8af75e47a07bc93639b0323cc
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 20 15:40:51 2017 +0200

    network: Simplify the ignored Network interface types
    
    We might want to add more ignored types later on, but this is a simple
    cleanup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783998

 panels/network/cc-network-panel.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 7be3357..27e675a 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -763,19 +763,12 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *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;
-        /* Don't add VPN devices either */
-        if (g_strrstr (udi, "/tun0") != NULL)
-                goto out;
-
         type = nm_device_get_device_type (device);
 
         g_debug ("device %s type %i path %s",
                  udi, type, nm_object_get_path (NM_OBJECT (device)));
 
-        /* map the NMDeviceType to the GType */
+        /* map the NMDeviceType to the GType, or ignore */
         switch (type) {
         case NM_DEVICE_TYPE_ETHERNET:
                 device_g_type = NET_TYPE_DEVICE_ETHERNET;
@@ -786,6 +779,16 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
         case NM_DEVICE_TYPE_WIFI:
                 device_g_type = NET_TYPE_DEVICE_WIFI;
                 break;
+        /* not going to set up a cluster in GNOME */
+        case NM_DEVICE_TYPE_VETH:
+        /* enterprise features */
+        case NM_DEVICE_TYPE_BOND:
+        case NM_DEVICE_TYPE_TEAM:
+        /* Don't need the libvirtd bridge */
+        case NM_DEVICE_TYPE_BRIDGE:
+        /* Don't add VPN devices */
+        case NM_DEVICE_TYPE_TUN:
+                goto out;
         default:
                 device_g_type = NET_TYPE_DEVICE_SIMPLE;
                 break;


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