[Xfce4-commits] <postler:master> Set In-Reply-To from reply or mailto string
Christian Dywan
noreply at xfce.org
Mon Mar 21 01:06:01 CET 2011
Updating branch refs/heads/master
to 337d1beb63b6d58ca59f0051a571efcc5c9b545c (commit)
from 9dca89fed573a830bf1ad07d79f53a0a81e0d683 (commit)
commit 337d1beb63b6d58ca59f0051a571efcc5c9b545c
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Mar 21 01:03:01 2011 +0100
Set In-Reply-To from reply or mailto string
Fixes: https://bugs.launchpad.net/postler/+bug/710050
postler/postler-bureau.vala | 4 +++-
postler/postler-composer.vala | 4 ++++
postler/postler-content.vala | 4 ++++
3 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 469fddf..fee04ea 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -129,8 +129,10 @@ public class Postler.Bureau : Gtk.Window {
mailto.append_printf ("%cfrom=%s", delimiter, chosen_from);
delimiter = '&';
mailto.append_printf ("&part=%d", part);
- if (selected != null)
+ if (selected != null) {
mailto.append_printf ("&body=%s", selected);
+ mailto.append_printf ("&in-reply-to=%s", content.message_id);
+ }
Postler.App.spawn_module ("compose", mailto.str,
prefix != null ? content.last_location : null);
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index ed4ebf3..a2c393e 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -230,6 +230,8 @@ public class Postler.Composer : Gtk.Window {
header += "BCC: " + blind_copy + "\n";
if ((actions.get_action ("MarkImportant") as Gtk.ToggleAction).active)
header += "X-Priority: 1\n";
+ if (content.message_id != null)
+ header += "In-Reply-To: " + content.message_id + "\n";
Gtk.TreeIter iter;
if (!(attachments.model.get_iter_first (out iter))) {
@@ -786,6 +788,8 @@ public class Postler.Composer : Gtk.Window {
part = data.to_int ();
return true;
}
+ else if (name == "in-reply-to")
+ content.message_id = data;
else
return false;
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index ea1d8e7..e4a630f 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -89,6 +89,7 @@ public class Postler.Content : WebKit.WebView {
public string default_charset { get; set; default = "ISO-8859-1"; }
public string? last_location { get; set; }
+ public string? message_id { get; set; }
public string? sender { get; set; }
public string? recipient { get; set; }
public string? subject { get; set; }
@@ -667,6 +668,7 @@ public class Postler.Content : WebKit.WebView {
string content_type = null;
string[] parts;
+ message_id = null;
content_encoding = "";
string from = _("Unknown");
date = _("(No date)");
@@ -695,6 +697,8 @@ public class Postler.Content : WebKit.WebView {
content_type = parts[1].strip ();
else if (field == "content-transfer-encoding")
content_encoding = parts[1].strip ();
+ else if (field == "message-id")
+ message_id = parts[1].strip ();
else if (field == "subject")
subject = parse_encoded (parts[1], out charset);
else if (field == "from") {
More information about the Xfce4-commits
mailing list