Use html to text stream to convert html mime parts to text.
[modest] / src / modest-ui-actions.c
index 13df186..64e6137 100644 (file)
@@ -1001,7 +1001,8 @@ modest_ui_actions_msg_retrieval_check (ModestMailOperation *mail_op,
                              error->code == TNY_SERVICE_ERROR_MESSAGE_NOT_AVAILABLE)) {
                        gchar *subject, *msg, *format = NULL;
                        TnyAccount *account;
-                       subject = tny_header_dup_subject (header);
+                       
+                       subject = header?tny_header_dup_subject (header):NULL;
                        if (!subject)
                                subject = g_strdup (_("mail_va_no_subject"));
 
@@ -5379,7 +5380,7 @@ modest_ui_actions_move_folder_error_handler (ModestMailOperation *mail_op,
 {
        GObject *win = NULL;
        const GError *error;
-       TnyAccount *account;
+       TnyAccount *account = NULL;
 
 #ifndef MODEST_TOOLKIT_HILDON2
        ModestWindow *main_window = NULL;
@@ -5404,7 +5405,11 @@ modest_ui_actions_move_folder_error_handler (ModestMailOperation *mail_op,
 #endif
        win = modest_mail_operation_get_source (mail_op);
        error = modest_mail_operation_get_error (mail_op);
-       account = modest_mail_operation_get_account (mail_op);
+
+       if (TNY_IS_FOLDER (user_data))
+               account = modest_tny_folder_get_account (TNY_FOLDER (user_data));
+       else if (TNY_IS_ACCOUNT (user_data))
+               account = g_object_ref (user_data);
 
        /* If it's not a disk full error then show a generic error */
        if (!modest_tny_account_store_check_disk_full_error (modest_runtime_get_account_store(),
@@ -5817,15 +5822,10 @@ on_move_folder_cb (gboolean canceled,
 
        mail_op =
                modest_mail_operation_new_with_error_handling (G_OBJECT(parent_window),
-                               modest_ui_actions_move_folder_error_handler,
-                               info->src_folder, NULL);
+                                                              modest_ui_actions_move_folder_error_handler,
+                                                              g_object_ref (info->dst_folder), g_object_unref);
        modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
-                       mail_op);
-
-       /* Select *after* the changes */
-       /* TODO: this function hangs UI after transfer */
-       /*                      modest_folder_view_select_folder (MODEST_FOLDER_VIEW(folder_view), */
-       /*                                                        TNY_FOLDER (src_folder), TRUE); */
+                                        mail_op);
 
        if (MODEST_IS_MAIN_WINDOW (parent_window)) {
                modest_folder_view_select_folder (MODEST_FOLDER_VIEW(info->folder_view),