~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/engine/rfc822/rfc822-utils.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-03-14 13:48:23 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130314134823-gyk5av1g508zyj8a
Tags: 0.3.0~pr1-0ubuntu1
New upstream version (FFE lp: #1154316), supports multiple account as
well as full conversation views with inline replies

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
namespace Geary.RFC822.Utils {
8
8
 
 
9
// We use DEL to mark quote levels, since it's unlikely to be in email bodies, is a single byte
 
10
// in UTF-8, and is unmolested by GMime.FilterHTML.
 
11
public const char QUOTE_MARKER = '\x7f';
 
12
 
9
13
public string email_addresses_for_reply(Geary.RFC822.MailboxAddresses? addresses,
10
14
    bool html_format) {
11
15
    
29
33
    if (email.body == null)
30
34
        return "";
31
35
    
32
 
    string quoted = "";
 
36
    string quoted = html_format ? "<br /><br />" : "\n\n";
33
37
    
34
38
    if (email.date != null) {
35
39
        /// The datetime that a message being replied to was received
65
69
    if (email.body == null)
66
70
        return "";
67
71
    
68
 
    string quoted = "";
 
72
    string quoted = html_format ? "<br /><br />" : "\n\n";
69
73
    
70
74
    quoted += _("---------- Forwarded message ----------");
71
75
    quoted += "\n\n";
72
76
    string from_line = email_addresses_for_reply(email.from, html_format);
73
77
    if (!String.is_empty_or_whitespace(from_line))
74
78
        quoted += _("From: %s\n").printf(from_line);
75
 
    // TODO: Doing it this way because string change happened after string freeze and "Subject" is
76
 
    // available but not "Subject: %s"
77
 
    quoted += _("Subject:") + "%s\n".printf(email.subject != null ? email.subject.to_string() : "");
 
79
    quoted += _("Subject: %s\n").printf(email.subject != null ? email.subject.to_string() : "");
78
80
    quoted += _("Date: %s\n").printf(email.date != null ? email.date.to_string() : "");
79
81
    string to_line = email_addresses_for_reply(email.to, html_format);
80
82
    if (!String.is_empty_or_whitespace(to_line))