[Xfce4-commits] <postler:master> Replace Hide Read with a built-in Unread search

Christian Dywan noreply at xfce.org
Sun Jul 3 14:02:02 CEST 2011


Updating branch refs/heads/master
         to 546cc802ee557945c49e935d32805284c718151f (commit)
       from 26cd67606fff07f88dc18aae4644e20ef989b512 (commit)

commit 546cc802ee557945c49e935d32805284c718151f
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jul 3 01:09:14 2011 +0200

    Replace Hide Read with a built-in Unread search

 postler/postler-bureau.vala   |   13 -------------
 postler/postler-folders.vala  |    3 +++
 postler/postler-messages.vala |    5 -----
 3 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 9d96ade..aac9de7 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -56,7 +56,6 @@ public class Postler.Bureau : Gtk.Window {
                     <menuitem action="MessagePreviousUnread"/>
                 </menu>
                 <menu action="View">
-                    <menuitem action="HideRead"/>
                     <menuitem action="ZoomIn"/>
                     <menuitem action="ZoomOut"/>
                     <menuitem action="ZoomNormal"/>
@@ -82,7 +81,6 @@ public class Postler.Bureau : Gtk.Window {
                 <separator expand="true"/>
             </toolbar>
             <popup name="view">
-                <menuitem action="HideRead"/>
                 <separator/>
                 <menuitem action="Fullscreen"/>
                 <menuitem action="AccountNew"/>
@@ -347,10 +345,6 @@ public class Postler.Bureau : Gtk.Window {
             null);
     }
 
-    void action_hide_read () {
-        messages.hide_read = !messages.hide_read;
-    }
-
     /* TODO: Send outstanding outgoing mail */
     const Gtk.ActionEntry[] action_entries = {
         { "Mail", null, N_("_Mail") },
@@ -409,12 +403,6 @@ public class Postler.Bureau : Gtk.Window {
           N_("Show information about the program"), action_about }
     };
 
-    const Gtk.ToggleActionEntry[] toggle_entries = {
-        { "HideRead", null, N_("_Hide Read"), "<Ctrl>h",
-          N_("Hide read messages"), action_hide_read,
-          false }
-    };
-
     const Gtk.RadioActionEntry[] radio_entries = {
         { "SearchSubject", null, N_("_Subject"), "",
           N_("Search messages by subject"), 0 },
@@ -573,7 +561,6 @@ public class Postler.Bureau : Gtk.Window {
         actions = new Gtk.ActionGroup ("Bureau");
         actions.set_translation_domain (Config.GETTEXT_PACKAGE);
         actions.add_actions (action_entries, this);
-        actions.add_toggle_actions  (toggle_entries, this);
         actions.add_radio_actions  (radio_entries, 0, action_search_options);
         ui.insert_action_group (actions, 0);
         try {
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index f0b7a11..9c1b1bf 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -49,6 +49,9 @@ public class Postler.Folders : Gtk.Toolbar {
                 group = search.get_group ();
             }
         }
+
+        var hide_read = folder_button (group, _("Unread"), "search:unread/1", FolderType.GENERIC);
+        insert (hide_read, -1);
     }
 
     Gtk.RadioToolButton folder_button (GLib.SList<Gtk.RadioToolButton>? group,
diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index 512cfdb..9d06ffd 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -16,7 +16,6 @@ public class Postler.Messages : Gtk.TreeView {
     Postler.Client? client = null;
 
     public Postler.Content content { get; set; }
-    public bool hide_read { get; set; }
 
     public FolderType selected_folder_type { get; private set; }
     public string? location { get; private set; }
@@ -276,10 +275,6 @@ public class Postler.Messages : Gtk.TreeView {
         Gtk.BindingEntry.add_signal (binding_set,
             Gdk.keyval_from_name ("Delete"), 0, "delete", 0);
         content_display_window.connect (content_new_window);
-
-        notify["hide-read"].connect (() => {
-            populate ("search:unread/1", FolderType.GENERIC);
-        });
     }
 
     [Signal (action=true)]



More information about the Xfce4-commits mailing list