Updating branch refs/heads/master
         to 8ad7624692c4afd592d6a79683658a2637b7bd8d (commit)
       from 84a6659446094b2d9982a692a5be17850e51a634 (commit)

commit 8ad7624692c4afd592d6a79683658a2637b7bd8d
Author: Christian Dywan <[email protected]>
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@a>, Ares <a@a>, Aphrodite 
<a@a>,"
                   + "Artemis <a@a>, Hephaistos <a@a>, Poseidon <a@a>, Dionisos 
<a@a>,"
                   + "Apollo <a@a>, Hermes <a@a>, Athena <a@a>, Demeter <a@@>, "
@@ -911,8 +910,14 @@ public class Postler.Bureau : Gtk.Window {
                   + "Message-Id: <1234567890@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);
                 }
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to