[ekiga] Fix uninitialised variable
- From: Eugen Dedu <ededu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Fix uninitialised variable
- Date: Fri, 2 Sep 2011 22:36:05 +0000 (UTC)
commit 7855da0b5cea7d6be18ac5fa609a7e05ab20f680
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date: Fri Sep 2 13:40:31 2011 +0200
Fix uninitialised variable
Ekiga crashed when started on Windows with gdb.
lib/engine/components/opal/opal-account.cpp | 11 ++++++++---
lib/engine/components/opal/opal-account.h | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index e35259f..30c303c 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -65,6 +65,7 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
{
dead = false;
state = Unregistered;
+ status = _("Unregistered");
message_waiting_number = 0;
int i = 0;
@@ -214,9 +215,9 @@ Opal::Account::get_status () const
* "registered (with 2 voice mail messages)"
*/
str = g_strdup_printf (ngettext ("%s (with %d voice mail message)",
- "%s (with %d voice mail messages)",
- message_waiting_number),
- status.c_str (), message_waiting_number);
+ "%s (with %d voice mail messages)",
+ message_waiting_number),
+ status.c_str (), message_waiting_number);
result = str;
g_free (str);
} else {
@@ -546,6 +547,8 @@ Opal::Account::handle_registration_event (RegistrationState state_,
if (state != Registered) {
+ // Translators: this is a state, not an action, i.e. it should be read as
+ // "(you are) registered", and not as "(you have been) registered"
status = _("Registered");
boost::shared_ptr<Ekiga::PresenceCore> presence_core = core.get<Ekiga::PresenceCore> ("presence-core");
boost::shared_ptr<Ekiga::PersonalDetails> personal_details = core.get<Ekiga::PersonalDetails> ("personal-details");
@@ -558,6 +561,8 @@ Opal::Account::handle_registration_event (RegistrationState state_,
case Unregistered:
+ // Translators: this is a state, not an action, i.e. it should be read as
+ // "(you are) unregistered", and not as "(you have been) unregistered"
status = _("Unregistered");
updated ();
/* delay destruction of this account until the
diff --git a/lib/engine/components/opal/opal-account.h b/lib/engine/components/opal/opal-account.h
index 7725e7f..4102db4 100644
--- a/lib/engine/components/opal/opal-account.h
+++ b/lib/engine/components/opal/opal-account.h
@@ -183,7 +183,7 @@ private:
unsigned timeout;
std::string aid;
std::string name;
- mutable std::string status;
+ mutable std::string status; // the state, as a string
int message_waiting_number;
std::string protocol_name;
std::string host;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]