[folks] e-d-s: Make sure consecutive property changes work



commit 00c12b1dab0b830c524ecc73ddb46de84816bfcc
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Sep 9 14:52:17 2011 +0200

    e-d-s: Make sure consecutive property changes work
    
    Don't send any notification due to property changes until we've
    done updating an entire persona, otherwise code that listens to
    such notifies will see the persona in an intermediate state, whic
    can cause problems. For instance, if such a callback tries to
    change a property it might not recieve change notification for it.

 backends/eds/lib/edsf-persona.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
index cd89ac3..d53d6dd 100644
--- a/backends/eds/lib/edsf-persona.vala
+++ b/backends/eds/lib/edsf-persona.vala
@@ -756,6 +756,8 @@ public class Edsf.Persona : Folks.Persona,
     {
       this.contact = contact;
 
+      this.freeze_notify ();
+
       this._update_names ();
       this._update_avatar ();
       this._update_urls ();
@@ -770,6 +772,8 @@ public class Edsf.Persona : Folks.Persona,
       this._update_gender ();
       this._update_birthday ();
       this._update_roles ();
+
+      this.thaw_notify ();
     }
 
   private void _update_params (AbstractFieldDetails details,



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