From 3d7bdaa6e61ea2fb22f428c41901216ae4fe99a4 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 14 Jan 2008 20:22:43 +0000 Subject: [PATCH 1/1] Add a reference to the edit window when calling modest_mail_operation_save_to_drafts() It'll be unref'ed in the callback pmo-trunk-r4037 --- src/modest-ui-actions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 410748c..48bbf65 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -2268,10 +2268,10 @@ on_save_to_drafts_cb (ModestMailOperation *mail_op, if (modest_mail_operation_get_error (mail_op) != NULL) { g_warning ("%s failed: %s\n", __FUNCTION__, (modest_mail_operation_get_error (mail_op))->message); modest_platform_information_banner (NULL, NULL, _("mail_ib_file_operation_failed")); - return; + } else { + modest_msg_edit_window_set_draft (edit_window, saved_draft); } - - modest_msg_edit_window_set_draft (edit_window, saved_draft); + g_object_unref(edit_window); } void @@ -2335,7 +2335,7 @@ modest_ui_actions_on_save_to_drafts (GtkWidget *widget, ModestMsgEditWindow *edi data->images, data->priority_flags, on_save_to_drafts_cb, - edit_window); + g_object_ref(edit_window)); info_text = g_strdup_printf (_("mail_va_saved_to_drafts"), _("mcen_me_folder_drafts")); modest_platform_information_banner (NULL, NULL, info_text); -- 1.7.9.5