[Commits] [SCM] claws branch, master, updated. 4.3.1-15-gdf576abca

paul at claws-mail.org paul at claws-mail.org
Thu Feb 27 10:18:20 UTC 2025


The branch, master has been updated
       via  df576abca3a4864840b1f52da4031fd1cf24fe1b (commit)
      from  94ca01e75654f13202526c51d6a7785caaf2e9f8 (commit)

Summary of changes:
 src/mainwindow.c  |  2 +-
 src/messageview.c |  4 +++-
 src/summaryview.c | 20 +++++++++++++-------
 src/summaryview.h |  6 ++++--
 4 files changed, 21 insertions(+), 11 deletions(-)


- Log -----------------------------------------------------------------
commit df576abca3a4864840b1f52da4031fd1cf24fe1b
Author: Paul <paul at claws-mail.org>
Date:   Thu Feb 27 10:18:16 2025 +0000

    fix bug where viewing msgs in the separate msg view are not marked as read when the msgview panel is hidden

diff --git a/src/mainwindow.c b/src/mainwindow.c
index 267cc4646..7984b1a38 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -4355,7 +4355,7 @@ static void cancel_cb(GtkAction *action, gpointer data)
 static void open_msg_cb(GtkAction *action, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
-	summary_open_msg(mainwin->summaryview);
+	summary_open_msg(mainwin->summaryview, TRUE, FALSE);
 }
 
 static void view_source_cb(GtkAction *action, gpointer data)
diff --git a/src/messageview.c b/src/messageview.c
index db141c4ea..973bbd26b 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2025 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1444,6 +1444,8 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
 	}
 	mimeview_show_message(messageview->mimeview, mimeinfo, file);
 	
+	summary_open_msg(messageview->mainwin->summaryview, FALSE, TRUE);
+	
 #ifndef GENERIC_UMPC
 	messageview_set_position(messageview, 0);
 #endif
diff --git a/src/summaryview.c b/src/summaryview.c
index 213098d04..e0d80cddd 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -170,7 +170,8 @@ static void summary_display_msg		(SummaryView		*summaryview,
 static void summary_display_msg_full	(SummaryView		*summaryview,
 					 GtkCMCTreeNode		*row,
 					 gboolean		 new_window,
-					 gboolean		 all_headers);
+					 gboolean		 all_headers,
+					 gboolean		 from_sep_msgview);
 static void summary_set_row_marks	(SummaryView		*summaryview,
 					 GtkCMCTreeNode		*row);
 
@@ -3589,7 +3590,7 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
 
 static void summary_display_msg(SummaryView *summaryview, GtkCMCTreeNode *row)
 {
-	summary_display_msg_full(summaryview, row, FALSE, FALSE);
+	summary_display_msg_full(summaryview, row, FALSE, FALSE, FALSE);
 }
 
 static gboolean defer_change(gpointer data);
@@ -3728,7 +3729,8 @@ static int msginfo_mark_as_read_timeout(void *data)
 
 static void summary_display_msg_full(SummaryView *summaryview,
 				     GtkCMCTreeNode *row,
-				     gboolean new_window, gboolean all_headers)
+				     gboolean new_window, gboolean all_headers,
+				     gboolean from_sep_msgview)
 {
 	GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
 	MsgInfo *msginfo;
@@ -3807,6 +3809,9 @@ static void summary_display_msg_full(SummaryView *summaryview,
 					msginfo_mark_as_read_timeout, data);
 		} else if (new_window || !prefs_common.mark_as_read_on_new_window) {
 			msginfo_mark_as_read(summaryview, msginfo, row);
+		} else if (from_sep_msgview &&
+			   prefs_common.mark_as_read_on_new_window) {
+			msginfo_mark_as_read(summaryview, msginfo, row);
 		}
 	}
 
@@ -3824,7 +3829,7 @@ void summary_display_msg_selected(SummaryView *summaryview,
 	if (summary_is_locked(summaryview)) return;
 	summaryview->displayed = NULL;
 	summary_display_msg_full(summaryview, summaryview->selected, FALSE,
-				 all_headers);
+				 all_headers, FALSE);
 }
 
 void summary_redisplay_msg(SummaryView *summaryview)
@@ -3838,14 +3843,15 @@ void summary_redisplay_msg(SummaryView *summaryview)
 	}
 }
 
-void summary_open_msg(SummaryView *summaryview)
+void summary_open_msg(SummaryView *summaryview, gboolean new_window,
+		      gboolean from_sep_msgview)
 {
 	if (!summaryview->selected) return;
 	
 	/* CLAWS: if separate message view, don't open a new window
 	 * but rather use the current separated message view */
 	summary_display_msg_full(summaryview, summaryview->selected, 
-				 TRUE, FALSE);
+				 new_window, FALSE, from_sep_msgview);
 }
 
 void summary_view_source(SummaryView * summaryview)
@@ -7182,7 +7188,7 @@ void summary_open_row(GtkSCTree *sctree, SummaryView *summaryview)
 	if (FOLDER_SHOWS_TO_HDR(summaryview->folder_item))
 		summary_reedit(summaryview);
 	else
-		summary_open_msg(summaryview);
+		summary_open_msg(summaryview, TRUE, FALSE);
 
 	summaryview->display_msg = FALSE;
 }
diff --git a/src/summaryview.h b/src/summaryview.h
index ce3db3a94..5239fbdf6 100644
--- a/src/summaryview.h
+++ b/src/summaryview.h
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2025 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -257,7 +257,9 @@ gboolean summary_pass_key_press_event (SummaryView		*summaryview,
 void summary_display_msg_selected (SummaryView		*summaryview,
 				   gboolean		 all_headers);
 void summary_redisplay_msg	  (SummaryView		*summaryview);
-void summary_open_msg		  (SummaryView		*summaryview);
+void summary_open_msg		  (SummaryView		*summaryview,
+				   gboolean		 new_window,
+				   gboolean		 from_sep_msgview);
 void summary_open_row		  (GtkSCTree *sctree, SummaryView *summaryview);
 void summary_view_source	  (SummaryView		*summaryview);
 void summary_reedit		  (SummaryView		*summaryview);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list