From 28c8aaa95db1f26e18f8542458d6ff690fd2da49 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 13 Nov 2009 15:44:46 +0000 Subject: 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 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libempathy-gtk/empathy-log-window.c') diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index f6f6ef17f..09b3abd34 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) { -- cgit v1.2.3