Bug 550559 - also show close warnings when session restore is active, r=jaws,flod

Differential Revision: https://phabricator.services.mozilla.com/D10217

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2018-11-02 20:03:50 +00:00
Родитель c598be2c0a
Коммит cde318d859
3 изменённых файлов: 7 добавлений и 13 удалений

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

@ -1728,11 +1728,9 @@ BrowserGlue.prototype = {
// There are several cases where we won't show a dialog here:
// 1. There is only 1 tab open in 1 window
// 2. The session will be restored at startup, indicated by
// browser.startup.page == 3 or browser.sessionstore.resume_session_once == true
// 3. browser.warnOnQuit == false
// 4. The browser is currently in Private Browsing mode
// 5. The browser will be restarted.
// 2. browser.warnOnQuit or browser.warnOnClose == false
// 3. The browser is currently in Private Browsing mode
// 4. The browser will be restarted.
//
// Otherwise, we will show the "closing multiple tabs" dialog.
//
@ -1764,12 +1762,8 @@ BrowserGlue.prototype = {
aQuitType = "quit";
// browser.warnOnQuit is a hidden global boolean to override all quit prompts
// browser.showQuitWarning specifically covers quitting
// browser.tabs.warnOnClose is the global "warn when closing multiple tabs" pref
var sessionWillBeRestored = Services.prefs.getIntPref("browser.startup.page") == 3 ||
Services.prefs.getBoolPref("browser.sessionstore.resume_session_once");
if (sessionWillBeRestored || !Services.prefs.getBoolPref("browser.warnOnQuit") ||
if (!Services.prefs.getBoolPref("browser.warnOnQuit") ||
!Services.prefs.getBoolPref("browser.tabs.warnOnClose"))
return;

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

@ -85,7 +85,7 @@
onsyncfrompreference="return gMainPane.readLinkTarget();"
onsynctopreference="return gMainPane.writeLinkTarget();"/>
<checkbox id="warnCloseMultiple" data-l10n-id="warn-on-close-multiple-tabs"
<checkbox id="warnCloseMultiple" data-l10n-id="warn-on-quit-close-multiple-tabs"
preference="browser.tabs.warnOnClose"/>
<checkbox id="warnOpenMany" data-l10n-id="warn-on-open-many-tabs"

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

@ -175,8 +175,8 @@ open-new-link-as-tabs =
.label = Open links in tabs instead of new windows
.accesskey = w
warn-on-close-multiple-tabs =
.label = Warn you when closing multiple tabs
warn-on-quit-close-multiple-tabs =
.label = Warn you when quitting and closing multiple tabs
.accesskey = m
warn-on-open-many-tabs =