зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c36c02221c6a
This commit is contained in:
Родитель
82e2e4380e
Коммит
1d11ad99c1
|
@ -1410,17 +1410,14 @@
|
|||
this.tabs.length - this._removingTabs.length :
|
||||
this.visibleTabs.length - 1)
|
||||
- gBrowser._numPinnedTabs;
|
||||
var alwaysPrompt = !aAll;
|
||||
if (tabsToClose <= 1)
|
||||
return true;
|
||||
|
||||
const pref = "browser.tabs.warnOnClose";
|
||||
var shouldPrompt = Services.prefs.getBoolPref(pref);
|
||||
|
||||
if (!alwaysPrompt) {
|
||||
if (tabsToClose <= 1)
|
||||
return true;
|
||||
|
||||
var shouldPrompt = Services.prefs.getBoolPref(pref);
|
||||
if (!shouldPrompt)
|
||||
return true;
|
||||
}
|
||||
if (!shouldPrompt)
|
||||
return true;
|
||||
|
||||
var ps = Services.prompt;
|
||||
|
||||
|
@ -1443,13 +1440,11 @@
|
|||
+ (ps.BUTTON_TITLE_CANCEL * ps.BUTTON_POS_1),
|
||||
bundle.getString("tabs.closeButtonMultiple"),
|
||||
null, null,
|
||||
alwaysPrompt ? null :
|
||||
bundle.getString('tabs.closeWarningPromptMe'),
|
||||
bundle.getString('tabs.closeWarningPromptMe'),
|
||||
warnOnClose);
|
||||
var reallyClose = (buttonPressed == 0);
|
||||
|
||||
// don't set the pref unless they press OK and it's false
|
||||
if (!alwaysPrompt && reallyClose && !warnOnClose.value)
|
||||
if (reallyClose && !warnOnClose.value)
|
||||
Services.prefs.setBoolPref(pref, false);
|
||||
|
||||
return reallyClose;
|
||||
|
|
Загрузка…
Ссылка в новой задаче