Blame SOURCES/0003-network-Avoid-warnings-while-closing-connection-edit.patch

ea7a08
From d57be893401c0efb7cec362b2e3f5ea81e2b1f0c Mon Sep 17 00:00:00 2001
ea7a08
From: Rui Matos <tiagomatos@gmail.com>
ea7a08
Date: Mon, 25 Jan 2016 19:10:41 +0100
ea7a08
Subject: [PATCH 3/4] network: Avoid warnings while closing connection editor
ea7a08
ea7a08
It doesn't make sense to try to validate pages because widgets are
ea7a08
changing due to the whole dialog being destroyed and it causes a bunch
ea7a08
of warnings because some resources are cleared on each page dispose
ea7a08
method.
ea7a08
ea7a08
Avoid all that by disconnecting the page "changed" signal handler
ea7a08
before we start destroying widgets.
ea7a08
---
ea7a08
 panels/network/connection-editor/net-connection-editor.c | 6 ++++++
ea7a08
 1 file changed, 6 insertions(+)
ea7a08
ea7a08
diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c
ea7a08
index 9564506..d8a20a0 100644
ea7a08
--- a/panels/network/connection-editor/net-connection-editor.c
ea7a08
+++ b/panels/network/connection-editor/net-connection-editor.c
ea7a08
@@ -50,6 +50,8 @@ static guint signals[LAST_SIGNAL] = { 0 };
ea7a08
 
ea7a08
 G_DEFINE_TYPE (NetConnectionEditor, net_connection_editor, G_TYPE_OBJECT)
ea7a08
 
ea7a08
+static void page_changed (CEPage *page, gpointer user_data);
ea7a08
+
ea7a08
 static void
ea7a08
 selection_changed (GtkTreeSelection *selection, NetConnectionEditor *editor)
ea7a08
 {
ea7a08
@@ -182,6 +184,10 @@ static void
ea7a08
 net_connection_editor_finalize (GObject *object)
ea7a08
 {
ea7a08
         NetConnectionEditor *editor = NET_CONNECTION_EDITOR (object);
ea7a08
+        GSList *l;
ea7a08
+
ea7a08
+        for (l = editor->pages; l != NULL; l = l->next)
ea7a08
+                g_signal_handlers_disconnect_by_func (l->data, page_changed, editor);
ea7a08
 
ea7a08
         if (editor->permission_id > 0 && editor->client)
ea7a08
                 g_signal_handler_disconnect (editor->client, editor->permission_id);
ea7a08
-- 
ea7a08
2.7.4
ea7a08