Bug 397197 - Logically group items on "junk settings" panel, add indents and descriptions. r=IanN, r=mconley, ui-r=bwinton
authoraceman <acelists@atlas.sk>
Tue, 24 Apr 2012 19:20:09 -0400
changeset 10006 6e2296b9590e92cec52bebc7fbe28afefd2f9545
parent 10005 3fb688e2aef2b84c5b86025d4f11d2fb83ffc41f
child 10007 80d1345ca6794943f45f910a26fae0b8b868aa8c
push id7616
push userryanvm@gmail.com
push dateTue, 24 Apr 2012 23:22:45 +0000
treeherdercomm-central@2f9a803068eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, mconley, bwinton
bugs397197
Bug 397197 - Logically group items on "junk settings" panel, add indents and descriptions. r=IanN, r=mconley, ui-r=bwinton
mail/locales/en-US/chrome/messenger/am-junk.dtd
mail/themes/pinstripe/mail/accountManage.css
mailnews/base/prefs/content/am-junk.xul
suite/locales/en-US/chrome/mailnews/pref/am-junk.dtd
--- a/mail/locales/en-US/chrome/messenger/am-junk.dtd
+++ b/mail/locales/en-US/chrome/messenger/am-junk.dtd
@@ -1,20 +1,24 @@
 <!ENTITY junkSettings.label "Junk Settings">
-<!ENTITY trainingWarning.label "If enabled, you must first train &brandShortName; to identify junk mail by using the Junk toolbar button to mark messages as junk or not. You need to identify both junk and non junk messages.">
+<!ENTITY trainingDescription.label "If enabled, you must first train &brandShortName; to identify junk mail by using the Junk toolbar button to mark messages as junk or not. You need to identify both junk and non junk messages. After that &brandShortName; will be able to mark junk automatically.">
 <!ENTITY level.label "Enable adaptive junk mail controls for this account">
 <!ENTITY level.accesskey "E">
 
 <!ENTITY move.label "Move new junk messages to:">
 <!ENTITY move.accesskey "M">
 <!ENTITY junkFolderOn.label "&quot;Junk&quot; folder on:">
 <!ENTITY junkFolderOn.accesskey "J">
 <!ENTITY otherFolder.label "Other:">
 <!ENTITY otherFolder.accesskey "O">
 <!ENTITY purge1.label "Automatically delete junk mail older than">
 <!ENTITY purge1.accesskey "u">
 <!ENTITY purge2.label "days">
 
-<!ENTITY whitelist.label "Do not mark mail as junk if the sender is in: ">
+<!ENTITY whitelistHeader.label "Do not automatically mark mail as junk if the sender is in: ">
 <!ENTITY whitelist.accesskey "D">
 
+<!ENTITY ispHeadersWarning.label "If enabled, &brandShortName; will automatically consider messages marked by this external classifier as junk.">
 <!ENTITY ispHeaders.label "Trust junk mail headers set by: ">
 <!ENTITY ispHeaders.accesskey "T">
+
+<!ENTITY junkClassification.label "Selection">
+<!ENTITY junkActions.label "Destination and Retention">
--- a/mail/themes/pinstripe/mail/accountManage.css
+++ b/mail/themes/pinstripe/mail/accountManage.css
@@ -76,15 +76,15 @@
 treechildren::-moz-tree-cell-text(isDefaultServer-true) {
   font-weight: bold;
 }
 
 button:not(.spinbuttons-button):not(.dialog-button) {
   min-height: 19px; /* aqua size for small buttons */
 }
 
-page > description {
-     margin: 4px 4px 8px;
+description {
+  margin: 4px 4px 8px;
 }
 
 #archiveTree > treechildren {
   background-color: #FFFFFF;
 }
--- a/mailnews/base/prefs/content/am-junk.xul
+++ b/mailnews/base/prefs/content/am-junk.xul
@@ -36,21 +36,21 @@
    - ***** END LICENSE BLOCK ***** 
 -->
 
 <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/folderMenus.css" type="text/css"?>
 
 <!DOCTYPE window [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
+<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 %brandDTD;
-<!ENTITY % junkMailDTD SYSTEM "chrome://messenger/locale/am-junk.dtd" >
+<!ENTITY % junkMailDTD SYSTEM "chrome://messenger/locale/am-junk.dtd">
 %junkMailDTD;
-<!ENTITY % pickerDTD SYSTEM "chrome://messenger/locale/msgFolderPickerOverlay.dtd" >
+<!ENTITY % pickerDTD SYSTEM "chrome://messenger/locale/msgFolderPickerOverlay.dtd">
 %pickerDTD;
 ]>
 
 <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       xmlns:nc="http://home.netscape.com/NC-rdf#"
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       title="&junkSettings.label;"
       onload="parent.onPanelLoaded('am-junk.xul');">
@@ -59,105 +59,199 @@
     <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
     <script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-junk.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-prefs.js"/>
     <script type="application/javascript" src="chrome://messenger/content/amUtils.js"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
     <dialogheader title="&junkSettings.label;"/>
-    <description width="1">&trainingWarning.label;</description>
-    <separator class="thin"/>
 
-    <broadcaster id="broadcaster_moveMode"/>
+    <groupbox>
+      <caption label="&junkClassification.label;"/>
+
+      <broadcaster id="broadcaster_moveMode"/>
 
-    <label hidden="true"  id="server.spamLevel"
-           wsm_persist="true" pref="true" preftype="int" prefattribute="value" genericattr="true"
-           prefstring="mail.server.%serverkey%.spamLevel"/>
-    <label hidden="true" id="server.spamActionTargetAccount" 
-           wsm_persist="true" pref="true" preftype="string" prefattribute="value" genericattr="true"
-           prefstring="mail.server.%serverkey%.spamActionTargetAccount"/>
-    <label hidden="true" id="server.spamActionTargetFolder" 
-           wsm_persist="true" pref="true" preftype="string" prefattribute="value" genericattr="true"
-           prefstring="mail.server.%serverkey%.spamActionTargetFolder"/>
-    <label hidden="true" id="server.whiteListAbURI" 
-           wsm_persist="true" pref="true" preftype="string" prefattribute="value" genericattr="true"
-           prefstring="mail.server.%serverkey%.whiteListAbURI"/>
-    <label hidden="true" id="server.serverFilterName" 
-           wsm_persist="true" pref="true" preftype="string" prefattribute="value" genericattr="true"
-           prefstring="mail.server.%serverkey%.serverFilterName"/>         
+      <label hidden="true"
+             id="server.spamLevel"
+             wsm_persist="true"
+             pref="true"
+             preftype="int"
+             prefattribute="value"
+             genericattr="true"
+             prefstring="mail.server.%serverkey%.spamLevel"/>
+      <label hidden="true"
+             id="server.spamActionTargetAccount"
+             wsm_persist="true"
+             pref="true"
+             preftype="string"
+             prefattribute="value"
+             genericattr="true"
+             prefstring="mail.server.%serverkey%.spamActionTargetAccount"/>
+      <label hidden="true"
+             id="server.spamActionTargetFolder"
+             wsm_persist="true"
+             pref="true"
+             preftype="string"
+             prefattribute="value"
+             genericattr="true"
+             prefstring="mail.server.%serverkey%.spamActionTargetFolder"/>
+      <label hidden="true"
+             id="server.whiteListAbURI"
+             wsm_persist="true"
+             pref="true"
+             preftype="string"
+             prefattribute="value"
+             genericattr="true"
+             prefstring="mail.server.%serverkey%.whiteListAbURI"/>
+      <label hidden="true"
+             id="server.serverFilterName"
+             wsm_persist="true"
+             pref="true"
+             preftype="string"
+             prefattribute="value"
+             genericattr="true"
+             prefstring="mail.server.%serverkey%.serverFilterName"/>
 
-    <checkbox id="spamLevel" oncommand="updateSpamLevel();"
-              accesskey="&level.accesskey;"  label="&level.label;"/>
-    <separator class="thin"/>
+      <checkbox id="spamLevel"
+                oncommand="updateSpamLevel();"
+                accesskey="&level.accesskey;"
+                label="&level.label;"/>
 
-    <checkbox hidden="true" id="server.useWhiteList"
-              genericattr="true" pref="true" wsm_persist="true" preftype="bool"
-              prefstring="mail.server.%serverkey%.useWhiteList"/>
-    <label value="&whitelist.label;" accesskey="&whitelist.accesskey;"
-           control="whiteListAbURI"/>
-    <listbox id="whiteListAbURI" rows="5"/>
+      <separator class="thin"/>
+
+      <description width="1">&trainingDescription.label;</description>
+
+      <separator class="thin"/>
+      <spacer height="3"/>
 
-    <vbox>
-      <hbox>
-        <checkbox id="server.useServerFilter" label="&ispHeaders.label;"
-                  accesskey="&ispHeaders.accesskey;"
-                  genericattr="true" pref="true" wsm_persist="true" preftype="bool"
-                  oncommand="onServerFilterToggle(this.checked);"
-                  prefstring="mail.server.%serverkey%.useServerFilter"/>
-        <menulist id="useServerFilterList" oncommand="onServerFilterListChange();"
-                  aria-labelledby="server.useServerFilter"/>
-      </hbox>
-    </vbox>
+      <vbox class="indent">
+        <checkbox hidden="true"
+                  id="server.useWhiteList"
+                  genericattr="true"
+                  pref="true"
+                  wsm_persist="true"
+                  preftype="bool"
+                  prefstring="mail.server.%serverkey%.useWhiteList"/>
+        <label value="&whitelistHeader.label;"
+               accesskey="&whitelist.accesskey;"
+               control="whiteListAbURI"/>
+        <listbox id="whiteListAbURI" rows="5"/>
+      </vbox>
+
+      <separator class="thin"/>
+
+      <vbox>
+        <hbox>
+          <checkbox id="server.useServerFilter"
+                    label="&ispHeaders.label;"
+                    accesskey="&ispHeaders.accesskey;"
+                    genericattr="true"
+                    pref="true"
+                    wsm_persist="true"
+                    preftype="bool"
+                    oncommand="onServerFilterToggle(this.checked);"
+                    prefstring="mail.server.%serverkey%.useServerFilter"/>
+          <menulist id="useServerFilterList"
+                    oncommand="onServerFilterListChange();"
+                    aria-labelledby="server.useServerFilter"/>
+        </hbox>
+      </vbox>
+
+      <separator class="thin"/>
 
-    <checkbox id="server.moveOnSpam" label="&move.label;" accesskey="&move.accesskey;"
-              oncommand="updateMoveTargetMode(this.checked);"
-              wsm_persist="true" pref="true" preftype="bool" genericattr="true"
-              prefstring="mail.server.%serverkey%.moveOnSpam"/>
+      <description width="1">&ispHeadersWarning.label;</description>
+
+    </groupbox>
+
+    <groupbox>
+      <caption label="&junkActions.label;"/>
 
-    <radiogroup id="server.moveTargetMode"
-                aria-labelledby="server.moveOnSpam"
-                prefstring="mail.server.%serverkey%.moveTargetMode"
-                wsm_persist="true" pref="true" preftype="int" genericattr="true"
-                prefvalue="value">
+      <checkbox id="server.moveOnSpam"
+                label="&move.label;"
+                accesskey="&move.accesskey;"
+                oncommand="updateMoveTargetMode(this.checked);"
+                wsm_persist="true"
+                pref="true"
+                preftype="bool"
+                genericattr="true"
+                prefstring="mail.server.%serverkey%.moveOnSpam"/>
+
+      <radiogroup id="server.moveTargetMode"
+                  aria-labelledby="server.moveOnSpam"
+                  prefstring="mail.server.%serverkey%.moveTargetMode"
+                  wsm_persist="true"
+                  pref="true"
+                  preftype="int"
+                  genericattr="true"
+                  prefvalue="value">
 
-      <grid class="specialFolderPickerGrid indent">
-        <columns>
-          <column/>
-          <column flex="1"/>
-        </columns>
-        <rows>
-          <row>
-            <radio id="moveTargetMode0" value="0" label="&junkFolderOn.label;"
-                   accesskey="&junkFolderOn.accesskey;" observes="broadcaster_moveMode"/>
-            <menulist id="actionTargetAccount" observes="broadcaster_moveMode"
-                      aria-labelledby="moveTargetMode0"
-                      oncommand="onActionTargetChange(event, 'server.spamActionTargetAccount');">
-              <menupopup id="actionAccountPopup" type="folder"
-                         class="menulist-menupopup"
-                         expandFolders="false" mode="filing"/>
-            </menulist>
-          </row>
-          <row>
-            <radio id="moveTargetMode1" value="1" label="&otherFolder.label;"
-                   accesskey="&otherFolder.accesskey;" observes="broadcaster_moveMode"/>
-            <menulist id="actionTargetFolder" observes="broadcaster_moveMode"
-                      aria-labelledby="moveTargetMode1"
-                      oncommand="onActionTargetChange(event, 'server.spamActionTargetFolder');">
-              <menupopup id="actionFolderPopup" type="folder" mode="junk"
-                         showFileHereLabel="true"
-                         fileHereLabel="&filemessageschoosethis.label;"/>
-            </menulist>
-          </row>
-        </rows>
-      </grid>
-    </radiogroup>
+        <grid class="specialFolderPickerGrid indent">
+          <columns>
+            <column/>
+            <column flex="1"/>
+          </columns>
+          <rows>
+            <row>
+              <radio id="moveTargetMode0"
+                     value="0"
+                     label="&junkFolderOn.label;"
+                     accesskey="&junkFolderOn.accesskey;"
+                     observes="broadcaster_moveMode"/>
+              <menulist id="actionTargetAccount"
+                        observes="broadcaster_moveMode"
+                        aria-labelledby="moveTargetMode0"
+                        oncommand="onActionTargetChange(event, 'server.spamActionTargetAccount');">
+                <menupopup id="actionAccountPopup"
+                           type="folder"
+                           class="menulist-menupopup"
+                           expandFolders="false"
+                           mode="filing"/>
+              </menulist>
+            </row>
+            <row>
+              <radio id="moveTargetMode1"
+                     value="1"
+                     label="&otherFolder.label;"
+                     accesskey="&otherFolder.accesskey;"
+                     observes="broadcaster_moveMode"/>
+              <menulist id="actionTargetFolder"
+                        observes="broadcaster_moveMode"
+                        aria-labelledby="moveTargetMode1"
+                        oncommand="onActionTargetChange(event, 'server.spamActionTargetFolder');">
+                <menupopup id="actionFolderPopup"
+                           type="folder"
+                           mode="junk"
+                           showFileHereLabel="true"
+                           fileHereLabel="&filemessageschoosethis.label;"/>
+              </menulist>
+            </row>
+          </rows>
+        </grid>
+      </radiogroup>
 
-    <hbox align="center" class="indent">
-      <checkbox id="server.purgeSpam" genericattr="true" pref="true" wsm_persist="true" preftype="bool"
-                prefstring="mail.server.%serverkey%.purgeSpam" accesskey="&purge1.accesskey;" label="&purge1.label;"/>
-      <textbox  size="3" id="server.purgeSpamInterval" genericattr="true" pref="true" wsm_persist="true" preftype="int"
-                aria-labelledby="server.purgeSpam server.purgeSpamInterval purgeLabel"
-                prefstring="mail.server.%serverkey%.purgeSpamInterval"/>
-      <label id="purgeLabel" value="&purge2.label;" observes="broadcaster_moveMode" control="server.purgeSpamInterval"/>
-    </hbox>
+      <hbox align="center" class="indent">
+        <checkbox id="server.purgeSpam"
+                  genericattr="true"
+                  pref="true"
+                  wsm_persist="true"
+                  preftype="bool"
+                  prefstring="mail.server.%serverkey%.purgeSpam"
+                  accesskey="&purge1.accesskey;"
+                  label="&purge1.label;"/>
+        <textbox size="3"
+                 id="server.purgeSpamInterval"
+                 genericattr="true"
+                 pref="true"
+                 wsm_persist="true"
+                 preftype="int"
+                 aria-labelledby="server.purgeSpam server.purgeSpamInterval purgeLabel"
+                 prefstring="mail.server.%serverkey%.purgeSpamInterval"/>
+        <label id="purgeLabel"
+               value="&purge2.label;"
+               observes="broadcaster_moveMode"
+               control="server.purgeSpamInterval"/>
+      </hbox>
+
+    </groupbox>
+
   </vbox>
 </page>
--- a/suite/locales/en-US/chrome/mailnews/pref/am-junk.dtd
+++ b/suite/locales/en-US/chrome/mailnews/pref/am-junk.dtd
@@ -1,20 +1,24 @@
 <!ENTITY junkSettings.label "Junk Settings">
-<!ENTITY trainingWarning.label "If enabled, you must first train &brandShortName; to identify junk mail by using the Junk toolbar button to mark messages as junk or not. You need to identify both junk and non junk messages.">
+<!ENTITY trainingDescription.label "If enabled, you must first train &brandShortName; to identify junk mail by using the Junk toolbar button to mark messages as junk or not. You need to identify both junk and non junk messages. After that &brandShortName; will be able to mark junk automatically.">
 <!ENTITY level.label "Enable adaptive junk mail controls for this account">
 <!ENTITY level.accesskey "E">
 
 <!ENTITY move.label "Move new junk messages to:">
 <!ENTITY move.accesskey "M">
 <!ENTITY junkFolderOn.label "&quot;Junk&quot; folder on:">
 <!ENTITY junkFolderOn.accesskey "J">
 <!ENTITY otherFolder.label "Other:">
 <!ENTITY otherFolder.accesskey "O">
 <!ENTITY purge1.label "Automatically delete junk mail older than">
 <!ENTITY purge1.accesskey "u">
 <!ENTITY purge2.label "days">
 
-<!ENTITY whitelist.label "Do not mark mail as junk if the sender is in: ">
+<!ENTITY whitelistHeader.label "Do not automatically mark mail as junk if the sender is in: ">
 <!ENTITY whitelist.accesskey "D">
 
+<!ENTITY ispHeadersWarning.label "If enabled, &brandShortName; will automatically consider messages marked by this external classifier as junk.">
 <!ENTITY ispHeaders.label "Trust junk mail headers set by: ">
 <!ENTITY ispHeaders.accesskey "T">
+
+<!ENTITY junkClassification.label "Selection">
+<!ENTITY junkActions.label "Destination and Retention">