diff --git a/mozilla/embedding/config/xulprefs.mn b/mozilla/embedding/config/xulprefs.mn index f4a394b421a..fd0b1144a82 100644 --- a/mozilla/embedding/config/xulprefs.mn +++ b/mozilla/embedding/config/xulprefs.mn @@ -98,9 +98,5 @@ locale/XXXX/communicator/pref/preftree.dtd, XXXX/locale/XXXX/communicator/pref/p locale/XXXX/communicator/pref/pref.dtd, XXXX/locale/XXXX/communicator/pref/pref.dtd locale/XXXX/communicator/pref/pref-mousewheel.dtd, XXXX/locale/XXXX/communicator/pref/pref-mousewheel.dtd locale/XXXX/communicator/pref/pref-winhooks.dtd, XXXX/locale/XXXX/communicator/pref/pref-winhooks.dtd -locale/XXXX/communicator/pref/autocomplete-autofill-on.gif, XXXX/locale/XXXX/communicator/pref/autocomplete-autofill-on.gif -locale/XXXX/communicator/pref/autocomplete-autofill-off.gif, XXXX/locale/XXXX/communicator/pref/autocomplete-autofill-off.gif -locale/XXXX/communicator/pref/autocomplete-showpopup.gif, XXXX/locale/XXXX/communicator/pref/autocomplete-showpopup.gif -locale/XXXX/communicator/pref/autocomplete-showsearch.gif, XXXX/locale/XXXX/communicator/pref/autocomplete-showsearch.gif locale/XXXX/global/dialog.properties, XXXX/locale/XXXX/global/dialog.properties. diff --git a/mozilla/suite/browser/browser-prefs.js b/mozilla/suite/browser/browser-prefs.js index d828b486e72..10962656ca5 100644 --- a/mozilla/suite/browser/browser-prefs.js +++ b/mozilla/suite/browser/browser-prefs.js @@ -160,7 +160,6 @@ pref("browser.translation.serviceDomain", "chrome://navigator-region/locale/regi pref("browser.related.provider", "http://www-rl.netscape.com/wtgn?"); pref("browser.related.disabledForDomains", ""); pref("keyword.enabled", true); -pref("keyword.moreInfoURL", "chrome://branding/locale/brand.properties"); //Internet Search pref("browser.search.defaultenginename", "chrome://communicator-region/locale/region.properties"); diff --git a/mozilla/suite/common/jar.mn b/mozilla/suite/common/jar.mn index 55a51bc5515..7664cded632 100644 --- a/mozilla/suite/common/jar.mn +++ b/mozilla/suite/common/jar.mn @@ -180,6 +180,8 @@ comm.jar: 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-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) @@ -197,9 +199,6 @@ comm.jar: content/communicator/pref/pref-search.xul (pref/pref-search.xul) content/communicator/pref/pref-security.js (pref/pref-security.js) content/communicator/pref/pref-security.xul (pref/pref-security.xul) - content/communicator/pref/pref-smart_browsing.js (pref/pref-smart_browsing.js) - content/communicator/pref/pref-smart_browsing.xul (pref/pref-smart_browsing.xul) - content/communicator/pref/pref-smart_browsing-ac.xul (pref/pref-smart_browsing-ac.xul) content/communicator/pref/pref-smartupdate.js (pref/pref-smartupdate.js) content/communicator/pref/pref-smartupdate.xul (pref/pref-smartupdate.xul) content/communicator/pref/pref-tabs.xul (pref/pref-tabs.xul) diff --git a/mozilla/suite/common/pref/pref-locationbar.js b/mozilla/suite/common/pref/pref-locationbar.js index 17a75ab5cdd..f5d1e2da8bc 100644 --- a/mozilla/suite/common/pref/pref-locationbar.js +++ b/mozilla/suite/common/pref/pref-locationbar.js @@ -22,6 +22,7 @@ * Contributor(s): * Diego Biurrun * Ian Neal + * Stefan Hermes * * 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"), @@ -37,48 +38,53 @@ * * ***** END LICENSE BLOCK ***** */ -function moreInfo() +function Startup() { - var browserURL = null; - try { - browserURL = parent.hPrefWindow.getPref("string", "browser.chromeURL"); - } catch(e) { + // On systems that has the file view component, autoFill and showPopup will + // return results from local browsing "history", even if autocomplete.enabled + // is turned off, so we'll need to remove the dependent look in the ui. + + if ("@mozilla.org/autocomplete/search;1?name=file" in Components.classes) + { + // We indent the checkboxes with the class attribute set to "indent", so + // just remove the attribute. + document.getElementById("autoFill").removeAttribute("class"); + document.getElementById("showPopup").removeAttribute("class"); } - if (browserURL == null) - browserURL = "chrome://navigator/content/navigator.xul"; - var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] - .getService(Components.interfaces.nsIURLFormatter); - window.openDialog(browserURL, "_blank", "chrome,all,dialog=no", - formatter.formatURLPref("keyword.moreInfoURL")); -} - -function showACAdvanced() -{ - window.openDialog("chrome://communicator/content/pref/pref-smart_browsing-ac.xul", "", - "modal=yes,chrome,resizable=no", - document.getElementById("browserUrlbarAutoFill").getAttribute("value"), - document.getElementById("browserUrlbarShowPopup").getAttribute("value"), - document.getElementById("browserUrlbarShowSearch").getAttribute("value"), - document.getElementById("browserUrlbarMatchOnlyTyped").getAttribute("value"), - document.getElementById("browserUrlbarAutoFill").getAttribute("disabled"), - document.getElementById("browserUrlbarShowPopup").getAttribute("disabled"), - document.getElementById("browserUrlbarShowSearch").getAttribute("disabled"), - document.getElementById("browserUrlbarMatchOnlyTyped").getAttribute("disabled")); + updateDependent(document.getElementById("browser.urlbar.autocomplete.enabled").value); } -function receiveACPrefs(aAutoFill, aShowPopup, aShowSearch, aAutoType) +function updateDependent(aValue) { - document.getElementById("browserUrlbarAutoFill").setAttribute("value", aAutoFill); - document.getElementById("browserUrlbarShowPopup").setAttribute("value", aShowPopup); - document.getElementById("browserUrlbarShowSearch").setAttribute("value", aShowSearch); - document.getElementById("browserUrlbarMatchOnlyTyped").setAttribute("value", aAutoType); + // The matchOnlyTyped checkbox always depend on autocomplete.enabled. + updateMatchOnlyTyped(); + + // If autoFill has a class attribute, we don't have the file view component. + // We then need to update autoFill and showPopup. + if (document.getElementById("autoFill").hasAttribute("class")) + { + toggleCheckbox("autoFill", aValue); + toggleCheckbox("showPopup", aValue); + } } - -function toggleAutoCompleteAdvancedButton() +function toggleCheckbox(aCheckbox, aPrefValue) { - var browserAutoCompleteEnabled = document.getElementById("browserAutoCompleteEnabled"); - var autoCompleteAdvancedButton = document.getElementById("autoCompleteAdvancedButton"); - autoCompleteAdvancedButton.disabled = !browserAutoCompleteEnabled.checked; + if (!document.getElementById("browser.urlbar." + aCheckbox).locked) + document.getElementById(aCheckbox).disabled = !aPrefValue; +} + +function updateMatchOnlyTyped() +{ + if (!document.getElementById("browser.urlbar.matchOnlyTyped").locked) + { + var autoCompletePref = document.getElementById("browser.urlbar.autocomplete.enabled"); + var autoFillPref = document.getElementById("browser.urlbar.autoFill"); + var showPopupPref = document.getElementById("browser.urlbar.showPopup"); + // matchOnlyTyped doesn't makes sense if both autoFill and showPopup prefs + // are false or if autocomplete is turned off. + document.getElementById("matchOnlyTyped").disabled = + (!autoFillPref.value && !showPopupPref.value) || !autoCompletePref.value; + } } diff --git a/mozilla/suite/common/pref/pref-locationbar.xul b/mozilla/suite/common/pref/pref-locationbar.xul index ad6a228e553..e55c642cfd5 100644 --- a/mozilla/suite/common/pref/pref-locationbar.xul +++ b/mozilla/suite/common/pref/pref-locationbar.xul @@ -23,6 +23,7 @@ Contributor(s): Blake Ross Diego Biurrun + Stefan Hermes 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"), @@ -41,71 +42,82 @@ - -%brandDTD; - -%prefSmartBrowsingDTD; -]> + - + - - - - + + + + + + + + + - &internetKeywordsDescription.label; - - - - -