contiunue the fix for check-at-startup, eade694613c19ffe747ccb77466070e474e3f968
authorPaul <paul@claws-mail.org>
Sat, 10 Nov 2018 19:42:27 +0000 (19:42 +0000)
committerPaul <paul@claws-mail.org>
Sat, 10 Nov 2018 19:42:27 +0000 (19:42 +0000)
The commit eade694613c19ffe747ccb77466070e474e3f968 fixed the case where
'check at startup' completely failed if user did no periodic auto-check.

This commit fixes the double-check at start-up (main.c) and the receive
dialogue being shown, contrary to option for showing the receive
dialogue.

src/inc.c
src/main.c

index 35a09d4..0711f92 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -417,6 +417,7 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
 {
        GList *list, *list2 = NULL;
        gboolean condition;
+       gboolean hide_dialog = FALSE;
 
        debug_print("INC: inc_all_account_mail(), autocheck: %s\n",
                        autocheck ? "YES" : "NO");
@@ -446,7 +447,9 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
 
        /* Do the check on the collected accounts. */
        if (list2 != NULL) {
-               inc_account_list_mail(mainwin, list2, autocheck, notify);
+               if (autocheck || check_at_startup)
+                       hide_dialog = TRUE;
+               inc_account_list_mail(mainwin, list2, hide_dialog, notify);
                g_list_free(list2);
        }
 }
index 24150c8..bdbdc66 100644 (file)
@@ -317,10 +317,11 @@ static gboolean defer_check_all(void *data)
 {
        gboolean autochk = GPOINTER_TO_INT(data);
 
-       inc_all_account_mail(static_mainwindow, autochk, FALSE,
+       if (!sc_starting) {
+               inc_all_account_mail(static_mainwindow, autochk, FALSE,
                        prefs_common.newmail_notify_manu);
 
-       if (sc_starting) {
+       } else {
                inc_all_account_mail(static_mainwindow, FALSE,
                                prefs_common.chk_on_startup,
                                prefs_common.newmail_notify_manu);