[ekiga] Got rid of the 'active' boolean in the Opal::Account class
- From: Julien Puydt <jpuydt src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga] Got rid of the 'active' boolean in the Opal::Account class
- Date: Tue, 9 Jun 2009 15:07:00 -0400 (EDT)
commit 69f34caf8543c9eb6b046e9c7d6613873ace41f4
Author: Julien Puydt <jpuydt gnome org>
Date: Sun Jun 7 14:15:13 2009 +0200
Got rid of the 'active' boolean in the Opal::Account class
---
lib/engine/components/opal/opal-account.cpp | 13 ++++---------
lib/engine/components/opal/opal-account.h | 1 -
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 72e3646..5b566ba 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -60,7 +60,6 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
: core (_core)
{
dead = false;
- active = false;
int i = 0;
char *pch = strtok ((char *) account.c_str (), "|");
@@ -140,7 +139,6 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
: core (_core)
{
dead = false;
- active = false;
enabled = _enabled;
aid = (const char *) PGloballyUniqueID ().AsString ();
name = _name;
@@ -300,7 +298,7 @@ bool Opal::Account::is_enabled () const
bool Opal::Account::is_active () const
{
- return active;
+ return (state == Registered);
}
@@ -469,19 +467,14 @@ void
Opal::Account::handle_registration_event (RegistrationState state_,
const std::string info)
{
- bool old_active = active;
-
- state = state_;
- active = false;
switch (state) {
case Registered:
- if (!old_active) {
+ if (state != Registered) {
status = _("Registered");
- active = true;
gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
gmref_ptr<Ekiga::PersonalDetails> personal_details = core.get ("personal-details");
if (presence_core && personal_details) {
@@ -521,6 +514,8 @@ Opal::Account::handle_registration_event (RegistrationState state_,
default:
break;
}
+
+ state = state_;
}
void
diff --git a/lib/engine/components/opal/opal-account.h b/lib/engine/components/opal/opal-account.h
index ec120d1..f815cf4 100644
--- a/lib/engine/components/opal/opal-account.h
+++ b/lib/engine/components/opal/opal-account.h
@@ -157,7 +157,6 @@ private:
RegistrationState state;
bool dead;
- bool active;
bool enabled;
unsigned timeout;
std::string aid;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]