[Xfce4-commits] <postler:master> Expose Content.message for use with Reply To (All)
Christian Dywan
noreply at xfce.org
Thu Jun 23 21:00:03 CEST 2011
Updating branch refs/heads/master
to 3450675b11e6d89ac5537ee17aa7787a2ff574f4 (commit)
from 7eff2eee4a705c25b271b1abeaf6ee97af73a794 (commit)
commit 3450675b11e6d89ac5537ee17aa7787a2ff574f4
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Jun 17 22:28:56 2011 +0200
Expose Content.message for use with Reply To (All)
postler/postler-bureau.vala | 14 +++++++-------
postler/postler-content.vala | 5 +----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 922ec21..ac86713 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -145,7 +145,7 @@ public class Postler.Bureau : Gtk.Window {
}
unowned string? list_or_sender (string reply_to) {
- if (content.list_post == "")
+ if (content.list_post == null)
return reply_to;
Gtk.MessageDialog dialog;
@@ -180,15 +180,15 @@ public class Postler.Bureau : Gtk.Window {
}
void action_message_reply () {
- unowned string? reply = list_or_sender (content.reply_to);
+ unowned string? reply = list_or_sender (content.message.reply_to
+ ?? content.message.sender);
if (reply != null)
compose_message ("Re: ", reply, content.current_part_index);
}
void action_message_reply_all () {
- unowned string? reply = content.reply_to_all;
- if (reply != null)
- compose_message ("Re: ", reply, content.current_part_index);
+ string reply = content.message.recipients + "," + content.message.sender;
+ compose_message ("Re: ", reply, content.current_part_index);
}
void action_message_forward () {
@@ -917,12 +917,12 @@ public class Postler.Bureau : Gtk.Window {
bool state = messages.selected_message != null;
actions.get_action ("MessageReply").sensitive = state;
actions.get_action ("MessageForward").sensitive = state;
- state = content.reply_to_all != null;
+ state = content.message.recipients.chr (-1, ',') != null;
actions.get_action ("MessageReplyAll").sensitive = state;
});
content.notify["reply-to-all"].connect ((object, pspec) => {
Postler.Content content = object as Postler.Content;
- bool state = content.reply_to_all != null;
+ bool state = content.message.recipients.chr (-1, ',') != null;
actions.get_action ("MessageReplyAll").sensitive = state;
});
content.notify["last-location"].connect ((object, pspec) => {
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index d2d8e8d..f6a89b9 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -77,7 +77,7 @@ struct Postler.EmoticonMapping {
public class Postler.Content : WebKit.WebView {
AccountInfo? selected_account;
- Message message;
+ public Message message { get; private set; }
string charset;
string content_encoding;
string carbon_copy;
@@ -91,7 +91,6 @@ public class Postler.Content : WebKit.WebView {
public string? sender { get; set; }
public string? subject { get; set; }
public string? reply_to { get; set; }
- public string? reply_to_all { get; set; }
public string? list_post { get; set; }
public string? list_unsubscribe { get; set; }
@@ -347,7 +346,6 @@ public class Postler.Content : WebKit.WebView {
public virtual signal void clear () {
last_location = null;
reply_to = null;
- reply_to_all = null;
message_parts = null;
notify_property ("message-parts");
load_string ("<style text=\"text/css\">%s</style><body></body>"
@@ -728,7 +726,6 @@ public class Postler.Content : WebKit.WebView {
reply = message.reply_to;
if (reply != null)
reply = linkify_address (reply, arguments);
- reply_to_all = message.recipients;
list_post = message.get_field ("list-post");
if (list_post != null)
list_post = Postler.Contact.address_from_string (list_post);
More information about the Xfce4-commits
mailing list