fix check for mail at start-up
This commit is contained in:
parent
9b429ff5fd
commit
c1297b2d44
4 changed files with 12 additions and 7 deletions
|
@ -413,7 +413,7 @@ void inc_account_list_mail(MainWindow *mainwin, GList *account_list, gboolean au
|
|||
}
|
||||
|
||||
void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
|
||||
gboolean notify)
|
||||
gboolean check_at_startup, gboolean notify)
|
||||
{
|
||||
GList *list, *list2 = NULL;
|
||||
gboolean condition;
|
||||
|
@ -431,11 +431,11 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
|
|||
|
||||
/* Set up condition which decides whether or not to check
|
||||
* this account, based on whether we're doing global autocheck
|
||||
* or a manual 'Get all' check. */
|
||||
* or a check at startup or a manual 'Get all' check. */
|
||||
if (autocheck)
|
||||
condition = prefs_common_get_prefs()->autochk_newmail
|
||||
&& account->autochk_use_default;
|
||||
else
|
||||
else if (check_at_startup || (!check_at_startup && !autocheck))
|
||||
condition = account->recv_at_getall;
|
||||
|
||||
if (condition) {
|
||||
|
@ -1540,7 +1540,7 @@ static gint inc_autocheck_func(gpointer data)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
inc_all_account_mail(mainwin, TRUE, prefs_common.newmail_notify_auto);
|
||||
inc_all_account_mail(mainwin, TRUE, FALSE, prefs_common.newmail_notify_auto);
|
||||
inc_autocheck_timer_set();
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -93,11 +93,13 @@ void inc_account_list_mail (MainWindow *mainwin,
|
|||
gboolean notify);
|
||||
|
||||
/* This function is used by the global autocheck interval (autocheck TRUE),
|
||||
* or check at startup (check_at_startup TRUE)
|
||||
* or by the manual 'Receive all' feature (autocheck FALSE). It makes
|
||||
* sure correct list of accounts is marked for checking, based on
|
||||
* global and account configuration, and calls inc_account_list_mail(). */
|
||||
void inc_all_account_mail (MainWindow *mainwin,
|
||||
gboolean autocheck,
|
||||
gboolean check_at_startup,
|
||||
gboolean notify);
|
||||
|
||||
void inc_progress_update (Pop3Session *session);
|
||||
|
|
|
@ -317,10 +317,13 @@ static gboolean defer_check_all(void *data)
|
|||
{
|
||||
gboolean autochk = GPOINTER_TO_INT(data);
|
||||
|
||||
inc_all_account_mail(static_mainwindow, autochk,
|
||||
inc_all_account_mail(static_mainwindow, autochk, FALSE,
|
||||
prefs_common.newmail_notify_manu);
|
||||
|
||||
if (sc_starting) {
|
||||
inc_all_account_mail(static_mainwindow, FALSE,
|
||||
prefs_common.chk_on_startup,
|
||||
prefs_common.newmail_notify_manu);
|
||||
sc_starting = FALSE;
|
||||
main_window_set_menu_sensitive(static_mainwindow);
|
||||
toolbar_main_set_sensitive(static_mainwindow);
|
||||
|
@ -2544,7 +2547,7 @@ static void lock_socket_input_cb(gpointer data,
|
|||
} else if (!strncmp(buf, "get_display", 11)) {
|
||||
fd_write_all(sock, x_display, strlen(x_display));
|
||||
} else if (!strncmp(buf, "receive_all", 11)) {
|
||||
inc_all_account_mail(mainwin, FALSE,
|
||||
inc_all_account_mail(mainwin, FALSE, FALSE,
|
||||
prefs_common.newmail_notify_manu);
|
||||
} else if (!strncmp(buf, "receive", 7)) {
|
||||
inc_mail(mainwin, prefs_common.newmail_notify_manu);
|
||||
|
|
|
@ -3018,7 +3018,7 @@ void inc_all_account_mail_cb(gpointer data, guint action, GtkWidget *widget)
|
|||
{
|
||||
MainWindow *mainwin = (MainWindow*)data;
|
||||
|
||||
inc_all_account_mail(mainwin, FALSE, prefs_common.newmail_notify_manu);
|
||||
inc_all_account_mail(mainwin, FALSE, FALSE, prefs_common.newmail_notify_manu);
|
||||
}
|
||||
|
||||
void send_queue_cb(gpointer data, guint action, GtkWidget *widget)
|
||||
|
|
Loading…
Reference in a new issue