[gnome-control-center/gnome-3-22] network: Fix missing page title on wired panel



commit 3026d3d24966da5db9e6854a4fb9d202c0db4e8f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Dec 21 21:23:32 2016 -0600

    network: Fix missing page title on wired panel
    
    The NetDeviceEthernet's title is not set until after the UI is created,
    so we have to listen for changes to the title.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776369

 panels/network/net-device-ethernet.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index f8db331..e3ab8b8 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -514,6 +514,14 @@ device_off_toggled (GtkSwitch         *sw,
 }
 
 static void
+device_title_changed (NetDeviceEthernet *device,
+                      GParamSpec        *pspec,
+                      gpointer           user_data)
+{
+        device_ethernet_refresh_ui (device);
+}
+
+static void
 connection_activated (GtkListBox *list, GtkListBoxRow *row, NetDeviceEthernet *device)
 {
         NMClient *client;
@@ -625,4 +633,6 @@ net_device_ethernet_init (NetDeviceEthernet *device)
         }
 
         device->connections = g_hash_table_new (NULL, NULL);
+
+        g_signal_connect (device, "notify::title", G_CALLBACK (device_title_changed), NULL);
 }


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