[gnome-control-center/wip/benzea/ci-network: 7/17] network: Ensure devices are removed from UI when disappearing
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/benzea/ci-network: 7/17] network: Ensure devices are removed from UI when disappearing
- Date: Wed, 2 May 2018 22:30:23 +0000 (UTC)
commit ec50cbcdff340fbb97ab50916c9e225273be2aa9
Author: Benjamin Berg <bberg redhat com>
Date: Wed Mar 28 01:35:28 2018 +0200
network: Ensure devices are removed from UI when disappearing
The "removed" callback from NMObject is never called when the object is
simply finalised because the UI drops the reference. Explicitly call the
handler so that UI elements are removed.
panels/network/cc-network-panel.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 405b538cf..a03ab56da 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -556,6 +556,8 @@ panel_remove_device (CcNetworkPanel *panel, NMDevice *device)
if (object == NULL)
return;
+ /* NMObject will not fire the "removed" signal, so handle the UI removal explicitly */
+ object_removed_cb (object, panel);
g_ptr_array_remove (panel->devices, object);
/* update vpn widgets */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]