[gnome-control-center/wip/benzea/ci: 13/28] network: Fix Bluetooth panel showing up after connection removal
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/benzea/ci: 13/28] network: Fix Bluetooth panel showing up after connection removal
- Date: Mon, 28 May 2018 22:14:43 +0000 (UTC)
commit e450750b1a62d0d2310745b213775ddb9c0151e1
Author: Benjamin Berg <bberg redhat com>
Date: Thu May 24 18:06:23 2018 +0200
network: Fix Bluetooth panel showing up after connection removal
The test to check whether the Bluetooth (simple section) contains
elements was testing for NetObjectSimple. However, ethernet connections
are a subclass and check would count these. This causes issue when the
code is run after net object removal.
The fix is to check for the exact object type rather than also allowing
subclasses.
panels/network/cc-network-panel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index a03ab56da..c4a3b6130 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -415,7 +415,8 @@ update_simple_section (CcNetworkPanel *self)
for (i = 0, n_simple = 0; i < self->devices->len; i++) {
NetObject *net_object = g_ptr_array_index (self->devices, i);
- if (!NET_IS_DEVICE_SIMPLE (net_object))
+ /* NetDeviceSimple but none of the subclasses */
+ if (G_OBJECT_TYPE (net_object) != NET_TYPE_DEVICE_SIMPLE)
continue;
net_device_simple_set_show_separator (NET_DEVICE_SIMPLE (net_object), n_simple > 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]