From 2af6c1375e1465566d57170d8090e1b425de88fa Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 2 Mar 2010 10:03:40 +0100 Subject: 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 file changed, 6 insertions(+) (limited to 'libempathy-gtk') 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; -- cgit v1.2.3