[gnome-control-center/wip/gbsneto/new-wifi-panel: 6/6] network: Add Wi-Fi widgets using device product as title
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/new-wifi-panel: 6/6] network: Add Wi-Fi widgets using device product as title
- Date: Tue, 11 Jul 2017 20:18:11 +0000 (UTC)
commit dfe8630ecac1293675c8ef7ed3aa5ad810fe5b61
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jul 11 17:06:57 2017 -0300
network: Add Wi-Fi widgets using device product as title
When there are multiple Wi-Fi devices, we must show a stack
switcher in the header if the Wi-Fi panel with the name of
the device.
The problem is that, currently, NetDeviceWifi does not add
its widgets to the main stack setting a stack title, and so
the stack switcher is empty.
Fix that by always adding the widgets to the stack using the
device product name as title.
panels/network/net-device-wifi.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 990021f..a502d14 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -97,9 +97,12 @@ device_wifi_proxy_add_to_stack (NetObject *object,
GtkStack *stack,
GtkSizeGroup *heading_size_group)
{
+ NMDevice *nmdevice;
GtkWidget *widget;
NetDeviceWifi *device_wifi = NET_DEVICE_WIFI (object);
+ nmdevice = net_device_get_nm_device (NET_DEVICE (object));
+
/* add widgets to size group */
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
"heading_ipv4"));
@@ -107,7 +110,9 @@ device_wifi_proxy_add_to_stack (NetObject *object,
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
"notebook_view"));
- gtk_stack_add_named (stack, widget, net_object_get_id (object));
+ gtk_stack_add_titled (stack, widget,
+ net_object_get_id (object),
+ nm_device_get_product (nmdevice));
return widget;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]