[gnome-control-center/wip/every-detail-matters-round1: 10/13] wifi: Add device widgets after caching in the array



commit 4c2bdfa9cd8e73cda35b25ae881ab86e826b3101
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Jun 14 14:02:55 2019 -0300

    wifi: Add device widgets after caching in the array
    
    This will be required to bind the "scanning" property of
    the NetDeviceWifi to the GtkSpinner.

 panels/network/cc-wifi-panel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c
index de5069425..63aa3dc58 100644
--- a/panels/network/cc-wifi-panel.c
+++ b/panels/network/cc-wifi-panel.c
@@ -166,8 +166,6 @@ add_wifi_device (CcWifiPanel *self,
                              "id", nm_device_get_udi (device),
                              NULL);
 
-  net_object_add_to_stack (net_device, self->stack, self->sizegroup);
-
   /* And add to the header widgets */
   header_widget = net_device_wifi_get_header_widget (NET_DEVICE_WIFI (net_device));
 
@@ -177,6 +175,9 @@ add_wifi_device (CcWifiPanel *self,
   g_ptr_array_add (self->devices, net_device);
 
   update_devices_names (self);
+
+  /* Needs to be added after the device is added to the self->devices array */
+  net_object_add_to_stack (net_device, self->stack, self->sizegroup);
 }
 
 static void


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