[folks] folks: Don't downgrade persona store trust level.



commit aa1c25a54d928eca02385de20925c8f20421babb
Author: Jeremy Whiting <jpwhiting kde org>
Date:   Mon Jul 16 16:09:55 2012 -0600

    folks: Don't downgrade persona store trust level.

 folks/persona-store.vala |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/folks/persona-store.vala b/folks/persona-store.vala
index 6cea21e..307352e 100644
--- a/folks/persona-store.vala
+++ b/folks/persona-store.vala
@@ -585,6 +585,8 @@ public abstract class Folks.PersonaStore : Object
       replacement = "PersonaStore.is_primary_store")]
   public bool is_writeable { get; set; default = false; }
 
+  private PersonaStoreTrust _trust_level = PersonaStoreTrust.NONE;
+
   /**
    * The trust level of the PersonaStore for linking.
    *
@@ -597,7 +599,23 @@ public abstract class Folks.PersonaStore : Object
    */
   public PersonaStoreTrust trust_level
     {
-      get; set; default = PersonaStoreTrust.NONE;
+      get
+        { 
+          return this._trust_level; 
+        }
+      
+      set 
+        {
+          if (value > trust_level)
+            {
+              this._trust_level = value;
+              this.notify_property ("trust-level");
+            }
+          else
+            {
+              debug ("Unable to lower Persona Store trust_level");
+            }
+        }
     }
 
   /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]