[telepathy-mission-control/master] mcd_account_request_presence_int: allow setting RequestedPresence on disabled accounts

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jun 25 05:56:35 PDT 2009


This won't do anything immediately, but is necessary for RequestedPresence
to work when creating accounts with properties.
---
 src/mcd-account.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mcd-account.c b/src/mcd-account.c
index d7312fb..633abc6 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -626,9 +626,6 @@ mcd_account_request_presence_int (McdAccount *account,
     McdAccountPrivate *priv = account->priv;
     gboolean changed = FALSE;
 
-    if (type >= TP_CONNECTION_PRESENCE_TYPE_AVAILABLE && !priv->enabled)
-	return FALSE;
-
     if (priv->req_presence_type != type)
     {
 	priv->req_presence_type = type;
@@ -647,6 +644,11 @@ mcd_account_request_presence_int (McdAccount *account,
 	changed = TRUE;
     }
 
+    if (type >= TP_CONNECTION_PRESENCE_TYPE_AVAILABLE && !priv->enabled)
+    {
+        return changed;
+    }
+
     if (priv->connection == NULL)
     {
         if (type >= TP_CONNECTION_PRESENCE_TYPE_AVAILABLE)
-- 
1.5.6.5




More information about the telepathy-commits mailing list