Fix incorporation dialog focus with master passphrase dialog.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 25 Mar 2016 11:15:23 +0000 (12:15 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 25 Mar 2016 11:15:23 +0000 (12:15 +0100)
src/inc.c

index 5e994086c04fad5d3ec6974024de8a9f36e222f1..6344d22bbf71992eda57d7b0c6040c7b806def9a 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -570,6 +570,11 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                pop3_session = POP3_SESSION(session->session); 
                pop3_session->user = g_strdup(pop3_session->ac_prefs->userid);
 
                pop3_session = POP3_SESSION(session->session); 
                pop3_session->user = g_strdup(pop3_session->ac_prefs->userid);
 
+               if (inc_dialog->show_dialog)
+                       manage_window_focus_in
+                               (inc_dialog->dialog->window,
+                                NULL, NULL);
+
                if (password_get(pop3_session->user,
                                        pop3_session->ac_prefs->recv_server,
                                        "pop3", pop3_get_port(pop3_session),
                if (password_get(pop3_session->user,
                                        pop3_session->ac_prefs->recv_server,
                                        "pop3", pop3_get_port(pop3_session),
@@ -579,26 +584,21 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                                                pop3_session->ac_prefs->account_id, PWS_ACCOUNT_RECV)) == NULL) {
                        gchar *pass;
 
                                                pop3_session->ac_prefs->account_id, PWS_ACCOUNT_RECV)) == NULL) {
                        gchar *pass;
 
-                       if (inc_dialog->show_dialog)
-                               manage_window_focus_in
-                                       (inc_dialog->dialog->window,
-                                        NULL, NULL);
-
                        pass = input_dialog_query_password_keep
                                (pop3_session->ac_prefs->recv_server,
                                 pop3_session->user,
                                 &(pop3_session->ac_prefs->session_passwd));
 
                        pass = input_dialog_query_password_keep
                                (pop3_session->ac_prefs->recv_server,
                                 pop3_session->user,
                                 &(pop3_session->ac_prefs->session_passwd));
 
-                       if (inc_dialog->show_dialog)
-                               manage_window_focus_out
-                                       (inc_dialog->dialog->window,
-                                        NULL, NULL);
-
                        if (pass) {
                                pop3_session->pass = pass;
                        }
                }
 
                        if (pass) {
                                pop3_session->pass = pass;
                        }
                }
 
+               if (inc_dialog->show_dialog)
+                       manage_window_focus_out
+                               (inc_dialog->dialog->window,
+                                NULL, NULL);
+
                qlist = next;
        }
 
                qlist = next;
        }