* Fixes NB#87102, merged patch from trunk r5213 and r5214
authorSergio Villar Senin <svillar@igalia.com>
Mon, 6 Oct 2008 17:15:29 +0000 (17:15 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 6 Oct 2008 17:15:29 +0000 (17:15 +0000)
pmo-diablo-r5922

src/modest-text-utils.c
src/modest-ui-actions.c

index ba1ac54..ff21586 100644 (file)
@@ -870,10 +870,6 @@ modest_text_utils_quote_plain_text (const gchar *text,
        gchar *attachments_string = NULL;
 
        q = g_string_new ("\n");
-       if (signature != NULL) {
-               q = g_string_append (q, signature);
-               q = g_string_append_c (q, '\n');
-       }
        q = g_string_append (q, cite);
        q = g_string_append_c (q, '\n');
 
@@ -924,6 +920,12 @@ modest_text_utils_quote_plain_text (const gchar *text,
        q = g_string_append (q, attachments_string);
        g_free (attachments_string);
 
+       if (signature != NULL) {
+               q = g_string_append (q, "\n--\n");
+               q = g_string_append (q, signature);
+               q = g_string_append_c (q, '\n');
+       }
+
        return g_string_free (q, FALSE);
 }
 
@@ -940,8 +942,8 @@ modest_text_utils_quote_html (const gchar *text,
                "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" \
                "<html>\n" \
                "<body>\n" \
-               "<br/>%s<br/>" \
                "<pre>%s<br/>%s<br/>%s</pre>\n" \
+               "<br/>--<br/>%s<br/>\n" \
                "</body>\n" \
                "</html>\n";
        gchar *attachments_string = NULL;
@@ -958,7 +960,7 @@ modest_text_utils_quote_html (const gchar *text,
        q_attachments_string = modest_text_utils_convert_to_html_body (attachments_string, -1, TRUE);
        q_cite = modest_text_utils_convert_to_html_body (cite, -1, TRUE);
        html_text = modest_text_utils_convert_to_html_body (text, -1, TRUE);
-       result = g_strdup_printf (format, signature_result, q_cite, html_text, q_attachments_string);
+       result = g_strdup_printf (format, q_cite, html_text, q_attachments_string, signature_result);
        g_free (q_cite);
        g_free (html_text);
        g_free (attachments_string);
index cfcccdb..b4ee5af 100644 (file)
@@ -737,9 +737,9 @@ modest_ui_actions_compose_msg(ModestWindow *win,
 
        signature = modest_account_mgr_get_signature (mgr, account_name, &use_signature);
        if (body_str != NULL) {
-               body = use_signature ? g_strconcat(body_str, "\n", signature, NULL) : g_strdup(body_str);
+               body = use_signature ? g_strconcat(body_str, "\n--\n", signature, NULL) : g_strdup(body_str);
        } else {
-               body = use_signature ? g_strconcat("\n", signature, NULL) : g_strdup("");
+               body = use_signature ? g_strconcat("\n--\n", signature, NULL) : g_strdup("");
        }
 
        msg = modest_tny_msg_new (to_str, from_str, cc_str, bcc_str, subject_str, body, NULL, NULL);
@@ -3276,7 +3276,7 @@ on_rename_folder_performer (gboolean canceled,
 
                /* Clear the headers view */
                sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_view));
-               gtk_tree_selection_unselect_all (sel);
+               gtk_tree_selection_unselect_all (sel);
 
                /* Actually rename the folder */
                modest_mail_operation_rename_folder (mail_op,