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.
This commit is contained in:
parent
2e6149b4b8
commit
d57be89340
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue