* Removed the password_selected signal
[modest] / src / modest-mail-operation.c
index 849bed6..5ea906b 100644 (file)
@@ -75,10 +75,10 @@ static TnyMimePart *         add_body_part    (TnyMsg *msg,
                                               gboolean has_attachments);
 
 
-static void modest_mail_operation_xfer_folder (ModestMailOperation *self,
-                                              TnyFolder *folder,
-                                              TnyFolderStore *parent,
-                                              gboolean delete_original);
+static void        modest_mail_operation_xfer_folder       (ModestMailOperation *self,
+                                                           TnyFolder *folder,
+                                                           TnyFolderStore *parent,
+                                                           gboolean delete_original);
 
 static gboolean    modest_mail_operation_xfer_msg          (ModestMailOperation *self,
                                                            TnyHeader *header, 
@@ -309,9 +309,10 @@ create_reply_forward_mail (TnyMsg *msg, const gchar *from, gboolean is_reply, gu
        TnyMimePart *body;
        ModestFormatter *formatter;
 
-       /* Get body from original msg */
+       /* Get body from original msg. Always look for the text/plain
+          part of the message to create the reply/forwarded mail */
        header = tny_msg_get_header (msg);
-       body   = modest_tny_msg_actions_find_body_part (msg, TRUE);
+       body   = modest_tny_msg_actions_find_body_part (msg, FALSE);
 
        /* TODO: select the formatter from account prefs */
        formatter = modest_formatter_new ("text/plain");
@@ -394,6 +395,9 @@ modest_mail_operation_create_reply_mail (TnyMsg *msg,
        TnyMsg *new_msg;
        TnyHeader *new_header, *header;
        const gchar* reply_to;
+       gchar *new_cc = NULL;
+       const gchar *cc = NULL, *bcc = NULL;
+       GString *tmp = NULL;
 
        new_msg = create_reply_forward_mail (msg, from, TRUE, reply_type);
 
@@ -407,10 +411,6 @@ modest_mail_operation_create_reply_mail (TnyMsg *msg,
                tny_header_set_to (new_header, tny_header_get_from (header));
 
        switch (reply_mode) {
-               gchar *new_cc = NULL;
-               const gchar *cc = NULL, *bcc = NULL;
-               GString *tmp = NULL;
-
        case MODEST_MAIL_OPERATION_REPLY_MODE_SENDER:
                /* Do not fill neither cc nor bcc */
                break;