[empathy] account-widget: change presence to online when creating a new account
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] account-widget: change presence to online when creating a new account
- Date: Tue, 2 Mar 2010 15:37:50 +0000 (UTC)
commit 2af6c1375e1465566d57170d8090e1b425de88fa
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Mar 2 10:03:40 2010 +0100
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)
libempathy-gtk/empathy-account-widget.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index b12e256..a7b272c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]