~tkluck/postler/contact-parsing

« back to all changes in this revision

Viewing changes to postler/postler-content.vala

  • Committer: Timo Kluck
  • Date: 2011-07-07 10:31:42 UTC
  • mfrom: (881.1.82)
  • Revision ID: tkluck@infty.nl-20110707103142-4s99dckw0grl1aat
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
775
775
                    reply_chunk.append (render_plain_text (text_part.body.str, child.project));
776
776
                else
777
777
                    reply_chunk.append (child.parts.nth_data (0).body.str);
778
 
                string sender_name = Contact.name_from_string (child.sender);
779
 
                if (sender_name != _("You")) {
780
 
                    reply_chunk.append_printf ("""
781
 
                        <span class="contact">%s</span>
782
 
                    """.printf (
783
 
                    linkify_icon (STOCK_CONTACT_NEW, _("Add contact"), "contact:%s:%s".printf (
784
 
                        sender_name, html_escape (Contact.address_from_string (child.sender))))));
 
778
 
 
779
                string? sender_name = null;
 
780
                if (child.can_reply_personally) {
 
781
                    sender_name = Contact.name_from_string (child.sender);
 
782
                    if (sender_name != _("You")) {
 
783
                        reply_chunk.append_printf ("""
 
784
                            <span class="contact">%s</span>
 
785
                        """.printf (
 
786
                        linkify_icon (STOCK_CONTACT_NEW, _("Add contact"), "contact:%s:%s".printf (
 
787
                            sender_name, html_escape (Contact.address_from_string (child.sender))))));
 
788
                    }
 
789
 
 
790
                    reply_chunk.append ("""
 
791
                        <div class="actions">
 
792
                        <a href="mailto:%s" class="button">%s</a>
 
793
                        <a href="mailto:%s" class="button">%s</a></div>
 
794
                        """.printf (
 
795
                        html_escape (reply_uri (child, "Re: ")), _("Reply"),
 
796
                        html_escape (reply_uri (child, "Fw: ")), _("Forward")));
785
797
                }
786
 
                reply_chunk.append ("""
787
 
                    <div class="actions">
788
 
                    <a href="mailto:%s" class="button">%s</a>
789
 
                    <a href="mailto:%s" class="button">%s</a></div>
790
 
                    """.printf (
791
 
                    html_escape (reply_uri (child, "Re: ")), _("Reply"),
792
 
                    html_escape (reply_uri (child, "Fw: ")), _("Forward")));
793
798
 
794
799
                string reply_markup = reply_chunk.str;
795
800
                /* The extra class importantMessage is Postler-specific */