[Xfce4-commits] <postler:master> Update message part pane at creation of the viewer

Christian Dywan noreply at xfce.org
Tue Jul 13 00:54:10 CEST 2010


Updating branch refs/heads/master
         to 54ef84ce313e15a46457d0f47c533cc33a2e1a3e (commit)
       from 97e925c2c0be97ab5f4b38dc1f6c60b309e90852 (commit)

commit 54ef84ce313e15a46457d0f47c533cc33a2e1a3e
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Jul 5 22:13:48 2010 +0200

    Update message part pane at creation of the viewer

 postler/postler-viewer.vala |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/postler/postler-viewer.vala b/postler/postler-viewer.vala
index 28e0467..bb56a74 100644
--- a/postler/postler-viewer.vala
+++ b/postler/postler-viewer.vala
@@ -39,10 +39,11 @@ public class Postler.Viewer : Gtk.VBox {
         var scrolled = new Postler.ScrolledWindow (content);
         content_box.pack_start (scrolled, true, true, 0);
         message_parts = new Gtk.VBox (false, 0);
-        content.notify["n-parts"].connect (notify_n_parts);
         scrolled = new Postler.ScrolledWindow (message_parts);
         content_box.pack_start (scrolled, false, false, 0);
         message_parts.parent.parent.set_no_show_all (true);
+        notify_n_parts (content, null);
+        content.notify["n-parts"].connect (notify_n_parts);
     }
 
     void resource_request (WebKit.WebFrame frame, WebKit.WebResource resouce,
@@ -78,12 +79,12 @@ public class Postler.Viewer : Gtk.VBox {
         return "application-x-executable";
     }
 
-    void notify_n_parts (GLib.Object object, GLib.ParamSpec pspec) {
+    void notify_n_parts (GLib.Object object, GLib.ParamSpec? pspec) {
         infobar.hide ();
         allow_external_images = false;
 
         var scrollable = message_parts.parent.parent;
-        if (content.n_parts == 1) {
+        if (content.n_parts < 2) {
             scrollable.hide ();
             return;
         }



More information about the Xfce4-commits mailing list