Bug 551827 - Make a link from Junk settings in Account manager to the global options in Preferences. ui-r=bwinton, r=IanN, r=mconley
authoraceman <acelists@atlas.sk>
Wed, 19 Sep 2012 20:13:42 -0400
changeset 13675 2db3eae10e3dd971d400f34b0033ee23ccea7192
parent 13674 890b37341bbbbe2970447fdeb51230cf121a244f
child 13676 757e3706c5b1cc3d8bd583381c56517f75cc1a4f
push id762
push userbugzilla@standard8.plus.com
push dateMon, 19 Nov 2012 21:16:42 +0000
treeherdercomm-beta@4a2f61509b17 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwinton, IanN, mconley
bugs551827
Bug 551827 - Make a link from Junk settings in Account manager to the global options in Preferences. ui-r=bwinton, r=IanN, r=mconley
mail/components/preferences/security.xul
mail/locales/en-US/chrome/messenger/am-junk.dtd
mailnews/base/prefs/content/am-junk.js
mailnews/base/prefs/content/am-junk.xul
suite/locales/en-US/chrome/mailnews/pref/am-junk.dtd
--- a/mail/components/preferences/security.xul
+++ b/mail/components/preferences/security.xul
@@ -66,17 +66,17 @@
       <!-- Do Not Track -->
       <preference id="privacy.donottrackheader.enabled"
                   name="privacy.donottrackheader.enabled"
                   type="bool"/>
     </preferences>
 
     <tabbox id="securityPrefs" flex="1" onselect="gSecurityPane.tabSelectionChanged();">
       <tabs>
-        <tab label="&itemJunk.label;"/>
+        <tab id="junkTab" label="&itemJunk.label;"/>
         <tab label="&itemPhishing.label;"/>
         <tab label="&itemAntiVirus.label;"/>
         <tab label="&itemPasswords.label;"/>
         <tab label="&itemCookies.label;"/>
       </tabs>
 
       <tabpanels flex="1">
         <tabpanel orient="vertical">
--- a/mail/locales/en-US/chrome/messenger/am-junk.dtd
+++ b/mail/locales/en-US/chrome/messenger/am-junk.dtd
@@ -21,8 +21,11 @@
 <!ENTITY whitelistHeader.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">
+
+<!ENTITY globalJunkPrefs.label "Global Junk Preferences…">
+<!ENTITY globalJunkPrefs.accesskey "G">
--- a/mailnews/base/prefs/content/am-junk.js
+++ b/mailnews/base/prefs/content/am-junk.js
@@ -283,8 +283,16 @@ function buildServerFilterListFromDir(aD
         // if we've already added an item with this name, then don't add it again.
         if (ispHeaderList.getElementsByAttribute("value", fileName).item(0))
           continue;
         ispHeaderList.appendItem(fileName, fileName);
       }
     }
   }
 }
+
+/**
+ * Open the Preferences dialog on the Junk settings tab.
+ */
+function showGlobalJunkPrefs()
+{
+  openPrefsFromAccountManager("paneSecurity", "junkTab", null, "junk_pane");
+}
--- a/mailnews/base/prefs/content/am-junk.xul
+++ b/mailnews/base/prefs/content/am-junk.xul
@@ -218,10 +218,19 @@
         <label id="purgeLabel"
                value="&purge2.label;"
                observes="broadcaster_moveMode"
                control="server.purgeSpamInterval"/>
       </hbox>
 
     </groupbox>
 
+    <separator class="thin"/>
+
+    <hbox pack="start">
+      <button id="globalJunkPrefsLink"
+              label="&globalJunkPrefs.label;"
+              accesskey="&globalJunkPrefs.accesskey;"
+              oncommand="showGlobalJunkPrefs();"/>
+    </hbox>
+
   </vbox>
 </page>
--- a/suite/locales/en-US/chrome/mailnews/pref/am-junk.dtd
+++ b/suite/locales/en-US/chrome/mailnews/pref/am-junk.dtd
@@ -21,8 +21,11 @@
 <!ENTITY whitelistHeader.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">
+
+<!ENTITY globalJunkPrefs.label "Global Junk Preferences…">
+<!ENTITY globalJunkPrefs.accesskey "G">