[Xfce4-commits] <postler:master> Pass mockup message body to uint8[] via 'data' on GTK3
Christian Dywan
noreply at xfce.org
Wed Jul 6 00:28:01 CEST 2011
Updating branch refs/heads/master
to 8ad7624692c4afd592d6a79683658a2637b7bd8d (commit)
from 84a6659446094b2d9982a692a5be17850e51a634 (commit)
commit 8ad7624692c4afd592d6a79683658a2637b7bd8d
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Jul 5 22:26:40 2011 +0200
Pass mockup message body to uint8[] via 'data' on GTK3
postler/postler-bureau.vala | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 4762c41..f275023 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -899,8 +899,7 @@ public class Postler.Bureau : Gtk.Window {
ulong now = new Soup.Date.from_now (0).to_time_t ();
string date = GLib.Time.local ((time_t)now).format ("%x %X");
try {
- var message = new Message.from_stream (new GLib.DataInputStream (
- new GLib.MemoryInputStream.from_data ((
+ string body = (
"From: Zeus\nTo: You, Hera <a at a>, Ares <a at a>, Aphrodite <a at a>,"
+ "Artemis <a at a>, Hephaistos <a at a>, Poseidon <a at a>, Dionisos <a at a>,"
+ "Apollo <a at a>, Hermes <a at a>, Athena <a at a>, Demeter <a@@>, "
@@ -911,8 +910,14 @@ public class Postler.Bureau : Gtk.Window {
+ "Message-Id: <1234567890 at localhost>\n\n"
+ "On %s, Jupiter wrote:\n"
+ "> Lorem ipsum dolor sit amet\n"
- + "Δεν υπάρχει κανείς που να αγαπάει τον ίδιο τον πόνο").printf (date),
- -1, null)));
+ + "Δεν υπάρχει κανείς που να αγαπάει τον ίδιο τον πόνο").printf (date);
+#if HAVE_GTK3
+ var message = new Message.from_stream (new GLib.DataInputStream (
+ new GLib.MemoryInputStream.from_data (body.data, null)));
+#else
+ var message = new Message.from_stream (new GLib.DataInputStream (
+ new GLib.MemoryInputStream.from_data (body, -1, null)));
+#endif
viewer.show ();
content.display (message);
}
More information about the Xfce4-commits
mailing list