[empathy] Only request presence when the account is enabled (#593161).
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Only request presence when the account is enabled (#593161).
- Date: Wed, 26 Aug 2009 18:07:00 +0000 (UTC)
commit 45808d25bd1565d811a1cebb6d74af5318c9ec95
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Aug 26 19:57:57 2009 +0200
Only request presence when the account is enabled (#593161).
libempathy/empathy-account.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/libempathy/empathy-account.c b/libempathy/empathy-account.c
index d8e59ea..5527aab 100644
--- a/libempathy/empathy-account.c
+++ b/libempathy/empathy-account.c
@@ -952,17 +952,20 @@ empathy_account_set_enabled_async (EmpathyAccount *account,
return;
}
- acc_manager = empathy_account_manager_dup_singleton ();
- presence = empathy_account_manager_get_requested_global_presence
- (acc_manager, &status, &status_message);
+ if (enabled)
+ {
+ acc_manager = empathy_account_manager_dup_singleton ();
+ presence = empathy_account_manager_get_requested_global_presence
+ (acc_manager, &status, &status_message);
- if (presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
- empathy_account_request_presence (account, presence, status,
- status_message);
+ if (presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
+ empathy_account_request_presence (account, presence, status,
+ status_message);
- g_object_unref (acc_manager);
- g_free (status);
- g_free (status_message);
+ g_object_unref (acc_manager);
+ g_free (status);
+ g_free (status_message);
+ }
g_value_init (&value, G_TYPE_BOOLEAN);
g_value_set_boolean (&value, enabled);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]