diff options
-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); } |