From c133c5b86a67a70594c6327578f4c7956b0112f0 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 19 Jul 2012 11:17:09 +0200 Subject: [PATCH] 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 file 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; -- 1.7.10.4