Bug 570970 Move the Link Behaviour preferences from the tabs pane to a separate pane. r=IanN sr=Neil
authorPhilip Chee <philip.chee@gmail.com>
Fri, 25 Jun 2010 12:23:02 +0800
changeset 5896 9fb2b78003f34ab594dea3aa478f788b48643b32
parent 5895 b999fdbf21074a31160fe2af5af9c2cd24f3e972
child 5897 e4d9b646a966f1e17adc0fb279b35365ec96f39d
push idunknown
push userunknown
push dateunknown
reviewersIanN, Neil
bugs570970
Bug 570970 Move the Link Behaviour preferences from the tabs pane to a separate pane. r=IanN sr=Neil
suite/common/jar.mn
suite/common/pref/pref-links.xul
suite/common/pref/pref-tabs.xul
suite/common/pref/preferences.xul
suite/locales/en-US/chrome/common/pref/pref-links.dtd
suite/locales/en-US/chrome/common/pref/pref-tabs.dtd
suite/locales/en-US/chrome/common/pref/preferences.dtd
suite/locales/jar.mn
--- a/suite/common/jar.mn
+++ b/suite/common/jar.mn
@@ -186,16 +186,17 @@ comm.jar:
    content/communicator/pref/pref-http.xul                          (pref/pref-http.xul)
    content/communicator/pref/pref-images.xul                        (pref/pref-images.xul)
    content/communicator/pref/pref-keynav.js                         (pref/pref-keynav.js)
    content/communicator/pref/pref-keynav.xul                        (pref/pref-keynav.xul)
    content/communicator/pref/pref-languages.js                      (pref/pref-languages.js)
    content/communicator/pref/pref-languages.xul                     (pref/pref-languages.xul)
    content/communicator/pref/pref-languages-add.xul                 (pref/pref-languages-add.xul)
    content/communicator/pref/pref-languages-add.js                  (pref/pref-languages-add.js)
+   content/communicator/pref/pref-links.xul                         (pref/pref-links.xul)
    content/communicator/pref/pref-locationbar.js                    (pref/pref-locationbar.js)
    content/communicator/pref/pref-locationbar.xul                   (pref/pref-locationbar.xul)
    content/communicator/pref/pref-mousewheel.js                     (pref/pref-mousewheel.js)
    content/communicator/pref/pref-mousewheel.xul                    (pref/pref-mousewheel.xul)
    content/communicator/pref/pref-navigator.js                      (pref/pref-navigator.js)
    content/communicator/pref/pref-navigator.xul                     (pref/pref-navigator.xul)
    content/communicator/pref/pref-offline.xul                       (pref/pref-offline.xul)
    content/communicator/pref/pref-passwords.xul                     (pref/pref-passwords.xul)
new file mode 100644
--- /dev/null
+++ b/suite/common/pref/pref-links.xul
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Version: MPL 1.1/GPL 2.0/LGPL 2.1
+
+ The contents of this file are subject to the Mozilla Public License Version
+ 1.1 (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS" basis,
+ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ for the specific language governing rights and limitations under the
+ License.
+
+ The Original Code is Mozilla Communicator client code, released
+ March 31, 1998.
+
+ The Original Code is SeaMonkey preferences code.
+
+ The Initial Developer of the Original Code is the SeaMonkey project.
+ Portions created by the Initial Developer are Copyright (C) 2010
+ the Initial Developer. All Rights Reserved.
+
+ Contributor(s):
+   Peter Weilbacher <mozilla@Weilbacher.org>
+   Philip Chee <philip.chee@gmail.com>
+
+ Alternatively, the contents of this file may be used under the terms of
+ either of the GNU General Public License Version 2 or later (the "GPL"),
+ or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ in which case the provisions of the GPL or the LGPL are applicable instead
+ of those above. If you wish to allow use of your version of this file only
+ under the terms of either the GPL or the LGPL, and not to allow others to
+ use your version of this file under the terms of the MPL, indicate your
+ decision by deleting the provisions above and replace them with the notice
+ and other provisions required by the GPL or the LGPL. If you do not delete
+ the provisions above, a recipient may use your version of this file under
+ the terms of any one of the MPL, the GPL or the LGPL.
+
+ ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE overlay [
+<!ENTITY % platformCommunicationDTD SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd">
+%platformCommunicationDTD;
+<!ENTITY % tabsDTD SYSTEM "chrome://communicator/locale/pref/pref-links.dtd">
+%tabsDTD;
+]>
+
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+  <prefpane id="links_pane"
+            label="&linksHeader.label;">
+
+    <preferences id="links_preferences">
+      <preference id="browser.link.open_newwindow"
+                  name="browser.link.open_newwindow"
+                  type="int"/>
+      <preference id="browser.link.open_external"
+                  name="browser.link.open_external"
+                  type="int"/>
+    </preferences>
+
+    <groupbox>
+      <caption label="&newWindow.label;"/>
+      <description>&newWindowDescription.label;</description>
+      <radiogroup id="newWindowGroup"
+                  preference="browser.link.open_newwindow">
+        <radio value="1"
+               label="&openCurrent.label;"
+               accesskey="&newWindowGroupCurrent.accesskey;"/>
+        <radio value="3"
+               label="&openTab.label;"
+               accesskey="&newWindowGroupTab.accesskey;"/>
+        <radio value="2"
+               label="&openWindow.label;"
+               accesskey="&newWindowGroupWindow.accesskey;"/>
+      </radiogroup>
+    </groupbox>
+
+    <groupbox>
+      <caption label="&external.label;"/>
+      <description>&externalDescription.label;</description>
+      <radiogroup id="externalGroup"
+                  preference="browser.link.open_external">
+        <radio value="1"
+               label="&openCurrent.label;"
+               accesskey="&externalGroupCurrent.accesskey;"/>
+        <radio value="3"
+               label="&openTab.label;"
+               accesskey="&externalGroupTab.accesskey;"/>
+        <radio value="2"
+               label="&openWindow.label;"
+               accesskey="&externalGroupWindow.accesskey;"/>
+      </radiogroup>
+    </groupbox>
+  </prefpane>
+</overlay>
--- a/suite/common/pref/pref-tabs.xul
+++ b/suite/common/pref/pref-tabs.xul
@@ -66,24 +66,18 @@
                   name="browser.tabs.loadGroup"
                   type="int"/>
       <preference id="browser.tabs.opentabfor.middleclick"
                   name="browser.tabs.opentabfor.middleclick"
                   type="bool"/>
       <preference id="browser.tabs.opentabfor.urlbar"
                   name="browser.tabs.opentabfor.urlbar"
                   type="bool"/>
-      <preference id="browser.link.open_newwindow"
-                  name="browser.link.open_newwindow"
-                  type="int"/>
-      <preference id="browser.link.open_external"
-                  name="browser.link.open_external"
-                  type="int"/>
     </preferences>
-            
+
       <groupbox id="generalTabPreferences" align="start">
         <caption label="&tabDisplay.label;"/>
         <checkbox id="tabStrip"
                   label="&autoHide.label;" 
                   accesskey="&autoHide.accesskey;" 
                   preference="browser.tabs.autoHide"/>
         <checkbox id="tabBackground"
                   label="&background.label;" 
@@ -103,58 +97,22 @@
           <radio value="0"
                  label="&loadGroupAppend.label;"
                  accesskey="&loadGroupAppend.accesskey;"/>
           <radio value="1"
                  label="&loadGroupReplace.label;"
                  accesskey="&loadGroupReplace.accesskey;"/>
         </radiogroup> 
       </groupbox>
-  
+
       <groupbox id="useTabPreferences" align="start">
         <caption label="&openTabs.label;"/>
           <checkbox id="middleClick"
                     label="&middleClick.label;" 
                     accesskey="&middleClick.accesskey;" 
                     preference="browser.tabs.opentabfor.middleclick"/>
           <checkbox id="urlBar"
                     label="&urlbar.label;" 
                     accesskey="&urlbar.accesskey;" 
                     preference="browser.tabs.opentabfor.urlbar"/>
       </groupbox>
-
-      <hbox equalsize="always">
-        <groupbox flex="1">
-          <caption label="&newWindow.label;"/>
-          <description>&newWindowDescription.label;</description>
-          <radiogroup id="newWindowGroup"
-                      preference="browser.link.open_newwindow">
-            <radio value="1"
-                   label="&openCurrent.label;"
-                   accesskey="&newWindowGroupCurrent.accesskey;"/>
-            <radio value="3"
-                   label="&openTab.label;"
-                   accesskey="&newWindowGroupTab.accesskey;"/>
-            <radio value="2"
-                   label="&openWindow.label;"
-                   accesskey="&newWindowGroupWindow.accesskey;"/>
-          </radiogroup> 
-        </groupbox>
-
-        <groupbox flex="1">
-          <caption label="&external.label;"/>
-          <description>&externalDescription.label;</description>
-          <radiogroup id="externalGroup"
-                      preference="browser.link.open_external">
-            <radio value="1"
-                   label="&openCurrent.label;"
-                   accesskey="&externalGroupCurrent.accesskey;"/>
-            <radio value="3"
-                   label="&openTab.label;"
-                   accesskey="&externalGroupTab.accesskey;"/>
-            <radio value="2"
-                   label="&openWindow.label;"
-                   accesskey="&externalGroupWindow.accesskey;"/>
-          </radiogroup> 
-        </groupbox>
-      </hbox>
-   </prefpane>
+  </prefpane>
 </overlay>
--- a/suite/common/pref/preferences.xul
+++ b/suite/common/pref/preferences.xul
@@ -136,16 +136,21 @@
                     prefpane="search_pane"
                     helpTopic="navigator_pref_internet_searching"
                     url="chrome://communicator/content/pref/pref-search.xul"/>
           <treeitem id="tabsItem"
                     label="&tabWindows.label;"
                     prefpane="tabs_pane"
                     helpTopic="navigator_pref_tabbed_browsing"
                     url="chrome://communicator/content/pref/pref-tabs.xul"/>
+          <treeitem id="linksItem"
+                    label="&links.label;"
+                    prefpane="links_pane"
+                    helpTopic="navigator_pref_tabbed_browsing"
+                    url="chrome://communicator/content/pref/pref-links.xul"/>
           <treeitem id="downloadItem"
                     label="&download.label;"
                     prefpane="download_pane"
                     helpTopic="navigator_pref_downloads"
                     url="chrome://communicator/content/pref/pref-download.xul"/>
           <!-- Taking out Policies panel b/c bug 44121
           <treeitem url="chrome://communicator/content/pref/pref-policies.xul" label="&policies.label;"/>
           -->
copy from suite/locales/en-US/chrome/common/pref/pref-tabs.dtd
copy to suite/locales/en-US/chrome/common/pref/pref-links.dtd
--- a/suite/locales/en-US/chrome/common/pref/pref-tabs.dtd
+++ b/suite/locales/en-US/chrome/common/pref/pref-links.dtd
@@ -1,28 +1,17 @@
-<!ENTITY tabHeader.label "Tabbed Browsing">
-<!ENTITY tabDisplay.label "Tab Display">
-<!ENTITY autoHide.label "Hide the tab bar when only one tab is open">
-<!ENTITY autoHide.accesskey "d">
-<!ENTITY background.label "Switch to new tabs opened from links">
-<!ENTITY background.accesskey "S">
-<!ENTITY warnOnClose.label "Warn me when closing a window with multiple tabs">
-<!ENTITY warnOnClose.accesskey "n">
-<!ENTITY loadGroup.label "When opening a bookmark group">
-<!ENTITY loadGroupAppend.label "Add tabs">
-<!ENTITY loadGroupAppend.accesskey "A">
-<!ENTITY loadGroupReplace.label "Replace existing tabs">
-<!ENTITY loadGroupReplace.accesskey "R">
-<!ENTITY openTabs.label "Open tabs instead of windows for">
-
+<!ENTITY linksHeader.label "Link Behavior">
 <!ENTITY newWindow.label "Link open behavior">
 <!ENTITY newWindowDescription.label "Open links meant to open a new window in">
 <!ENTITY external.label "Links from other applications">
 <!ENTITY externalDescription.label "Open links passed from other applications in">
+
 <!ENTITY openCurrent.label "The current tab/window">
 <!ENTITY newWindowGroupCurrent.accesskey "c">
 <!ENTITY externalGroupCurrent.accesskey "u">
+
 <!ENTITY openTab.label "A new tab in the current window">
 <!ENTITY newWindowGroupTab.accesskey "t">
-<!ENTITY externalGroupTab.accesskey "e">
+<!ENTITY externalGroupTab.accesskey "a">
+
 <!ENTITY openWindow.label "A new window">
 <!ENTITY newWindowGroupWindow.accesskey "w">
 <!ENTITY externalGroupWindow.accesskey "o">
--- a/suite/locales/en-US/chrome/common/pref/pref-tabs.dtd
+++ b/suite/locales/en-US/chrome/common/pref/pref-tabs.dtd
@@ -1,28 +1,14 @@
 <!ENTITY tabHeader.label "Tabbed Browsing">
 <!ENTITY tabDisplay.label "Tab Display">
 <!ENTITY autoHide.label "Hide the tab bar when only one tab is open">
 <!ENTITY autoHide.accesskey "d">
 <!ENTITY background.label "Switch to new tabs opened from links">
 <!ENTITY background.accesskey "S">
 <!ENTITY warnOnClose.label "Warn me when closing a window with multiple tabs">
-<!ENTITY warnOnClose.accesskey "n">
+<!ENTITY warnOnClose.accesskey "W">
 <!ENTITY loadGroup.label "When opening a bookmark group">
 <!ENTITY loadGroupAppend.label "Add tabs">
 <!ENTITY loadGroupAppend.accesskey "A">
 <!ENTITY loadGroupReplace.label "Replace existing tabs">
 <!ENTITY loadGroupReplace.accesskey "R">
 <!ENTITY openTabs.label "Open tabs instead of windows for">
-
-<!ENTITY newWindow.label "Link open behavior">
-<!ENTITY newWindowDescription.label "Open links meant to open a new window in">
-<!ENTITY external.label "Links from other applications">
-<!ENTITY externalDescription.label "Open links passed from other applications in">
-<!ENTITY openCurrent.label "The current tab/window">
-<!ENTITY newWindowGroupCurrent.accesskey "c">
-<!ENTITY externalGroupCurrent.accesskey "u">
-<!ENTITY openTab.label "A new tab in the current window">
-<!ENTITY newWindowGroupTab.accesskey "t">
-<!ENTITY externalGroupTab.accesskey "e">
-<!ENTITY openWindow.label "A new window">
-<!ENTITY newWindowGroupWindow.accesskey "w">
-<!ENTITY externalGroupWindow.accesskey "o">
--- a/suite/locales/en-US/chrome/common/pref/preferences.dtd
+++ b/suite/locales/en-US/chrome/common/pref/preferences.dtd
@@ -6,16 +6,17 @@
 <!ENTITY fonts.label "Fonts">
 <!ENTITY colors.label "Colors">
 <!ENTITY navigator.label "Browser">
 <!ENTITY history.label "History">
 <!ENTITY languages.label "Languages">
 <!ENTITY applications.label "Helper Applications">
 <!ENTITY locationBar.label "Location Bar">
 <!ENTITY tabWindows.label "Tabbed Browsing">
+<!ENTITY links.label "Link Behavior">
 <!ENTITY offline.label "Offline">
 <!ENTITY security.label "Privacy &amp; Security">
 <!ENTITY cookies.label "Cookies">
 <!ENTITY images.label "Images">
 <!ENTITY popups.label "Popup Windows">
 <!ENTITY passwords.label "Passwords">
 <!ENTITY masterpass.label "Master Passwords">
 <!ENTITY ssl.label "SSL">
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -150,30 +150,31 @@
   locale/@AB_CD@/communicator/pref/pref-download.dtd                        (%chrome/common/pref/pref-download.dtd)
   locale/@AB_CD@/communicator/pref/pref-fonts.dtd                           (%chrome/common/pref/pref-fonts.dtd)
   locale/@AB_CD@/communicator/pref/pref-history.dtd                         (%chrome/common/pref/pref-history.dtd)
   locale/@AB_CD@/communicator/pref/pref-http.dtd                            (%chrome/common/pref/pref-http.dtd)
   locale/@AB_CD@/communicator/pref/pref-images.dtd                          (%chrome/common/pref/pref-images.dtd)
   locale/@AB_CD@/communicator/pref/pref-keynav.dtd                          (%chrome/common/pref/pref-keynav.dtd)
   locale/@AB_CD@/communicator/pref/pref-languages.dtd                       (%chrome/common/pref/pref-languages.dtd)
   locale/@AB_CD@/communicator/pref/pref-languages.properties                (%chrome/common/pref/pref-languages.properties)
+  locale/@AB_CD@/communicator/pref/pref-links.dtd                           (%chrome/common/pref/pref-links.dtd)
   locale/@AB_CD@/communicator/pref/pref-locationbar.dtd                     (%chrome/common/pref/pref-locationbar.dtd)
   locale/@AB_CD@/communicator/pref/pref-mousewheel.dtd                      (%chrome/common/pref/pref-mousewheel.dtd)
   locale/@AB_CD@/communicator/pref/pref-navigator.dtd                       (%chrome/common/pref/pref-navigator.dtd)
   locale/@AB_CD@/communicator/pref/pref-offline.dtd                         (%chrome/common/pref/pref-offline.dtd)
+  locale/@AB_CD@/communicator/pref/pref-passwords.dtd                       (%chrome/common/pref/pref-passwords.dtd)
   locale/@AB_CD@/communicator/pref/pref-policies.dtd                        (%chrome/common/pref/pref-policies.dtd)
   locale/@AB_CD@/communicator/pref/pref-popups.dtd                          (%chrome/common/pref/pref-popups.dtd)
   locale/@AB_CD@/communicator/pref/pref-proxies.dtd                         (%chrome/common/pref/pref-proxies.dtd)
   locale/@AB_CD@/communicator/pref/pref-proxies-advanced.dtd                (%chrome/common/pref/pref-proxies-advanced.dtd)
   locale/@AB_CD@/communicator/pref/pref-scripts.dtd                         (%chrome/common/pref/pref-scripts.dtd)
   locale/@AB_CD@/communicator/pref/pref-search.dtd                          (%chrome/common/pref/pref-search.dtd)
   locale/@AB_CD@/communicator/pref/pref-security.dtd                        (%chrome/common/pref/pref-security.dtd)
   locale/@AB_CD@/communicator/pref/pref-smartupdate.dtd                     (%chrome/common/pref/pref-smartupdate.dtd)
   locale/@AB_CD@/communicator/pref/pref-tabs.dtd                            (%chrome/common/pref/pref-tabs.dtd)
-  locale/@AB_CD@/communicator/pref/pref-passwords.dtd                       (%chrome/common/pref/pref-passwords.dtd)
   locale/@AB_CD@/communicator-platform/mac/pref/platformPrefOverlay.dtd     (%chrome/common/pref/mac/platformPrefOverlay.dtd)
   locale/@AB_CD@/communicator-platform/unix/pref/platformPrefOverlay.dtd    (%chrome/common/pref/unix/platformPrefOverlay.dtd)
   locale/@AB_CD@/communicator-platform/win/pref/platformPrefOverlay.dtd     (%chrome/common/pref/win/platformPrefOverlay.dtd)
   locale/@AB_CD@/communicator/profile/profileSelection.dtd                  (%chrome/common/profile/profileSelection.dtd)
   locale/@AB_CD@/communicator/profile/profileSelection.properties           (%chrome/common/profile/profileSelection.properties)
   locale/@AB_CD@/communicator/search/default.htm                            (%chrome/common/search/default.htm)
   locale/@AB_CD@/communicator/search/internetresults.dtd                    (%chrome/common/search/internetresults.dtd)
   locale/@AB_CD@/communicator/search/search-editor.dtd                      (%chrome/common/search/search-editor.dtd)