Bug 465116 - Move to Trash now marks as read. Add pref mailnews.ui.deleteMarksRead to allow restoring old behavior. r=Mnyromyr sr=Neil
authorJens Hatlak <jh@junetz.de>
Thu, 02 Sep 2010 16:58:35 +0200
changeset 6305 952f741db45e10271c1822145fe6ed0f6e3bbec9
parent 6304 1446fa969a6c4e47593b5cd0ce3dd850d5aa1c65
child 6306 4b9cb609548dae0d226a72b89c4df51158077112
push id4865
push userjh@junetz.de
push dateThu, 02 Sep 2010 14:59:56 +0000
treeherdercomm-central@952f741db45e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMnyromyr, Neil
bugs465116
Bug 465116 - Move to Trash now marks as read. Add pref mailnews.ui.deleteMarksRead to allow restoring old behavior. r=Mnyromyr sr=Neil
suite/browser/browser-prefs.js
suite/mailnews/mailWindowOverlay.js
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -304,16 +304,18 @@ pref("browser.zoom.full", true);
 pref("javascript.options.showInConsole",    true);
 
 pref("offline.startup_state",            0);
 pref("offline.send.unsent_messages",            0);
 pref("offline.download.download_messages",  0);
 
 pref("browser.formfill.expire_days",        180);
 
+pref("mailnews.ui.deleteMarksRead", true);
+
 // -- folders (Mac: these are binary aliases.)
 pref("mail.signature_file",             "");
 pref("mail.directory",                  "");
 pref("news.directory",                  "");
 pref("spellchecker.dictionaries.download.url", "chrome://branding/locale/brand.properties");
 
 // this will automatically enable inline spellchecking (if it is available) for
 // editable elements in HTML
--- a/suite/mailnews/mailWindowOverlay.js
+++ b/suite/mailnews/mailWindowOverlay.js
@@ -1040,20 +1040,22 @@ function MsgGetNextNMessages()
       if(folder) {
         GetNextNMessages(folder);
       }
   }
 }
 
 function MsgDeleteMessage(aReallyDelete)
 {
-  // if the user deletes a message before its mark as read timer goes off,
-  // we should mark it as read this ensures that we clear the biff indicator
-  // from the system tray when the user deletes the new message
-  MarkSelectedMessagesRead(true);
+  // If the user deletes a message before its mark as read timer goes off,
+  // we should mark it as read (unless the user changed the pref). This
+  // ensures that we clear the biff indicator from the system tray when
+  // the user deletes the new message.
+  if (pref.getBoolPref("mailnews.ui.deleteMarksRead"))
+    MarkSelectedMessagesRead(true);
   SetNextMessageAfterDelete();
 
   // determine if we're using the IMAP delete model
   var server = GetFirstSelectedMsgFolder().server;
   const kIMAPDelete = Components.interfaces.nsMsgImapDeleteModels.IMAPDelete;
   var imapDeleteModelUsed = server instanceof Components.interfaces.nsIImapIncomingServer &&
                             server.deleteModel == kIMAPDelete;