[empathy] log-window: check if the account chooser isn't already ready
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] log-window: check if the account chooser isn't already ready
- Date: Mon, 16 Nov 2009 10:14:51 +0000 (UTC)
commit 28c8aaa95db1f26e18f8542458d6ff690fd2da49
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Nov 13 15:44:46 2009 +0000
log-window: check if the account chooser isn't already ready
If not we could wait forever if the chooser became ready right away.
libempathy-gtk/empathy-log-window.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index f6f6ef1..09b3abd 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -285,13 +285,17 @@ empathy_log_window_show (TpAccount *account,
log_window_chats_setup (window);
log_window_chats_populate (window);
- /* Chat will be selected once the account chooser is ready */
if (account && chat_id) {
- g_signal_connect (account_chooser, "ready",
- G_CALLBACK (account_chooser_ready_cb), window);
window->selected_account = account;
window->selected_chat_id = g_strdup (chat_id);
window->selected_is_chatroom = is_chatroom;
+
+ if (empathy_account_chooser_is_ready (account_chooser))
+ account_chooser_ready_cb (account_chooser, window);
+ else
+ /* Chat will be selected once the account chooser is ready */
+ g_signal_connect (account_chooser, "ready",
+ G_CALLBACK (account_chooser_ready_cb), window);
}
if (parent) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]