[Commits] [SCM] claws branch, master, updated. 3.17.0-154-geade694

claws at claws-mail.org claws at claws-mail.org
Thu Nov 8 19:42:49 CET 2018


The branch, master has been updated
       via  eade694613c19ffe747ccb77466070e474e3f968 (commit)
      from  f4607b4b60f88fecd36f0c67c5d02462b8229a5f (commit)

Summary of changes:
 src/inc.c     |    8 ++++----
 src/inc.h     |    2 ++
 src/main.c    |    7 +++++--
 src/toolbar.c |    2 +-
 4 files changed, 12 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit eade694613c19ffe747ccb77466070e474e3f968
Author: Paul <paul at claws-mail.org>
Date:   Thu Nov 8 18:42:43 2018 +0000

    fix check for mail at start-up

diff --git a/src/inc.c b/src/inc.c
index 78fc240..35a09d4 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -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;
diff --git a/src/inc.h b/src/inc.h
index b9c09f6..c440c8f 100644
--- a/src/inc.h
+++ b/src/inc.h
@@ -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);
diff --git a/src/main.c b/src/main.c
index eff8f86..24150c8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);
@@ -2538,7 +2541,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);
diff --git a/src/toolbar.c b/src/toolbar.c
index 4c16c47..13fce67 100644
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -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)

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list