/* GtkWidget *checkbtn_emacs; */
GtkWidget *checkbtn_show_msg_with_cursor;
GtkWidget *checkbtn_openunread;
+ GtkWidget *checkbtn_mark_as_read_on_newwin;
GtkWidget *checkbtn_openinbox;
GtkWidget *checkbtn_immedexec;
GtkWidget *checkbtn_addaddrbyclick;
{"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter,
P_BOOL, &interface.checkbtn_openunread,
prefs_set_data_from_toggle, prefs_set_toggle},
+ {"mark_as_read_on_new_window", "FALSE",
+ &prefs_common.mark_as_read_on_new_window,
+ P_BOOL, &interface.checkbtn_mark_as_read_on_newwin,
+ prefs_set_data_from_toggle, prefs_set_toggle},
{"open_inbox_on_inc", "FALSE", &prefs_common.open_inbox_on_inc,
P_BOOL, &interface.checkbtn_openinbox,
prefs_set_data_from_toggle, prefs_set_toggle},
/* GtkWidget *checkbtn_emacs; */
GtkWidget *checkbtn_show_msg_with_cursor;
GtkWidget *checkbtn_openunread;
+ GtkWidget *checkbtn_mark_as_read_on_newwin;
GtkWidget *checkbtn_openinbox;
GtkWidget *checkbtn_immedexec;
GtkWidget *hbox1;
(vbox2, checkbtn_openunread,
_("Open first unread message when entering a folder"));
+ PACK_CHECK_BUTTON
+ (vbox2, checkbtn_mark_as_read_on_newwin,
+ _("Mark message as read only when opened in new window"));
+
PACK_CHECK_BUTTON
(vbox2, checkbtn_openinbox,
_("Go to inbox after receiving new mail"));
interface.checkbtn_show_msg_with_cursor
= checkbtn_show_msg_with_cursor;
interface.checkbtn_openunread = checkbtn_openunread;
+ interface.checkbtn_mark_as_read_on_newwin
+ = checkbtn_mark_as_read_on_newwin;
interface.checkbtn_openinbox = checkbtn_openinbox;
interface.checkbtn_immedexec = checkbtn_immedexec;
interface.optmenu_recvdialog = optmenu_recvdialog;
}
g_free(filename);
- if (MSG_IS_NEW(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
- summaryview->newmsgs--;
- if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
- summaryview->unread--;
-
- procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
- summary_set_row_marks(summaryview, row);
- gtk_clist_thaw(GTK_CLIST(ctree));
- summary_status_show(summaryview);
-
- flags = msginfo->flags;
+ if (new_window || !prefs_common.mark_as_read_on_new_window) {
+ if (MSG_IS_NEW(msginfo->flags) && MSG_IS_IGNORE_THREAD(msginfo->flags))
+ summaryview->newmsgs--;
+ if (MSG_IS_UNREAD(msginfo->flags) && MSG_IS_IGNORE_THREAD(msginfo->flags))
+ summaryview->unread--;
+ if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)) {
+ procmsg_msginfo_unset_flags
+ (msginfo, MSG_NEW | MSG_UNREAD, 0);
+ summary_set_row_marks(summaryview, row);
+ gtk_clist_thaw(GTK_CLIST(ctree));
+ summary_status_show(summaryview);
+
+ flags = msginfo->flags;
+ }
+ }
if (new_window) {
MessageView *msgview;