Bug 326584 - "Message Aging: clean up UI, remove "Always delete read messages" checkbox" [r=Standard8,sr=Neil,ui-review=clarkbw]
authorrsx11m <rsx11m.pub@gmail.com>
Fri, 19 Jun 2009 12:35:45 +0100
changeset 2886 173f8884efed958fadb3d55ac87738ce820cb64d
parent 2885 1ba2d6e21cbf9446c547d04779e0f4e374d28b7d
child 2887 64aaeb609c9a07df347319fb879e8b4ab13bf5d6
push idunknown
push userunknown
push dateunknown
reviewersStandard8, Neil
bugs326584
Bug 326584 - "Message Aging: clean up UI, remove "Always delete read messages" checkbox" [r=Standard8,sr=Neil,ui-review=clarkbw]
mail/locales/en-US/chrome/messenger/am-offline.dtd
mail/locales/en-US/chrome/messenger/folderProps.dtd
mailnews/base/prefs/resources/content/am-offline.js
mailnews/base/prefs/resources/content/am-offline.xul
mailnews/base/resources/content/folderProps.xul
suite/locales/en-US/chrome/common/help/mail_help.xhtml
suite/locales/en-US/chrome/mailnews/folderProps.dtd
suite/locales/en-US/chrome/mailnews/pref/am-offline.dtd
--- a/mail/locales/en-US/chrome/messenger/am-offline.dtd
+++ b/mail/locales/en-US/chrome/messenger/am-offline.dtd
@@ -13,22 +13,22 @@
 <!ENTITY nntpDownloadMsg.accesskey "e">
 <!ENTITY retentionCleanup.label "To recover disk space, old messages can be permanently deleted.">
 <!ENTITY retentionCleanupImap.label "To recover disk space, old messages can be permanently deleted, both local copies and originals on the remote server.">
 <!ENTITY retentionCleanupPop.label "To recover disk space, old messages can be permanently deleted, including originals on the remote server.">
 <!ENTITY retentionKeepMsg.label "Delete messages more than">
 <!ENTITY retentionKeepMsg.accesskey "t">
 <!ENTITY retentionKeepAll.label "Don't delete any messages">
 <!ENTITY retentionKeepAll.accesskey "n">
-<!ENTITY retentionKeepNew.label "Delete all but the last">
-<!ENTITY retentionKeepNew.accesskey "b">
-<!ENTITY retentionKeepUnread.label "Always delete read messages">
-<!ENTITY retentionKeepUnread.accesskey "w">
+<!ENTITY retentionKeepRecent.label "Delete all but the most recent">
+<!ENTITY retentionKeepRecent.accesskey "b">
+<!-- LOCALIZATION NOTE: Unhide with .keepUnreadOnly { display: -moz-box; } -->
+<!ENTITY retentionKeepUnreadHidden.label "Always delete read messages (overrides age settings)">
 <!ENTITY retentionApplyToFlagged.label "Always keep starred messages">
 <!ENTITY retentionApplyToFlagged.accesskey "k">
-<!ENTITY nntpRemoveBody.label "Only message bodies less than">
-<!ENTITY nntpRemoveBody.accesskey "O">
+<!ENTITY nntpRemoveMsgBody.label "Remove bodies from messages more than">
+<!ENTITY nntpRemoveMsgBody.accesskey "o">
 <!ENTITY offlineSelectNntp.label "Select newsgroups for offline use…">
 <!ENTITY offlineSelectNntp.accesskey "S">
 <!ENTITY offlineImapAdvancedOffline.label "Advanced…">
 <!ENTITY offlineImapAdvancedOffline.accesskey "v">
 <!ENTITY syncGroupTitle.label "Message Synchronizing">
 <!ENTITY diskspaceGroupTitle.label "Disk Space">
--- a/mail/locales/en-US/chrome/messenger/folderProps.dtd
+++ b/mail/locales/en-US/chrome/messenger/folderProps.dtd
@@ -56,20 +56,20 @@
 <!ENTITY message.label "messages">
 <!ENTITY retentionCleanup.label "To recover disk space, old messages can be permanently deleted.">
 <!ENTITY retentionCleanupImap.label "To recover disk space, old messages can be permanently deleted, both local copies and originals on the remote server.">
 <!ENTITY retentionCleanupPop.label "To recover disk space, old messages can be permanently deleted, including originals on the remote server.">
 <!ENTITY retentionDeleteMsg.label "Delete messages more than">
 <!ENTITY retentionDeleteMsg.accesskey "m">
 <!ENTITY retentionKeepAll.label "Don't delete any messages">
 <!ENTITY retentionKeepAll.accesskey "A">
-<!ENTITY retentionKeepNew.label "Delete all but the last">
-<!ENTITY retentionKeepNew.accesskey "l">
-<!ENTITY retentionKeepUnread.label "Always delete read messages">
-<!ENTITY retentionKeepUnread.accesskey "r">
+<!ENTITY retentionKeepRecent.label "Delete all but the most recent">
+<!ENTITY retentionKeepRecent.accesskey "l">
+<!-- LOCALIZATION NOTE: Unhide with .keepUnreadOnly { display: -moz-box; } -->
+<!ENTITY retentionKeepUnreadHidden.label "Always delete read messages (overrides age settings)">
 <!ENTITY retentionApplyToFlagged.label "Always keep starred messages">
 <!ENTITY retentionApplyToFlagged.accesskey "e">
 
 <!ENTITY folderSynchronizationTab.label          "Synchronization">
 <!ENTITY folderCheckForNewMessages.label         "Check this folder for new messages">
 <!ENTITY folderCheckForNewMessages.accesskey     "C">
 
 <!ENTITY offlineFolder.check.label               "Select this folder for offline use">
--- a/mailnews/base/prefs/resources/content/am-offline.js
+++ b/mailnews/base/prefs/resources/content/am-offline.js
@@ -128,18 +128,16 @@ function onPreInit(account, accountValue
     if (gServerType == "pop3")
     {
       var pop3Server = gIncomingServer.QueryInterface(Components.interfaces.nsIPop3IncomingServer);
       // hide retention settings for deferred accounts
       if (pop3Server.deferredToAccount.length)
       {
         var retentionRadio = document.getElementById("retention.keepMsg");
         retentionRadio.setAttribute("hidden", "true");
-        var retentionCheckbox = document.getElementById("retention.keepUnread");
-        retentionCheckbox.setAttribute("hidden", "true");
         var retentionLabel = document.getElementById("retentionDescriptionPop");
         retentionLabel.setAttribute("hidden", "true");
         var applyToFlaggedCheckbox = document.getElementById("retention.applyToFlagged");
         applyToFlaggedCheckbox.setAttribute("hidden", "true");
       }
     }
 }
 
--- a/mailnews/base/prefs/resources/content/am-offline.xul
+++ b/mailnews/base/prefs/resources/content/am-offline.xul
@@ -116,18 +116,18 @@
     <label id="retentionDescription" hidefor="imap,pop3" class="desc" control="retention.keepMsg">&retentionCleanup.label;</label>
     <label id="retentionDescriptionImap" hidefor="movemail,pop3,nntp,none,rss" class="desc" control="retention.keepMsg">&retentionCleanupImap.label;</label>
     <label id="retentionDescriptionPop" hidefor="movemail,imap,nntp,none,rss" class="desc" control="retention.keepMsg">&retentionCleanupPop.label;</label>
 
     <radiogroup wsm_persist="true" hidefor="" id="retention.keepMsg" class="indent">
         <radio wsm_persist="true" id="retention.keepAllMsg" value="1" accesskey="&retentionKeepAll.accesskey;"
             label="&retentionKeepAll.label;" oncommand="onCheckKeepMsg();"/>
         <hbox flex="1" align="center">
-            <radio wsm_persist="true" id="retention.keepNewMsg" accesskey="&retentionKeepNew.accesskey;" 
-                value="3" label="&retentionKeepNew.label;" oncommand="onCheckKeepMsg();"/>
+            <radio wsm_persist="true" id="retention.keepNewMsg" accesskey="&retentionKeepRecent.accesskey;" 
+                value="3" label="&retentionKeepRecent.label;" oncommand="onCheckKeepMsg();"/>
             <textbox wsm_persist="true" id="retention.keepNewMsgMin"
                      type="number" min="1" increment="10" size="4" value="2000"
                      aria-labelledby="retention.keepNewMsg retention.keepNewMsgMin newMsgLabel"/>
             <label value="&message.label;" control="retention.keepNewMsgMin" id="newMsgLabel"/>
         </hbox>
         <hbox flex="1" align="center">
             <radio wsm_persist="true" id="retention.keepOldMsg" accesskey="&retentionKeepMsg.accesskey;"
                 value="2" label="&retentionKeepMsg.label;" oncommand="onCheckKeepMsg();"/>
@@ -136,28 +136,28 @@
                      aria-labelledby="retention.keepOldMsg retention.keepOldMsgMin oldMsgLabel"/>
             <label value="&daysOld.label;" control="retention.keepOldMsgMin" id="oldMsgLabel"/>
         </hbox>
     </radiogroup>
 
     <hbox align="center" class="indent">
       <vbox>
         <checkbox id="retention.keepUnread" wsm_persist="true"
-                  label="&retentionKeepUnread.label;"
-                  accesskey="&retentionKeepUnread.accesskey;"
+                  label="&retentionKeepUnreadHidden.label;"
+                  class="keepUnreadOnly" hidden="true"
                   checked="false"/>
         <checkbox id="retention.applyToFlagged" wsm_persist="true"
-                  label="&retentionApplyToFlagged.label;"
+                  label="&retentionApplyToFlagged.label;" hidefor=""
                   accesskey="&retentionApplyToFlagged.accesskey;"
                   checked="true"/>
       </vbox>
     </hbox>
     <hbox align="center" class="indent" hidefor="movemail,pop3,imap,none,rss">
-        <checkbox wsm_persist="true" id="nntp.removeBody" accesskey="&nntpRemoveBody.accesskey;"
-                  label="&nntpRemoveBody.label;" oncommand="onCheckItem('nntp.removeBodyMin','nntp.removeBody');"/>
+        <checkbox wsm_persist="true" id="nntp.removeBody" accesskey="&nntpRemoveMsgBody.accesskey;"
+                  label="&nntpRemoveMsgBody.label;" oncommand="onCheckItem('nntp.removeBodyMin','nntp.removeBody');"/>
         <textbox wsm_persist="true" id="nntp.removeBodyMin" size="2" value="30"
                  type="number" min="1"
                  aria-labelledby="nntp.removeBody nntp.removeBodyMin daysOldMsg"/>
         <label value="&daysOld.label;" control="nntp.removeBodyMin" id="daysOldMsg"/>
     </hbox>
     </vbox>
     </groupbox>
 </page>
--- a/mailnews/base/resources/content/folderProps.xul
+++ b/mailnews/base/resources/content/folderProps.xul
@@ -121,18 +121,18 @@
               label="&retentionUseDefault.label;" checked="true" oncommand="onUseDefaultRetentionSettings()"/>
         </hbox>
         <vbox class="indent">
           <hbox class="indent">
             <radiogroup wsm_persist="true" id="retention.keepMsg" aria-labelledby="retention.useDefault">
               <radio wsm_persist="true" value="1" accesskey="&retentionKeepAll.accesskey;"
                       label="&retentionKeepAll.label;" oncommand="onCheckKeepMsg();"/>
               <hbox flex="1" align="center">
-                <radio wsm_persist="true" id="keepNewMsg" accesskey="&retentionKeepNew.accesskey;" 
-                        value="3" label="&retentionKeepNew.label;" oncommand="onCheckKeepMsg();"/>
+                <radio wsm_persist="true" id="keepNewMsg" accesskey="&retentionKeepRecent.accesskey;" 
+                        value="3" label="&retentionKeepRecent.label;" oncommand="onCheckKeepMsg();"/>
                 <textbox wsm_persist="true" id="retention.keepNewMsgMin"
                          type="number" min="1" increment="10" size="4" value="2000"
                          aria-labelledby="keepNewMsg retention.keepNewMsgMin retention.keepNewMsgMinLabel"/>
                 <label value="&message.label;" control="retention.keepNewMsgMin" id="retention.keepNewMsgMinLabel"/>
               </hbox>
               <hbox flex="1" align="center">
                 <radio wsm_persist="true" id="keepMsg" accesskey="&retentionDeleteMsg.accesskey;"
                         value="2" label="&retentionDeleteMsg.label;" oncommand="onCheckKeepMsg();"/>
@@ -141,18 +141,18 @@
                          aria-labelledby="keepMsg retention.keepOldMsgMin retention.keepOldMsgMinLabel"/>
                 <label value="&daysOld.label;" control="retention.keepOldMsgMin" id="retention.keepOldMsgMinLabel"/>
               </hbox>
             </radiogroup>
           </hbox>
           <hbox class="indent">
             <vbox>
               <checkbox id="retention.keepUnread" wsm_persist="true"
-                        label="&retentionKeepUnread.label;"
-                        accesskey="&retentionKeepUnread.accesskey;"
+                        label="&retentionKeepUnreadHidden.label;"
+                        class="keepUnreadOnly" hidden="true"
                         observes="retention.keepMsg" checked="false"/>
               <checkbox id="retention.applyToFlagged" wsm_persist="true"
                         label="&retentionApplyToFlagged.label;"
                         accesskey="&retentionApplyToFlagged.accesskey;"
                         observes="retention.keepMsg" checked="true"/>
             </vbox>
           </hbox>
         </vbox>
--- a/suite/locales/en-US/chrome/common/help/mail_help.xhtml
+++ b/suite/locales/en-US/chrome/common/help/mail_help.xhtml
@@ -4103,36 +4103,35 @@ to filter unwanted mail, and how phishin
 
 <p>&brandShortName; can automatically delete old messages for you. You
   can configure this process with the options listed below
   <strong>To recover disk space, old messages can be permanently
   deleted</strong>:</p>
 
 <ul>
   <li><strong>Don't delete any messages</strong>: Keep all messages. Never
-    delete messages automatically.</li>
-  <li><strong>Delete all but the last [__] messages</strong>: Enter the number
-    of messages to keep. With this setting only messages older than these
+    delete messages automatically based on their age.</li>
+  <li><strong>Delete all but the most recent [__] messages</strong>: Enter the
+    number of messages to keep. With this setting only messages older than these
     messages are deleted.</li>
   <li><strong>Delete messages more than [__] days old </strong>:
     Keep all messages that arrived within the given number of days.</li>
 </ul>
 
 <p>With the following settings you can further constrain the three options to
   delete messages automatically. This is especially useful in combination with
   the option to keep all messages.</p> 
 
 <ul>
-  <li><strong>Always delete read messages</strong>: Select this option to
-    remove read messages.</li>
   <li><strong>Always keep flagged messages</strong>: Use this option to deny
     &brandShortName; to delete any messages you have flagged.</li>
-  <li><strong>Only message bodies less than [__] days old</strong>: Select this
-    option to deny &brandShortName; the deletion of messages that are newer
-    than the number of days you specify here (news accounts only).</li>
+  <li><strong>Remove bodies from message more than [__] days old</strong>:
+    Select this option to retain all headers but to delete message bodies that
+    are older than the number of days you specify here (news accounts only).
+    Any option to delete the entire message based on age still applies.</li>
 </ul>
 
 <p>This policy can be overridden for an individual folder in the Folder
   Properties, Retention Policy tab.</p>
 
 <p><strong>Note:</strong> If message synchronization is enabled (for IMAP), or
   messages are left on the server for POP accounts), the settings apply to
   <em>both</em> local copies and their originals on the server.</p>
--- a/suite/locales/en-US/chrome/mailnews/folderProps.dtd
+++ b/suite/locales/en-US/chrome/mailnews/folderProps.dtd
@@ -56,20 +56,20 @@
 <!ENTITY message.label "messages">
 <!ENTITY retentionCleanup.label "Keep messages:">
 <!ENTITY retentionCleanupImap.label "Keep messages, both the local copies and their originals on the server:">
 <!ENTITY retentionCleanupPop.label "Keep messages, including their originals on the server:">
 <!ENTITY retentionDeleteMsg.label "Delete messages more than">
 <!ENTITY retentionDeleteMsg.accesskey "m">
 <!ENTITY retentionKeepAll.label "All messages">
 <!ENTITY retentionKeepAll.accesskey "A">
-<!ENTITY retentionKeepNew.label "The newest">
-<!ENTITY retentionKeepNew.accesskey "n">
-<!ENTITY retentionKeepUnread.label "Only unread messages">
-<!ENTITY retentionKeepUnread.accesskey "u">
+<!ENTITY retentionKeepRecent.label "The newest">
+<!ENTITY retentionKeepRecent.accesskey "n">
+<!-- LOCALIZATION NOTE: Unhide with .keepUnreadOnly { display: -moz-box; } -->
+<!ENTITY retentionKeepUnreadHidden.label "Always delete read messages (overrides age settings)">
 <!ENTITY retentionApplyToFlagged.label "Always keep flagged messages">
 <!ENTITY retentionApplyToFlagged.accesskey "e">
 
 <!ENTITY folderSynchronizationTab.label          "Synchronization">
 <!ENTITY folderCheckForNewMessages.label         "Check this folder for new messages">
 <!ENTITY folderCheckForNewMessages.accesskey     "C">
 
 <!ENTITY offlineFolder.check.label               "Select this folder for offline use">
--- a/suite/locales/en-US/chrome/mailnews/pref/am-offline.dtd
+++ b/suite/locales/en-US/chrome/mailnews/pref/am-offline.dtd
@@ -13,22 +13,22 @@
 <!ENTITY nntpDownloadMsg.accesskey "e">
 <!ENTITY retentionCleanup.label "To recover disk space, old messages can be permanently deleted.">
 <!ENTITY retentionCleanupImap.label "To recover disk space, old messages can be permanently deleted, both the local copies and their originals on the server.">
 <!ENTITY retentionCleanupPop.label "To recover disk space, old messages can be permanently deleted, including their originals on the server.">
 <!ENTITY retentionKeepMsg.label "Delete messages more than">
 <!ENTITY retentionKeepMsg.accesskey "t">
 <!ENTITY retentionKeepAll.label "Don't delete any messages">
 <!ENTITY retentionKeepAll.accesskey "n">
-<!ENTITY retentionKeepNew.label "Delete all but the last">
-<!ENTITY retentionKeepNew.accesskey "b">
-<!ENTITY retentionKeepUnread.label "Always delete read messages">
-<!ENTITY retentionKeepUnread.accesskey "w">
+<!ENTITY retentionKeepRecent.label "Delete all but the most recent">
+<!ENTITY retentionKeepRecent.accesskey "b">
+<!-- LOCALIZATION NOTE: Unhide with .keepUnreadOnly { display: -moz-box; } -->
+<!ENTITY retentionKeepUnreadHidden.label "Always delete read messages (overrides age settings)">
 <!ENTITY retentionApplyToFlagged.label "Always keep flagged messages">
 <!ENTITY retentionApplyToFlagged.accesskey "k">
-<!ENTITY nntpRemoveBody.label "Only message bodies less than">
-<!ENTITY nntpRemoveBody.accesskey "O">
+<!ENTITY nntpRemoveMsgBody.label "Remove bodies from messages more than">
+<!ENTITY nntpRemoveMsgBody.accesskey "o">
 <!ENTITY offlineSelectNntp.label "Select newsgroups for offline use…">
 <!ENTITY offlineSelectNntp.accesskey "S">
 <!ENTITY offlineImapAdvancedOffline.label "Advanced…">
 <!ENTITY offlineImapAdvancedOffline.accesskey "v">
 <!ENTITY syncGroupTitle.label "Message Synchronizing">
 <!ENTITY diskspaceGroupTitle.label "Disk Space">