[gnome-control-center/benzea/bluetooth-section-fixes: 1/2] network: Only show bluetooth devices in Bluetooth section



commit 6bc22ab15aac9128fc8072e2c8b2e339ea080ba8
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Mar 21 14:22:12 2019 +0100

    network: Only show bluetooth devices in Bluetooth section
    
    Historically, the bluetooth section has been the dumping ground for any
    device we don't handle in another way. It has had the "Bluetooth" title
    for a long time now though, and many of the devices that end up in there
    are actually not useful in the GNOME context.
    
    There are some people complaining that we should support these devices
    properly, but the status quo does not help any one either really, so
    lets remove them entirely for now.
    
    Obsoletes: !203
    Fixes: #190
    Touches: #167

 panels/network/cc-network-panel.c | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 15f0f93f0..1a305578b 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -468,21 +468,30 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
         case NM_DEVICE_TYPE_MODEM:
                 device_g_type = NET_TYPE_DEVICE_MOBILE;
                 break;
-        /* Let the wi-fi panel take care of wifi devices */
+        case NM_DEVICE_TYPE_BT:
+                /* FIXME: DEVICE_SIMPLE ends up in our "bluetooth" section
+                 *        we could handle some more devices types as "simple"
+                 *        in a separate section, but right now we don't have
+                 *        anywhere to put them, and we didn't have a proper
+                 *        section for a long time now.
+                 *
+                 *        See also:
+                 *          https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/426
+                 *          https://gitlab.gnome.org/GNOME/gnome-control-center/issues/190
+                 *          https://gitlab.gnome.org/GNOME/gnome-control-center/issues/167
+                 *          https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/203
+                 */
+                device_g_type = NET_TYPE_DEVICE_SIMPLE;
+                break;
+
+        /* For Wi-Fi and VPN we handle connections separately; we correctly manage
+         * them, but not here.
+         */
         case NM_DEVICE_TYPE_WIFI:
-        /* 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:
-                return;
+        /* And the rest we simply cannot deal with currently. */
         default:
-                device_g_type = NET_TYPE_DEVICE_SIMPLE;
-                break;
+          return;
         }
 
         /* create device */


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