diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-11 07:05:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-07-11 07:08:52 +0800 |
commit | d24bf99f46989bba098e3f4a19c3d0c7f706bb8a (patch) | |
tree | 474504710196d43b629d01cf48932882b6ef8c4d /shell | |
parent | 1d3590c84655100637ab2d102d560e08a6e75f98 (diff) | |
download | gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.tar gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.tar.gz gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.tar.bz2 gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.tar.lz gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.tar.xz gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.tar.zst gsoc2013-evolution-d24bf99f46989bba098e3f4a19c3d0c7f706bb8a.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.
Diffstat (limited to 'shell')
-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); } |