[gnome-control-center/gnome-3-14] network: Avoid warnings while closing connection editor



commit 09dd409c91cad47ca95cd94559136fd2314c6ff3
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Jan 25 19:10:41 2016 +0100

    network: Avoid warnings while closing connection editor
    
    It doesn't make sense to try to validate pages because widgets are
    changing due to the whole dialog being destroyed and it causes a bunch
    of warnings because some resources are cleared on each page dispose
    method.
    
    Avoid all that by disconnecting the page "changed" signal handler
    before we start destroying widgets.

 .../connection-editor/net-connection-editor.c      |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/connection-editor/net-connection-editor.c 
b/panels/network/connection-editor/net-connection-editor.c
index eacfc53..3c62ba2 100644
--- a/panels/network/connection-editor/net-connection-editor.c
+++ b/panels/network/connection-editor/net-connection-editor.c
@@ -50,6 +50,8 @@ static guint signals[LAST_SIGNAL] = { 0 };
 
 G_DEFINE_TYPE (NetConnectionEditor, net_connection_editor, G_TYPE_OBJECT)
 
+static void page_changed (CEPage *page, gpointer user_data);
+
 static void
 selection_changed (GtkTreeSelection *selection, NetConnectionEditor *editor)
 {
@@ -182,6 +184,10 @@ static void
 net_connection_editor_finalize (GObject *object)
 {
         NetConnectionEditor *editor = NET_CONNECTION_EDITOR (object);
+        GSList *l;
+
+        for (l = editor->pages; l != NULL; l = l->next)
+                g_signal_handlers_disconnect_by_func (l->data, page_changed, editor);
 
         if (editor->permission_id > 0 && editor->client)
                 g_signal_handler_disconnect (editor->client, editor->permission_id);


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