[ekiga] Accounts: Trigger updated signal a bit earlier.



commit e2d0014d5dc164f16a5a37c61689d49d0ed2daf6
Author: Damien Sandras <dsandras beip be>
Date:   Sun Mar 25 14:25:07 2012 +0200

    Accounts: Trigger updated signal a bit earlier.
    
    This prevents the "Processing" status to be published after the account
    real status publication in case it is done faster in another thread.

 lib/engine/components/opal/opal-account.cpp |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 1c8f184..3a89fc0 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -303,6 +303,10 @@ void Opal::Account::enable ()
 
   status = _("Processing...");
   endpoint->subscribe (*this, presentity);
+
+  updated ();
+  trigger_saving ();
+
   if (presentity) {
 
     // FIXME : the following actions should probably be done by opal itself,
@@ -313,9 +317,6 @@ void Opal::Account::enable ()
     }
     presentity->SetLocalPresence (personal_state, presence_status);
   }
-
-  updated ();
-  trigger_saving ();
 }
 
 
@@ -327,6 +328,9 @@ void Opal::Account::disable ()
   // "(you are) unregistered", and not as "(you have been) unregistered"
   status = _("Unregistered");
 
+  updated ();
+  trigger_saving ();
+
   // the above change is needed because if we are already not
   // registered (because a registration failed, for example), then the
   // next action won't change the status.
@@ -343,9 +347,6 @@ void Opal::Account::disable ()
       Ekiga::Runtime::run_in_main (boost::bind (&Opal::Account::presence_status_in_main, this, (*iter), "unknown", ""));
     }
   }
-
-  updated ();
-  trigger_saving ();
 }
 
 



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