commit d46d02c19a8c17b3feb49f5c423bccfd6b29d30e
parent b9964444bbba8b73a137acc4ac22657b6ee35bdb
Author: Paul <paul@claws-mail.org>
Date: Sat, 10 Nov 2018 19:42:27 +0000
contiunue the fix for check-at-startup, c1297b2d4
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.
Diffstat:
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git 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
@@ -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);