diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index dfef3838a3c..b4480b4f583 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -158,7 +158,6 @@ pref("browser.search.basic.min_ver", "0.0"); pref("browser.urlbar.autocomplete.enabled", true); pref("browser.urlbar.clickSelectsAll", true); -pref("browser.history.last_page_visited", ""); pref("browser.history_expire_days", 9); pref("browser.history.grouping", "day"); pref("browser.sessionhistory.max_entries", 50); diff --git a/xpfe/components/prefwindow/resources/content/pref-navigator.js b/xpfe/components/prefwindow/resources/content/pref-navigator.js index 4a46043b04a..db1040347eb 100644 --- a/xpfe/components/prefwindow/resources/content/pref-navigator.js +++ b/xpfe/components/prefwindow/resources/content/pref-navigator.js @@ -48,7 +48,6 @@ const FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1"; const WINDOWMEDIATOR_CONTRACTID = "@mozilla.org/appshell/window-mediator;1"; const PREFSERVICE_CONTRACTID = "@mozilla.org/preferences-service;1"; -var gData; var gDefaultPage; function selectFile() @@ -112,57 +111,16 @@ function getDefaultPage() nsIPrefLocalizedString).data; } -function Startup() +function locationInputHandler() { - var radiogroup = document.getElementById("startupPage"); - radiogroup.addEventListener("RadioStateChange", onRadioCheck, false); - - var textbox = document.getElementById("browserStartupHomepage"); - textbox.addEventListener("input", updateHomePageButtons, false); - updateHomePageButtons(); - - gData = parent.hPrefWindow.wsm.dataManager - .pageData["chrome://communicator/content/pref/pref-navigator.xul"]; - - if (!("navigatorData" in gData)) { - gData.navigatorData = []; - gData.navigatorData["startupPage"] = []; - gData.navigatorData["startupPage"].changed = false; - gData.navigatorData["startupPage"].originalValue = radiogroup.value; - gData.navigatorData["startupPage"].value = radiogroup.value; - } - - gDefaultPage = getDefaultPage(); - parent.hPrefWindow.registerOKCallbackFunc(doOnOk); } -function doOnOk() +function Startup() { - var newPrefValue; + updateHomePageButtons(); - // We'll have a null gData if we are clicking OK from a different pref panel. - // Doing |if (!gData)| will throw an exception so just try and get the value, - // and set gData if we don't yet have it. - try { - newPrefValue = gData.navigatorData["startupPage"].value; - } - catch(ex) { - gData = parent.hPrefWindow.wsm.dataManager - .pageData["chrome://communicator/content/pref/pref-navigator.xul"]; - newPrefValue = gData.navigatorData["startupPage"].value; - } - - if (gData.navigatorData["startupPage"].changed) { - // if our home page isn't the last page visited anymore, - // set the last_page_visited to "" for privacy reasons. - if (gData.navigatorData["startupPage"].originalValue == 2) { - parent.hPrefWindow.setPref("string", "browser.history.last_page_visited", ""); - } - else if (newPrefValue == 2) { - parent.hPrefWindow.setPref("string", "browser.history.last_page_visited", getCurrentPage()); - } - } + gDefaultPage = getDefaultPage(); } function updateHomePageButtons() @@ -174,9 +132,3 @@ function updateHomePageButtons() defaultPageButton.disabled = (homepage == gDefaultPage); } -function onRadioCheck(event) -{ - gData.navigatorData["startupPage"].value = document.getElementById("startupPage").value; - gData.navigatorData["startupPage"].changed = - gData.navigatorData["startupPage"].value != gData.navigatorData["startupPage"].originalValue; -} diff --git a/xpfe/components/prefwindow/resources/content/pref-navigator.xul b/xpfe/components/prefwindow/resources/content/pref-navigator.xul index d99c416f465..56662d331d3 100644 --- a/xpfe/components/prefwindow/resources/content/pref-navigator.xul +++ b/xpfe/components/prefwindow/resources/content/pref-navigator.xul @@ -65,7 +65,8 @@