Backed out changeset c36c02221c6a

This commit is contained in:
Dão Gottwald 2012-07-03 18:12:09 +02:00
parent 1204d555df
commit c2e7e2941e

View File

@ -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;