From: Paul Date: Sat, 10 Nov 2018 19:42:27 +0000 (+0000) Subject: contiunue the fix for check-at-startup, eade694613c19ffe747ccb77466070e474e3f968 X-Git-Tag: 3.17.2~46 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=9e6d0bb29a56a918878c89c10d7be9d779904779 contiunue the fix for check-at-startup, eade694613c19ffe747ccb77466070e474e3f968 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. --- diff --git a/src/inc.c b/src/inc.c index 35a09d4c6..0711f92d9 100644 --- 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); } } diff --git a/src/main.c b/src/main.c index 24150c83f..bdbdc6626 100644 --- a/src/main.c +++ b/src/main.c @@ -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);