[Xfce4-commits] <postler:master> Select new search folder after saving a search

Christian Dywan noreply at xfce.org
Sun Jul 10 06:42:03 CEST 2011


Updating branch refs/heads/master
         to b529abf0696a6d66719cfcd2bf572eb423965542 (commit)
       from 09837b69bff846f7691c8731be3a630d13b78525 (commit)

commit b529abf0696a6d66719cfcd2bf572eb423965542
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jul 10 04:01:43 2011 +0200

    Select new search folder after saving a search

 postler/postler-bureau.vala  |    2 ++
 postler/postler-folders.vala |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 8af37c2..75442cb 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -213,6 +213,8 @@ public class Postler.Bureau : Gtk.Window {
         account_info.type = AccountType.SEARCH;
         account_info.path = get_search_uri ();
         accounts.add_info (account_info);
+        search.set_text ("");
+        folders.select_folder (account_info.path);
     }
 
     void action_view (Gtk.Action action) {
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index a8db679..63dbac1 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -87,6 +87,8 @@ public class Postler.Folders : Gtk.Toolbar {
     public void select_folder (string folder) {
         foreach (var child in get_children ()) {
             var button = child as Gtk.RadioToolButton;
+            if (button == null)
+                continue;
             if (button.label == folder
              || button.get_data<string> ("uri") == folder) {
                 if (!button.active)



More information about the Xfce4-commits mailing list