Updating branch refs/heads/master
         to a0c342ee7c4cae2019b1938134a36dc4048ff27e (commit)
       from c6677193d55a1a204a55f2d60c24c48f48a9bcbd (commit)

commit a0c342ee7c4cae2019b1938134a36dc4048ff27e
Author: Christian Dywan <[email protected]>
Date:   Wed Jul 6 01:22:50 2011 +0200

    Declare memory_input_stream_from_data to avoid VAPI changes

 postler/postler-bureau.vala |    7 +------
 postler/postler.vapi        |    3 +++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 3346223..d48e805 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -912,13 +912,8 @@ public class Postler.Bureau : Gtk.Window {
                   + "On %s, Jupiter wrote:\n"
                   + "> Lorem ipsum dolor sit amet\n"
                   + "Δεν υπάρχει κανείς που να αγαπάει τον ίδιο τον 
πόνο").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
+                        memory_input_stream_from_data (body.data, null)));
                     viewer.show ();
                     content.display (message);
                 }
diff --git a/postler/postler.vapi b/postler/postler.vapi
index 76ab784..8ea5eff 100644
--- a/postler/postler.vapi
+++ b/postler/postler.vapi
@@ -16,6 +16,9 @@ namespace GLib {
     [CCode (cname = "g_base64_encode", cheader_filename = "glib.h")]
         public static string base64_encode (string data, size_t length);
     }
+    [CCode (cname = "g_memory_input_stream_new_from_data", cheader_filename = 
"gio/gio.h")]
+    public static GLib.MemoryInputStream memory_input_stream_from_data (
+        [CCode (array_length_type = "gsize")] owned uint8[] data, 
GLib.DestroyNotify? destroy);
 
 [CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_")]
 namespace Gdk {
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to