Closed Bug 234121 Opened 22 years ago Closed 21 years ago

Change wording of "Mark message read..." pref

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird1.1

People

(Reporter: karthik, Assigned: Stefan.Borggraefe)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Build Identifier: I donot want my mails to become READ when I click the mail record. Even though the setting "Mark as Read after _ seconds" is OFF, when i click on a mail and go to next mail, my previous mail gets READ. This should not happen. Reproducible: Always Steps to Reproduce: 1. 2. 3.
This as bugging me as well. Here is a patch which will not mark messages as Read in the preview pane. To minimize backward compatibility complaints, this uses the "Mark message read after displaying for X seconds" checkbox checked with 0 seconds as a way to invoke this behavior. In other words: If "Mark message read" is unchecked, it will immediately mark the message as read. If "Mark message read" is checked and the number of seconds is 0, do not mark the message as read. If "Mark message read" is checked and the number of seconds is >0, mark the message read after that many seconds. Index: mail/base/content/mailWindowOverlay.js =============================================================== ==== RCS file: /cvsroot/mozilla/mail/base/content/mailWindowOverlay.js,v retrieving revision 1.56 diff -u -r1.56 mailWindowOverlay.js --- mail/base/content/mailWindowOverlay.js 26 May 2004 06:31:46 -0000 1.56 +++ mail/base/content/mailWindowOverlay.js 6 Jun 2004 20:49:32 -0000 @@ -2090,9 +2090,11 @@ if (msgHdr && !msgHdr.isRead) { var wintype = document.firstChild.getAttribute('windowtype'); - if (markReadOnADelay && wintype == "mail:3pane") // only use the timer if viewing using the 3- pane preview pane and the user has set the pref - gMarkViewedMessageAsReadTimer = setTimeout(MarkCurrentMessageAsRead, gPrefBranch.getIntPref("mailnews.mark_message_read.delay.interval") * 1000); - else + if (markReadOnADelay && wintype == "mail:3pane") { // only use the timer if viewing using the 3- pane preview pane and the user has set the pref + var interval = gPrefBranch.getIntPref("mailnews.mark_message_read.delay.interval"); + if (interval) + gMarkViewedMessageAsReadTimer = setTimeout(MarkCurrentMessageAsRead, interval * 1000); + } else MarkCurrentMessageAsRead(); }
This might be a duplicate of bug 75866 but then the latter should be reopened as it doesn't work as intended. (In reply to comment #1) > If "Mark message read" is unchecked, it will immediately mark the message as read. > If "Mark message read" is checked and the number of seconds is 0, do not mark the message as read. Well the actions for the two options should be reversed shouldn't they? It's not logical to me to say that an when option called "Mark message read" is not requested, it will actually mark the messages as read.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-aviary1.0PR?
OS: Windows XP → All
Flags: blocking-aviary1.0PR? → blocking-aviary1.0PR-
Target Milestone: --- → After Thunderbird 1.
Bug 75866 comment 87 implies that using "0" to turn it off was not implemented even before this UI was available. I agree with Patrick, reversing the sense of the unchecked box would make a lot more sense from UI standpoint.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Summary: Should not mark the mail as Read when I click on the Mail → Should not mark the mail as Read with view-timer=0
I agree. I actually re-coded the change and have been running this in my tree for a while. It will "break" some people on upgrade but I'd rather do it right before 1.0.
Reopening -- the WorksForMe was accidental. Sorry! Mark, if you're going to submit a patch for review, it should include the entire delta -- both what you have in comment 1 and this new bit of code. > It will "break" some people on upgrade but I'd rather do it right > before 1.0. Which people exactly will that break for? I assume it would be possible to leave the sense of the preferences as they are, but tweak the UI to reflect the different meaning of the checkbox, but that's a lot more work.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
The current default behavior in Thunderbird is: If "Mark message read" is unchecked, immediately mark the message read. If "Mark message read" is checked, mark the message read after that many seconds. My comments in #1 above only hold for the patch in #1. However, as stated in comments #2 and #3, this is not intuitive. I came to the same conclusion and reworked the patch in #4. That patch will have this behavior: If "Mark message read" is unchecked, do not mark the message as read. If "Mark message read" is checked, mark the message read after that many seconds. If seconds is 0, it will be marked as read immediately. Please note that patch #4 is the entire patch and is independent of the patch in #1. However, I did forget to include a change to the defaults to be compatible with the existing default behavior (Mark message read immediately). A new patch is attached. As to your last question, if people have not changed their defaults they will have "Mark message read" unchecked. Their behavior will change from having messages marked as read immediately to not having them marked as read at all. I agree that changing the sense of the UI is too much work (especially for a pre-1.0 product). Applying the latest patch will make it much more maintainable.
First, I don't think you're going to get approval for a change that reverses the behavior in existing profiles, especially for people who are running with the defaults. You're going to have either reverse the behavior of the UI, or provide new code on installation to examine the preferences and change them to provide the same behavior as for earlier builds, for *all* users -- which I think is even harder to do. Second, it is not clear to me that the simple logic change has no side effects, nor that it even works for all cases. (1) A message in the standalone window is supposed to be marked as read immediately, but it looks like you're always leaving it unread. (2) Does setting a timeout of 0 really prevent the message from being read? I'd rather see an explicit check for 0 in the code, and never set up a timer with zero.
On my installation, if the checkbox is cleared the message is marked as read when shown in preview. If the checkbox is set, and I enter some very large value, eventually the messages is marked read (about after few hours, disregarding the number of seconds I have entered). This is really annoying.
I forgot to mention that I'm using Thunderbird 0.9
(In reply to comment #0) by----> Rusty (here.b.a.spoon@gmail.com) I am using Version 1.0 and it is performing the same way. If I set the timer to 0, it still marks it as read??? Is there a fix for this? I would like to 'preview' a message without it marking it as read. > I donot want my mails to become READ when I click the mail record. Even though > the setting "Mark as Read after _ seconds" is OFF, when i click on a mail and > go to next mail, my previous mail gets READ. This should not happen.
Attachment #157735 - Attachment is obsolete: true
No, there has been no change. The workaround is to check the box and put a large number in the field.
*** Bug 262252 has been marked as a duplicate of this bug. ***
*** Bug 273688 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.1?
*** Bug 267813 has been marked as a duplicate of this bug. ***
Bug 231428 implemented (in the suite) a tweak to the UI for this feature -- the checkbox function has not changed, but the label now more accurately reads: [] Delay marking message read for [nnn] seconds Stefan, could you port that tweak to TB?
(In reply to comment #15) > Stefan, could you port that tweak to TB? Sure.
Assignee: mscott → Stefan.Borggraefe
Status: REOPENED → NEW
Target Milestone: Future → Thunderbird1.1
Attached patch PatchSplinter Review
Port of the patch for Bug 231428 to TB. I also removed the full stops at the end of all checkbox labels (in other dialogs of TB and the Suite there are none after checkbox- or radiobutton-labels either except for those multiple-sentence long labels of some i18n options).
Attachment #175031 - Flags: superreview?(mscott)
Comment on attachment 175031 [details] [diff] [review] Patch thank you Stefan.
Attachment #175031 - Flags: superreview?(mscott)
Attachment #175031 - Flags: superreview+
Attachment #175031 - Flags: review+
Patch checked in. This change should make it clear that you need to enable this option and enter a high number of seconds (not 0) to prevent TB to mark messages as read automatically. Marking FIXED.
Status: NEW → RESOLVED
Closed: 21 years ago21 years ago
Flags: blocking-aviary1.1?
Resolution: --- → FIXED
What is the max number of seconds that can be entered?
(In reply to comment #20) > What is the max number of seconds that can be entered? 2147483647 (~ 68 years)
No matter how large is the value I enter, the message becomes marked as read after less than a day (never tried to measure exact time). I use TB 1.0. (In reply to comment #21) > (In reply to comment #20) > > What is the max number of seconds that can be entered? > 2147483647 (~ 68 years)
(In reply to comment #22) > No matter how large is the value I enter, the message becomes marked as read > after less than a day (never tried to measure exact time). I use TB 1.0. Probably this is because the int pref value is multiplied with 1000 here: http://lxr.mozilla.org/mozilla/source/mailnews/base/resources/content/mailWindowOverlay.js#2145 So the number I told you causes an overflow. If I'm correct this time 2147483 should be the largest possible number of seconds you can use (~24 days). Can you test this again? Thanks! :-) Perhaps we should add a test before the multiplication with 1000 to avoid the overflow.
I will try it for several days.
Hrmm... as far as I can tell - this bug is not fixed either way (my Thunderbird version is 1.0.2) If I set the amout of time to 0, it marks the message immediately read on preview. If I uncheck the setting in the preferences, it still marks the message as unread immediately. As an enduser I'd expect that whenever I uncheck the setting that says "Mark messages read...", it should no more mark messages as read. When checked, the number of seconds should govern the delay of marking messages as read (0 intuitively translating to "immediately") I'd ask to reopen the bug and rename it to reflect the issue more apropriately (eg."Allow disabling of automatically marking messages as read on preview").
(In reply to comment #25) > Hrmm... as far as I can tell - this bug is not fixed either way (my Thunderbird > version is 1.0.2) This bug was only fixed on the trunk (what will become Thunderbird 1.1). The 1.0-branch only gets fixes for critical bugs (e.g. security bugs).
(In reply to comment #23) > (In reply to comment #22) > > No matter how large is the value I enter, the message becomes marked as read > > after less than a day (never tried to measure exact time). I use TB 1.0. > > Probably this is because the int pref value is multiplied with 1000 here: > > So the number I told you causes an overflow. If I'm correct this time 2147483 > should be the largest possible number of seconds you can use (~24 days). Can > you test this again? Thanks! :-) > > Perhaps we should add a test before the multiplication with 1000 to avoid the > overflow. xref bug 226551.
"Wait 88888 seconds before marking a message as read" marks it as read after 2-3 seconds. Entering 77777 seconds leaves it unread for a long time, presumably for the correct equivalent of 21.6 hours. 1.5 (20051201)
forgot to add: Used to have 999999 or larger (7 or 8 digits), and today TB suddenly (again) forgot and refused to remember the setting. When this problem occurred in the past (often), restarting TB helped, but not anymore. Now even 99999 and 88888 (5 digits) are too large. Largest value that consistently works is 77777 (5 digits).
I've given up trying to find a magic number for the mark-as-read timeout value because I no longer think that there is one that always works. Instead, I now manually comment out the following lines in mailWindowOverlay.js (it's in messenger.jar/content/messenger) every time that I install a new version of Thunderbird: 1) Search for these comments: // we just finished loading a message. set a timer to actually mark the message as read after n seconds 2) Comment out everything up to (but not including) the next commented section (which is in regard to MDN) It's a little painful but it's 100% reliable! :-) Also, the new version of WinZip makes it relatively easy to edit the file inside the JAR file without the need to manually unzip and re-zip anything. Nice.
Changing summary to indicate what this bug finally achieved. If you're like me and like to mark your messages as read manually, watch bug 297534.
Summary: Should not mark the mail as Read with view-timer=0 → Change wording of "Mark message read..." pref
(In reply to comment #30) the problem is that the .js file uses unix encoding. it's a little painful to edit it on windows, but the proposed solution 100% works. I can't really understand why there is no option that would fix this problem once and for good. :(
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: