Bug 416696 - "Restart and quit alerts should use independent "don't warn again" prefs" [p=dao@mozilla.com (D��o Gottwald) r=zeniko r=Mano ui-r=beltzner a1.9=damons]

This commit is contained in:
reed%reedloden.com 2008-02-23 09:32:09 +00:00
Родитель 20046bb9cf
Коммит 7fd136b337
2 изменённых файлов: 14 добавлений и 6 удалений

Просмотреть файл

@ -197,6 +197,7 @@ pref("browser.chrome.site_icons", true);
pref("browser.chrome.favicons", true);
pref("browser.formfill.enable", true);
pref("browser.warnOnQuit", true);
pref("browser.warnOnRestart", true);
#ifdef UNIX_BUT_NOT_MAC
pref("browser.urlbar.clickSelectsAll", false);
@ -609,7 +610,7 @@ pref("browser.EULA.version", 2);
pref("browser.sessionstore.enabled", true);
pref("browser.sessionstore.resume_from_crash", true);
pref("browser.sessionstore.resume_session_once", false);
// minimal interval between two save operations in milliseconds
pref("browser.sessionstore.interval", 10000);
// maximum amount of POSTDATA to be saved in bytes per history entry (-1 = all of it)

Просмотреть файл

@ -237,7 +237,9 @@ BrowserGlue.prototype = {
prefBranch.getBoolPref("browser.sessionstore.resume_session_once"))
showPrompt = false;
else
showPrompt = prefBranch.getBoolPref("browser.warnOnQuit");
showPrompt = aQuitType == "restart" ?
prefBranch.getBoolPref("browser.warnOnRestart") :
prefBranch.getBoolPref("browser.warnOnQuit");
} catch (ex) {}
var buttonChoice = 0;
@ -297,10 +299,15 @@ BrowserGlue.prototype = {
break;
case 0:
this._saveSession = true;
// could also set browser.warnOnQuit to false here,
// but not setting it is a little safer.
if (neverAsk.value)
prefBranch.setIntPref("browser.startup.page", 3);
if (neverAsk.value) {
if (aQuitType == "restart")
prefBranch.setBoolPref("browser.warnOnRestart", false);
else {
// could also set browser.warnOnQuit to false here,
// but not setting it is a little safer.
prefBranch.setIntPref("browser.startup.page", 3);
}
}
break;
}
}