From: Alberto Garcia Date: Mon, 14 Jan 2008 20:22:43 +0000 (+0000) Subject: Add a reference to the edit window when calling X-Git-Tag: git_migration_finished~1807 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=3d7bdaa6e61ea2fb22f428c41901216ae4fe99a4;hp=7770448d49c2386708c3132a5fa5c9e92cdb4cae;ds=sidebyside 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 --- 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);