sync with 0.8.2cvs10
authorPaul Mangan <paul@claws-mail.org>
Fri, 6 Sep 2002 07:38:22 +0000 (07:38 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 6 Sep 2002 07:38:22 +0000 (07:38 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/prefs_common.c
src/prefs_common.h
src/summaryview.c

index ff46476..132b588 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-06
+
+       * src/prefs_common.[ch]: added an option: "Mark messages as read
+         only when opened in new window".
+
 2002-09-04
 
        * src/folder.c:
index b4bae3c..5a46e14 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-06 [paul]      0.8.2claws29
+
+       * sync with 0.8.2cvs10
+               see ChangeLog 2002-09-06
+
 2002-09-04 [paul]      0.8.2claws28
 
        * sync with 0.8.2cvs9
index 4770f3c..043a00c 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-06
+
+       * src/prefs_common.[ch]: ¥ª¥×¥·¥ç¥ó¡Ö¿·µ¬¥¦¥£¥ó¥É¥¦¤Ç³«¤¤¤¿¤È¤­¤Î¤ß
+         ¥á¥Ã¥»¡¼¥¸¤ò´ûÆɤȤ·¤Æ¥Þ¡¼¥¯¡×¤òÄɲá£
+
 2002-09-04
 
        * src/folder.c:
index 7d68da7..1da2b1c 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws28
+EXTRA_VERSION=claws29
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index b38a440..fb11acb 100644 (file)
@@ -211,6 +211,7 @@ static struct Interface {
        /* 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;
@@ -730,6 +731,10 @@ static PrefParam param[] = {
        {"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},
@@ -2575,6 +2580,7 @@ static void prefs_interface_create(void)
        /* 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;
@@ -2625,6 +2631,10 @@ static void prefs_interface_create(void)
                (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"));
@@ -2766,6 +2776,8 @@ static void prefs_interface_create(void)
        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;
index 8149e4b..e354ee2 100644 (file)
@@ -219,6 +219,7 @@ struct _PrefsCommon
        gboolean emulate_emacs;
        gboolean show_msg_with_cursor_key;
        gboolean open_unread_on_enter;
+       gboolean mark_as_read_on_new_window;
        gboolean open_inbox_on_inc;
        gboolean immediate_exec;
        RecvDialogMode recv_dialog_mode;
index 7d590c1..edd7553 100644 (file)
@@ -2310,17 +2310,21 @@ static void summary_display_msg_full(SummaryView *summaryview,
        }
        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;