aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-02 17:03:40 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-02 23:37:32 +0800
commit2af6c1375e1465566d57170d8090e1b425de88fa (patch)
tree29b2d5b24c7bccf326d9c00296a02d90517cfd94
parentb228ca8e3fd252d289f06699c0e1f6bc62f6ea5b (diff)
downloadgsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.tar
gsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.tar.gz
gsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.tar.bz2
gsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.tar.lz
gsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.tar.xz
gsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.tar.zst
gsoc2013-empathy-2af6c1375e1465566d57170d8090e1b425de88fa.zip
account-widget: change presence to online when creating a new account
account_widget_account_enabled_cb was forcing the presence by setting the current most available presence to the newly created account. But if user was starting Empathy for the first time, this presence was offline so the account wasn't connected. (#611565)
-rw-r--r--libempathy-gtk/empathy-account-widget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index b12e25683..a7b272c58 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -690,6 +690,12 @@ account_widget_account_enabled_cb (GObject *source_object,
case TP_CONNECTION_PRESENCE_TYPE_UNSET:
presence = tp_account_manager_get_most_available_presence (
priv->account_manager, &status, &message);
+
+ if (presence == TP_CONNECTION_PRESENCE_TYPE_OFFLINE)
+ /* Global presence is offline; we force it so user doesn't have to
+ * manually change the presence to connect his new account. */
+ presence = TP_CONNECTION_PRESENCE_TYPE_AVAILABLE;
+
tp_account_request_presence_async (account, presence,
status, NULL, NULL, NULL);
break;