network: Don't show modems supported by cellular panel
Cellular panel is already handling it
This commit is contained in:
parent
dc840f0aec
commit
169f537e4b
1 changed files with 25 additions and 0 deletions
|
@ -382,6 +382,27 @@ update_bluetooth_section (CcNetworkPanel *self)
|
||||||
gtk_widget_set_visible (self->container_bluetooth, self->bluetooth_devices->len > 0);
|
gtk_widget_set_visible (self->container_bluetooth, self->bluetooth_devices->len > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
wwan_panel_supports_modem (GDBusObject *object)
|
||||||
|
{
|
||||||
|
MMObject *mm_object;
|
||||||
|
MMModem *modem;
|
||||||
|
MMModemCapability capability, supported_capabilities;
|
||||||
|
|
||||||
|
g_assert (G_IS_DBUS_OBJECT (object));
|
||||||
|
|
||||||
|
supported_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_LTE;
|
||||||
|
#if MM_CHECK_VERSION (1,14,0)
|
||||||
|
supported_capabilities |= MM_MODEM_CAPABILITY_5GNR;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mm_object = MM_OBJECT (object);
|
||||||
|
modem = mm_object_get_modem (mm_object);
|
||||||
|
capability = mm_modem_get_current_capabilities (modem);
|
||||||
|
|
||||||
|
return capability & supported_capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
panel_add_device (CcNetworkPanel *self, NMDevice *device)
|
panel_add_device (CcNetworkPanel *self, NMDevice *device)
|
||||||
{
|
{
|
||||||
|
@ -425,6 +446,10 @@ panel_add_device (CcNetworkPanel *self, NMDevice *device)
|
||||||
nm_device_get_udi (device));
|
nm_device_get_udi (device));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This will be handled by cellular panel */
|
||||||
|
if (wwan_panel_supports_modem (modem_object))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_mobile = net_device_mobile_new (self->client, device, modem_object);
|
device_mobile = net_device_mobile_new (self->client, device, modem_object);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue