aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-12-01 08:22:38 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-12-01 08:22:38 +0000
commitcc658280e2b77e42531ae9aa07c18cf9aea0fd4c (patch)
treee8cb97d212fcee20d093fb3e16cd9b44752a2e6a /src
parent6cc2012df1b49b57e204a3e75c7850b339d10486 (diff)
added an option 'Always mark as read when a message is opened'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2729 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/prefs_common_dialog.c19
-rw-r--r--src/summaryview.c3
2 files changed, 18 insertions, 4 deletions
diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c
index 5d2bae2e..ae60d73a 100644
--- a/src/prefs_common_dialog.c
+++ b/src/prefs_common_dialog.c
@@ -198,6 +198,7 @@ static struct Privacy {
static struct Interface {
GtkWidget *checkbtn_always_show_msg;
+ GtkWidget *checkbtn_always_mark_read;
GtkWidget *checkbtn_openunread;
GtkWidget *checkbtn_remember_lastsel;
/* GtkWidget *checkbtn_mark_as_read_on_newwin; */
@@ -502,6 +503,8 @@ static PrefsUIData ui_data[] = {
{"always_show_message_when_selected",
&interface.checkbtn_always_show_msg,
prefs_set_data_from_toggle, prefs_set_toggle},
+ {"always_mark_read_on_show_msg", &interface.checkbtn_always_mark_read,
+ prefs_set_data_from_toggle, prefs_set_toggle},
{"open_unread_on_enter", &interface.checkbtn_openunread,
prefs_set_data_from_toggle, prefs_set_toggle},
{"remember_last_selected", &interface.checkbtn_remember_lastsel,
@@ -2334,6 +2337,7 @@ static void prefs_details_create(void)
GtkWidget *vbox2;
GtkWidget *vbox3;
GtkWidget *checkbtn_always_show_msg;
+ GtkWidget *checkbtn_always_mark_read;
GtkWidget *checkbtn_openunread;
GtkWidget *checkbtn_remember_lastsel;
/* GtkWidget *checkbtn_mark_as_read_on_newwin; */
@@ -2380,9 +2384,14 @@ static void prefs_details_create(void)
_("Always open messages in summary when selected"));
PACK_CHECK_BUTTON
+ (vbox2, checkbtn_always_mark_read,
+ _("Always mark as read when a message is opened"));
+ SET_TOGGLE_SENSITIVITY
+ (checkbtn_always_show_msg, checkbtn_always_mark_read);
+
+ PACK_CHECK_BUTTON
(vbox2, checkbtn_openunread,
_("Open first unread message when a folder is opened"));
-
SET_TOGGLE_SENSITIVITY_REV
(checkbtn_always_show_msg, checkbtn_openunread);
@@ -2396,11 +2405,14 @@ static void prefs_details_create(void)
_("Only mark message as read when opened in new window"));
#endif
+ hbox1 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
PACK_CHECK_BUTTON
- (vbox2, checkbtn_openinbox,
+ (hbox1, checkbtn_openinbox,
_("Open inbox after receiving new mail"));
PACK_CHECK_BUTTON
- (vbox2, checkbtn_openinbox_startup, _("Open inbox on startup"));
+ (hbox1, checkbtn_openinbox_startup, _("Open inbox on startup"));
PACK_CHECK_BUTTON
(vbox2, checkbtn_change_account_on_folder_sel,
@@ -2475,6 +2487,7 @@ static void prefs_details_create(void)
gtk_box_pack_start(GTK_BOX(vbox_tab), advanced_wid, FALSE, FALSE, 0);
interface.checkbtn_always_show_msg = checkbtn_always_show_msg;
+ interface.checkbtn_always_mark_read = checkbtn_always_mark_read;
interface.checkbtn_openunread = checkbtn_openunread;
interface.checkbtn_remember_lastsel = checkbtn_remember_lastsel;
#if 0
diff --git a/src/summaryview.c b/src/summaryview.c
index c187a3de..01606b76 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -2735,7 +2735,8 @@ static void summary_display_msg_full(SummaryView *summaryview,
gtk_widget_grab_focus(summaryview->treeview);
}
- if (val == 0 && new_window) {
+ if (val == 0 &&
+ (new_window || prefs_common.always_mark_read_on_show_msg)) {
if (MSG_IS_NEW(msginfo->flags) ||
MSG_IS_UNREAD(msginfo->flags)) {
summary_mark_row_as_read(summaryview, iter);