[Xfce4-commits] <postler:master> Add a menu item to hide particular folders
Christian Dywan
noreply at xfce.org
Sat Jun 19 06:50:02 CEST 2010
Updating branch refs/heads/master
to fbdbf66fbbf8fd19f5b3a43022c1cf855e2d0a6e (commit)
from bdb27cb78c84d0b643f509a08f2580b225b35788 (commit)
commit fbdbf66fbbf8fd19f5b3a43022c1cf855e2d0a6e
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Jun 17 21:01:26 2010 +0200
Add a menu item to hide particular folders
postler/postler-folders.vala | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index 960b649..a9feaf2 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -267,6 +267,26 @@ public class Postler.Folders : Gtk.TreeView {
menu.append (menuitem);
menu.append (new Gtk.SeparatorMenuItem ());
+ menuitem = new Gtk.MenuItem.with_mnemonic (_("_Hide Folder"));
+ menuitem.activate.connect ((menuitem) => {
+ Gtk.TreeIter iter;
+ if (get_selection ().get_selected (null, out iter)) {
+ string name;
+ AccountInfo? account_info;
+ store.get (iter,
+ Columns.NAME, out name,
+ Columns.INFO, out account_info,
+ -1);
+ if (account_info != null) {
+ account_info.hide += "," + name;
+ var account_infos = new GLib.List<AccountInfo> ();
+ account_infos.prepend (account_info);
+ populate_accounts (account_infos);
+ /* FIXME: Update accounts */
+ }
+ }
+ });
+ menu.append (menuitem);
menuitem = new Gtk.MenuItem.with_mnemonic (_("_Empty Folder"));
menuitem.activate.connect ((menuitem) => {
Gtk.TreeIter iter;
More information about the Xfce4-commits
mailing list