[gnome-control-center] network: ignore unrecognized device types



commit ecdb1d847794b43dc0d1ae3b107d811fe52e5846
Author: Dan Winship <danw gnome org>
Date:   Wed Aug 22 09:00:35 2012 -0400

    network: ignore unrecognized device types
    
    rather than showing a blank line in the device-type list that doesn't
    do anything.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678210

 panels/network/cc-network-panel.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 6568cb1..a6943a7 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -380,16 +380,10 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
         if (find_in_model_by_id (panel, nm_device_get_udi (device)) != NULL)
                 goto out;
 
-        /* we don't support bluetooth devices yet -- no mockup */
         type = nm_device_get_device_type (device);
-        if (type == NM_DEVICE_TYPE_BT)
-                goto out;
-        if (type == NM_DEVICE_TYPE_WIMAX)
-                goto out;
 
         g_debug ("device %s type %i",
-                 nm_device_get_udi (device),
-                 nm_device_get_device_type (device));
+                 nm_device_get_udi (device), type);
 
         /* map the NMDeviceType to the GType */
         switch (type) {
@@ -403,8 +397,7 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
                 device_g_type = NET_TYPE_DEVICE_WIFI;
                 break;
         default:
-                device_g_type = NET_TYPE_DEVICE;
-                break;
+                goto out;
         }
 
         /* create device */



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