]> git.0d.be Git - empathy.git/commitdiff
log-window: check if the account chooser isn't already ready
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 13 Nov 2009 15:44:46 +0000 (15:44 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 16 Nov 2009 10:13:36 +0000 (10:13 +0000)
If not we could wait forever if the chooser became ready right away.

libempathy-gtk/empathy-log-window.c

index f6f6ef17f8691eca02505082dd546f65e9c205ac..09b3abd342a61c89601c269aa8b14bb8ebeabf74 100644 (file)
@@ -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) {