aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-account.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-08-26 01:59:33 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-08-26 03:12:24 +0800
commitfbaa6100736ae6fd627b7f299bc9fab421a33e0f (patch)
treef2fe7969f3917a6c16a7f50382ce3426a85d2ce6 /libempathy/empathy-account.c
parent7df0207fe8f3f28c00068d50b39a7fb0527d30d9 (diff)
downloadgsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.tar
gsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.tar.gz
gsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.tar.bz2
gsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.tar.lz
gsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.tar.xz
gsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.tar.zst
gsoc2013-empathy-fbaa6100736ae6fd627b7f299bc9fab421a33e0f.zip
Request presence again when an account is enabled
Diffstat (limited to 'libempathy/empathy-account.c')
-rw-r--r--libempathy/empathy-account.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-account.c b/libempathy/empathy-account.c
index 39b5d0f08..7733f3556 100644
--- a/libempathy/empathy-account.c
+++ b/libempathy/empathy-account.c
@@ -36,6 +36,7 @@
#include <glib/gi18n-lib.h>
#include "empathy-account.h"
+#include "empathy-account-manager.h"
#include "empathy-utils.h"
#include "empathy-marshal.h"
@@ -942,9 +943,13 @@ empathy_account_set_enabled_async (EmpathyAccount *account,
gpointer user_data)
{
EmpathyAccountPriv *priv = GET_PRIV (account);
+ EmpathyAccountManager *acc_manager;
GValue value = {0, };
GSimpleAsyncResult *result = g_simple_async_result_new (G_OBJECT (account),
callback, user_data, empathy_account_set_enabled_finish);
+ char *status = NULL;
+ char *status_message = NULL;
+ TpConnectionPresenceType presence;
if (priv->enabled == enabled)
{
@@ -952,6 +957,18 @@ 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 (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_value_init (&value, G_TYPE_BOOLEAN);
g_value_set_boolean (&value, enabled);