telepathy-mission-control: Do not change RequestedPresence when disabling the account

Xavier Claessens xclaesse at kemper.freedesktop.org
Thu Jul 19 05:01:43 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: c133c5b86a67a70594c6327578f4c7956b0112f0
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=c133c5b86a67a70594c6327578f4c7956b0112f0

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Thu Jul 19 11:17:09 2012 +0200

Do not change RequestedPresence when disabling the account

We can keep RequestedPresence to online, in which case the account
will go back online when account gets enabled.

https://bugs.freedesktop.org/show_bug.cgi?id=52259

---

 src/mcd-account.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mcd-account.c b/src/mcd-account.c
index aa04007..eaa5040 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -1185,10 +1185,11 @@ _mcd_account_set_enabled (McdAccount *account,
         GValue value = { 0, };
         const gchar *name = mcd_account_get_unique_name (account);
 
-        if (!enabled)
-            mcd_account_request_presence (account,
-                                          TP_CONNECTION_PRESENCE_TYPE_OFFLINE,
-                                          "offline", NULL);
+        if (!enabled && priv->connection != NULL)
+            _mcd_connection_request_presence (priv->connection,
+                                              TP_CONNECTION_PRESENCE_TYPE_OFFLINE,
+                                              "offline",
+                                              NULL);
 
         priv->enabled = enabled;
 



More information about the telepathy-commits mailing list