[Xfce4-commits] <postler:master> Show a folder 'Notifications' by default
Christian Dywan
noreply at xfce.org
Thu Jul 14 02:02:01 CEST 2011
Updating branch refs/heads/master
to 3a9d4cc427d2be910c1fbfa6f47ea117f825f510 (commit)
from b492131c4958575b1f3c9f749ddcbb36bc585767 (commit)
commit 3a9d4cc427d2be910c1fbfa6f47ea117f825f510
Author: Christian Dywan <christian at twotoasts.de>
Date: Wed Jul 13 20:06:50 2011 +0200
Show a folder 'Notifications' by default
postler/postler-folders.vala | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index 63dbac1..a9dc245 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -27,8 +27,7 @@ public class Postler.Folders : Gtk.Toolbar {
if (info.type == AccountType.SEARCH) {
var button = get_nth_item (0) as Gtk.RadioToolButton;
unowned GLib.SList<Gtk.RadioToolButton>? group = button.get_group ();
- var search = folder_button (group, info.name,
- info.path, FolderType.GENERIC);
+ var search = folder_button (group, info.name, info.path);
insert (search, get_n_items () - 1);
}
});
@@ -56,25 +55,26 @@ public class Postler.Folders : Gtk.Toolbar {
info_iter != null; info_iter = info_iter.next) {
AccountInfo account_info = info_iter.data;
if (account_info.type == AccountType.SEARCH) {
- var search = folder_button (group, account_info.name,
- account_info.path, FolderType.GENERIC);
+ var search = folder_button (group, account_info.name, account_info.path);
insert (search, -1);
group = search.get_group ();
}
}
- var hide_read = folder_button (group, _("Unread Mail"), "search:unread/1", FolderType.GENERIC);
+ var hide_read = folder_button (group, _("_Unread Mail"), "search:unread/1");
insert (hide_read, -1);
+ group = hide_read.get_group ();
+ var notifications = folder_button (group, _("_Notifications"), "search:project/_%");
+ insert (notifications, -1);
}
Gtk.RadioToolButton folder_button (GLib.SList<Gtk.RadioToolButton>? group,
- string label, string uri, FolderType folder_type) {
+ string label, string uri, FolderType folder_type=FolderType.GENERIC) {
var button = new Gtk.RadioToolButton (group);
button.set_data ("uri", uri);
- button.label = label;
- button.is_important = true;
- button.visible = true;
+ button.label_widget = new Gtk.Label.with_mnemonic (label);
+ button.visible = button.is_important = true;
button.clicked.connect (() => {
selected_label = label;
selected_type = folder_type;
More information about the Xfce4-commits
mailing list