[Xfce4-commits] <postler:master> Connect search sensitivity to messages.selected_location

Christian Dywan noreply at xfce.org
Fri Nov 12 01:46:01 CET 2010


Updating branch refs/heads/master
         to bca772cae66bfba5e4aaf6ceaece65286c3921f0 (commit)
       from 849d0aeedf99909ab9746001719d1bfbd3659229 (commit)

commit bca772cae66bfba5e4aaf6ceaece65286c3921f0
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Nov 12 01:13:02 2010 +0100

    Connect search sensitivity to messages.selected_location
    
    Adding an explicit notify_property is needed because it is a
    get-only property.
    
    Fixes: https://bugs.launchpad.net/postler/+bug/671555

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

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 29aa660..776f191 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -468,6 +468,10 @@ public class Postler.Bureau : Gtk.Window {
         var hpaned = new Gtk.HPaned ();
         folders = new Postler.Folders (accounts);
         folders.set_size_request (100, 100);
+        search.sensitive = false;
+        folders.notify["selected-location"].connect ((object, pspec) => {
+            search.sensitive = folders.selected_location != null;
+        });
         var scrolled = new Postler.ScrolledWindow (folders);
         hpaned.pack1 (scrolled, false, false); /* don't expand, don't shrink */
         shelf.pack_start (hpaned, true, true, 0);
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index 4d565a4..be182d6 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -262,6 +262,8 @@ public class Postler.Folders : Gtk.TreeView {
         requires (messages != null) {
         string location;
         store.get (iter, Columns.LOCATION, out location);
+        notify_property ("selected-location");
+
         if (location != null) {
             messages.populate (location);
             messages.grab_focus ();



More information about the Xfce4-commits mailing list