* src/modest-mail-operation.[ch]:
[modest] / src / modest-ui-actions.c
index 36e3a9d..4d168be 100644 (file)
@@ -1839,7 +1839,6 @@ modest_ui_actions_on_save_to_drafts (GtkWidget *widget, ModestMsgEditWindow *edi
        gchar *account_name, *from;
        ModestAccountMgr *account_mgr;
        gchar *info_text = NULL;
-       TnyMsg *new_draft = NULL;
 
        g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW(edit_window));
        
@@ -1876,18 +1875,19 @@ modest_ui_actions_on_save_to_drafts (GtkWidget *widget, ModestMsgEditWindow *edi
        mail_operation = modest_mail_operation_new (MODEST_MAIL_OPERATION_TYPE_INFO, G_OBJECT(edit_window));
        modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_operation);
 
-       new_draft = modest_mail_operation_save_to_drafts (mail_operation,
-                                                         transport_account,
-                                                         data->draft_msg,
-                                                         from,
-                                                         data->to, 
-                                                         data->cc, 
-                                                         data->bcc,
-                                                         data->subject, 
-                                                         data->plain_body, 
-                                                         data->html_body,
-                                                         data->attachments,
-                                                         data->priority_flags);
+       modest_mail_operation_save_to_drafts (mail_operation,
+                                             transport_account,
+                                             data->draft_msg,
+                                             edit_window,
+                                             from,
+                                             data->to, 
+                                             data->cc, 
+                                             data->bcc,
+                                             data->subject, 
+                                             data->plain_body, 
+                                             data->html_body,
+                                             data->attachments,
+                                             data->priority_flags);
        /* Frees */
        g_free (from);
        g_free (account_name);
@@ -1896,10 +1896,6 @@ modest_ui_actions_on_save_to_drafts (GtkWidget *widget, ModestMsgEditWindow *edi
 
        modest_msg_edit_window_free_msg_data (edit_window, data);
 
-       modest_msg_edit_window_set_draft (edit_window, new_draft);
-       if (new_draft != NULL)
-               g_object_unref (new_draft);
-
        info_text = g_strdup_printf (_("mail_va_saved_to_drafts"), _("mcen_me_folder_drafts"));
        modest_platform_information_banner (NULL, NULL, info_text);
        g_free (info_text);