diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/summaryview.c | 22 |
3 files changed, 23 insertions, 8 deletions
@@ -1,3 +1,7 @@ +2006-05-09 + + * src/summaryview.c: don't decrease new/unread count if zero. + 2006-03-29 * version 2.2.4 diff --git a/ChangeLog.ja b/ChangeLog.ja index 8b64d798..916fade2 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2006-05-09 + + * src/summaryview.c: new/unread の数が0の場合はそれ以上減らさない + ようにした。 + 2006-03-29 * version 2.2.4 diff --git a/src/summaryview.c b/src/summaryview.c index ebc3f2ce..8aeba1ed 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -2477,15 +2477,19 @@ static void summary_display_msg_full(SummaryView *summaryview, if (val == 0 && (new_window || !prefs_common.mark_as_read_on_new_window)) { - if (MSG_IS_NEW(msginfo->flags)) + if (MSG_IS_NEW(msginfo->flags) && + summaryview->folder_item->new > 0) summaryview->folder_item->new--; - if (MSG_IS_UNREAD(msginfo->flags)) + if (MSG_IS_UNREAD(msginfo->flags) && + summaryview->folder_item->unread > 0) summaryview->folder_item->unread--; if (summaryview->folder_item->stype == F_VIRTUAL) { - if (MSG_IS_NEW(msginfo->flags)) + if (MSG_IS_NEW(msginfo->flags) && + msginfo->folder->new > 0) msginfo->folder->new--; - if (MSG_IS_UNREAD(msginfo->flags)) + if (MSG_IS_UNREAD(msginfo->flags) && + msginfo->folder->unread > 0) msginfo->folder->unread--; folderview_update_item(msginfo->folder, FALSE); } @@ -2728,15 +2732,17 @@ static void summary_mark_row_as_read(SummaryView *summaryview, GET_MSG_INFO(msginfo, iter); - if (MSG_IS_NEW(msginfo->flags)) + if (MSG_IS_NEW(msginfo->flags) && summaryview->folder_item->new > 0) summaryview->folder_item->new--; - if (MSG_IS_UNREAD(msginfo->flags)) + if (MSG_IS_UNREAD(msginfo->flags) && + summaryview->folder_item->unread > 0) summaryview->folder_item->unread--; if (summaryview->folder_item->stype == F_VIRTUAL) { - if (MSG_IS_NEW(msginfo->flags)) + if (MSG_IS_NEW(msginfo->flags) && msginfo->folder->new > 0) msginfo->folder->new--; - if (MSG_IS_UNREAD(msginfo->flags)) + if (MSG_IS_UNREAD(msginfo->flags) && + msginfo->folder->unread > 0) msginfo->folder->unread--; folderview_update_item(msginfo->folder, FALSE); } |