[Xfce4-commits] <postler:master> Always update unread count including 0 unread

Christian Dywan noreply at xfce.org
Fri Jan 14 22:48:01 CET 2011


Updating branch refs/heads/master
         to 5fc54e4326ef3f5fdd78734e136548691de52081 (commit)
       from 30eaadd65ffb175c99b9f3b6cba304fa74458012 (commit)

commit 5fc54e4326ef3f5fdd78734e136548691de52081
Author: Sergio Spinatelli <spinatelli.sergio at gmail.com>
Date:   Fri Jan 14 22:43:25 2011 +0100

    Always update unread count including 0 unread
    
    Fixes: https://bugs.launchpad.net/postler/+bug/702506

 postler/postler-folders.vala |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index 738734d..a78e3d8 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -81,12 +81,14 @@ public class Postler.Folders : Gtk.TreeView {
             FileInfo info;
             while ((info = msg_enumerator.next_file (null)) != null)
                 unread++;
-            if (unread == 0)
-                return;
+
             Gtk.TreeIter iter;
-            if (store.get_iter_from_string (out iter, path))
-                store.set (iter,
-                    Columns.NAME, "%s (%d)".printf (label, unread));
+            if (store.get_iter_from_string (out iter, path)) {
+                if (unread == 0)
+                    store.set (iter, Columns.NAME, "%s".printf (label));
+                else
+                    store.set (iter, Columns.NAME, "%s (%d)".printf (label, unread));
+            }
         } catch (GLib.Error error) {
             GLib.critical (_("Failed to monitor folder \"%s\": %s"),
                            msg_dir.get_path (), error.message);



More information about the Xfce4-commits mailing list