[Xfce4-commits] <postler:master> Make folders.selected_location an ordinary property

Christian Dywan noreply at xfce.org
Sun Nov 28 23:26:06 CET 2010


Updating branch refs/heads/master
         to 22607ce7a3b8609cf7e56ccc465180291d99cc19 (commit)
       from 4eed87e476523c28e3cc257e3fba992db4cb262d (commit)

commit 22607ce7a3b8609cf7e56ccc465180291d99cc19
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Nov 28 19:51:11 2010 +0100

    Make folders.selected_location an ordinary property

 postler/postler-folders.vala |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index fc095cf..1a78c2b 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -12,20 +12,9 @@
 public class Postler.Folders : Gtk.TreeView {
     Accounts accounts;
     Gtk.TreeStore store;
-    string last_location;
 
     public Postler.Messages messages { get; set; }
-    public string? selected_location {
-        get {
-            return_val_if_fail (messages != null, null);
-            Gtk.TreeIter iter;
-            if (get_selection ().get_selected (null, out iter)) {
-                store.get (iter, Columns.LOCATION, out last_location);
-                return last_location;
-            }
-            return null;
-        }
-    }
+    public string? selected_location { get; private set; }
     public bool display_notify { get; set; default = false; }
 
     public Postler.AccountInfo? get_selected_account () {
@@ -291,7 +280,7 @@ public class Postler.Folders : Gtk.TreeView {
         AccountInfo account_info;
         store.get (iter, Columns.LOCATION, out location,
                          Columns.INFO, out account_info);
-        notify_property ("selected-location");
+        selected_location = location;
 
         if (location != null) {
             messages.populate (location, account_info);



More information about the Xfce4-commits mailing list