[Xfce4-commits] <postler:master> Check the message to unset allow_external_images

Christian Dywan noreply at xfce.org
Wed Jun 29 20:02:03 CEST 2011


Updating branch refs/heads/master
         to 90d9a3faa24b20edabbdc892043d672fa6564a1b (commit)
       from 2a058ce85f7bd5e6a830765498e3c4516827df62 (commit)

commit 90d9a3faa24b20edabbdc892043d672fa6564a1b
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Jun 28 22:43:14 2011 +0200

    Check the message to unset allow_external_images

 postler/postler-content.vala |    5 +++--
 postler/postler-viewer.vala  |    6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index f4c1bc7..e511e7d 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -744,7 +744,9 @@ public class Postler.Content : WebKit.WebView {
                 }
             }
 
-            message = thread.nth_data (0);
+            /* Don't change the message if it's the same to avoid notifications */
+            if (message == null || message.id != the_message.id)
+                message = thread.nth_data (0);
             last_location = message.get_path ();
             subject = message.subject;
             string arguments = "?subject=Re: " + subject;
@@ -759,7 +761,6 @@ public class Postler.Content : WebKit.WebView {
                 list_unsubscribe = Postler.Contact.address_from_string (list_unsubscribe);
                 list_unsubscribe = linkify_address (list_unsubscribe, null);
             }
-            notify_property ("message-parts");
 
             /* Emoticons */
             /* foreach (var emoticon in emoticons) { */
diff --git a/postler/postler-viewer.vala b/postler/postler-viewer.vala
index 65fe1c7..90ca738 100644
--- a/postler/postler-viewer.vala
+++ b/postler/postler-viewer.vala
@@ -43,8 +43,8 @@ public class Postler.Viewer : Gtk.VBox {
         attachments.icon_size = 24;
         pack_start (attachments, false, false, 0);
 
-        notify_message_parts (content, null);
-        content.notify["message-parts"].connect (notify_message_parts);
+        notify_message (content, null);
+        content.notify["message"].connect (notify_message);
         content.notify["current-part"].connect (notify_current_part);
         attachments.selection_changed.connect (part_selected);
 
@@ -87,7 +87,7 @@ public class Postler.Viewer : Gtk.VBox {
         content.display (content.message);
     }
 
-    void notify_message_parts (GLib.Object object, GLib.ParamSpec? pspec) {
+    void notify_message (GLib.Object object, GLib.ParamSpec? pspec) {
         infobar.hide ();
         allow_external_images = false;
     }



More information about the Xfce4-commits mailing list