diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-11 07:05:41 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:36 +0800 |
commit | 1c940e2c355c72aeae648b26035a79e4a82e3379 (patch) | |
tree | ea16de3c77b0d707c65fdc5537f370431321e6e6 | |
parent | 85f6af840199053d1db693ed0adfa595e9cec00c (diff) | |
download | gsoc2013-evolution-1c940e2c355c72aeae648b26035a79e4a82e3379.tar.gz gsoc2013-evolution-1c940e2c355c72aeae648b26035a79e4a82e3379.tar.zst gsoc2013-evolution-1c940e2c355c72aeae648b26035a79e4a82e3379.zip |
Bug 652634 - Runtime warning on second search dialog
A signal handler connected to an EFilterRule was passing a GtkDialog
instance as the closure. Eventually, the GtkDialog is destroyed but
we never disconnected the signal handler.
-rw-r--r-- | shell/e-shell-content.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c index 886816330f..a109ffb4a7 100644 --- a/shell/e-shell-content.c +++ b/shell/e-shell-content.c @@ -641,6 +641,7 @@ e_shell_content_run_advanced_search_dialog (EShellContent *shell_content) EFilterRule *rule; ERuleContext *context; const gchar *user_filename; + gulong handler_id; gint response; EAlert *alert = NULL; @@ -675,7 +676,7 @@ e_shell_content_run_advanced_search_dialog (EShellContent *shell_content) content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); - g_signal_connect_swapped ( + handler_id = g_signal_connect_swapped ( rule, "changed", G_CALLBACK ( shell_content_dialog_rule_changed), dialog); @@ -704,6 +705,8 @@ run: } exit: + g_signal_handler_disconnect (rule, handler_id); + g_object_unref (rule); gtk_widget_destroy (dialog); } @@ -744,6 +747,7 @@ e_shell_content_run_save_search_dialog (EShellContent *shell_content) ERuleContext *context; const gchar *user_filename; gchar *search_name; + gulong handler_id; gint response; EAlert *alert = NULL; @@ -778,7 +782,7 @@ e_shell_content_run_save_search_dialog (EShellContent *shell_content) content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); - g_signal_connect_swapped ( + handler_id = g_signal_connect_swapped ( rule, "changed", G_CALLBACK ( shell_content_dialog_rule_changed), dialog); @@ -804,6 +808,8 @@ run: e_rule_context_save (context, user_filename); exit: + g_signal_handler_disconnect (rule, handler_id); + g_object_unref (rule); gtk_widget_destroy (dialog); } |