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
This commit is contained in:
parent
b7c4b30f63
commit
11c81f1809
1 changed files with 11 additions and 8 deletions
|
@ -763,19 +763,12 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
|
||||||
if (find_in_model_by_id (panel, udi, NULL) != NULL)
|
if (find_in_model_by_id (panel, udi, NULL) != NULL)
|
||||||
goto out;
|
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);
|
type = nm_device_get_device_type (device);
|
||||||
|
|
||||||
g_debug ("device %s type %i path %s",
|
g_debug ("device %s type %i path %s",
|
||||||
udi, type, nm_object_get_path (NM_OBJECT (device)));
|
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) {
|
switch (type) {
|
||||||
case NM_DEVICE_TYPE_ETHERNET:
|
case NM_DEVICE_TYPE_ETHERNET:
|
||||||
device_g_type = NET_TYPE_DEVICE_ETHERNET;
|
device_g_type = NET_TYPE_DEVICE_ETHERNET;
|
||||||
|
@ -786,6 +779,16 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
|
||||||
case NM_DEVICE_TYPE_WIFI:
|
case NM_DEVICE_TYPE_WIFI:
|
||||||
device_g_type = NET_TYPE_DEVICE_WIFI;
|
device_g_type = NET_TYPE_DEVICE_WIFI;
|
||||||
break;
|
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:
|
default:
|
||||||
device_g_type = NET_TYPE_DEVICE_SIMPLE;
|
device_g_type = NET_TYPE_DEVICE_SIMPLE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue