X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-tny-msg.c;h=295af0a72f005077fe6aac6d1de8f85506c5f416;hb=14a46f61ed269fe8155b0c21f532bde4d9db06f3;hp=c60af10983d77d61bddc8611383b0af2c144e5c9;hpb=a3723a70b8bd39365a9276a15a24051c341654c2;p=modest diff --git a/src/modest-tny-msg.c b/src/modest-tny-msg.c index c60af10..295af0a 100644 --- a/src/modest-tny-msg.c +++ b/src/modest-tny-msg.c @@ -664,7 +664,6 @@ create_reply_forward_mail (TnyMsg *msg, TnyHeader *header, const gchar *from, TnyMimePart *body = NULL; TnyMimePart *html_body = NULL; ModestFormatter *formatter; - gchar *subject_prefix; gboolean no_text_part; gchar *parent_uid; gboolean forward_as_attach = FALSE; @@ -718,16 +717,10 @@ create_reply_forward_mail (TnyMsg *msg, TnyHeader *header, const gchar *from, tny_header_set_replyto (new_header, from); /* Change the subject */ - if (is_reply) - subject_prefix = g_strconcat (_("mail_va_re"), ":", NULL); - else - subject_prefix = g_strconcat (_("mail_va_fw"), ":", NULL); old_subject = tny_header_dup_subject (header); new_subject = - (gchar *) modest_text_utils_derived_subject (old_subject, - subject_prefix); + (gchar *) modest_text_utils_derived_subject (old_subject, is_reply); g_free (old_subject); - g_free (subject_prefix); tny_header_set_subject (new_header, (const gchar *) new_subject); g_free (new_subject); @@ -1330,52 +1323,19 @@ modest_tny_msg_header_get_all_recipients_list (TnyHeader *header) { GSList *recipients = NULL; gchar *from = NULL, *to = NULL, *cc = NULL, *bcc = NULL; - gchar *after_remove; - GString *buffer; - gboolean add_separator = TRUE; + gchar *after_remove, *joined; if (header == NULL) return NULL; - buffer = g_string_new (""); - from = tny_header_dup_from (header); to = tny_header_dup_to (header); cc = tny_header_dup_cc (header); bcc = tny_header_dup_bcc (header); - recipients = NULL; - if (from) { - buffer = g_string_append (buffer, from); - add_separator = TRUE; - } - if (to) { - if (add_separator) - buffer = g_string_append (buffer, "; "); - else - add_separator = TRUE; - - buffer = g_string_append (buffer, to); - } - if (cc) { - if (add_separator) - buffer = g_string_append (buffer, "; "); - else - add_separator = TRUE; - - buffer = g_string_append (buffer, cc); - } - if (bcc) { - if (add_separator) - buffer = g_string_append (buffer, "; "); - else - add_separator = TRUE; - - buffer = g_string_append (buffer, bcc); - } - - after_remove = modest_text_utils_remove_duplicate_addresses (buffer->str); - g_string_free (buffer, TRUE); + joined = modest_text_utils_join_addresses (from, to, cc, bcc); + after_remove = modest_text_utils_remove_duplicate_addresses (joined); + g_free (joined); recipients = modest_text_utils_split_addresses_list (after_remove); g_free (after_remove);