mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 772319 - Add an option to disable the "Close other tabs" prompt. r=dao
This commit is contained in:
parent
7edeb4ff2a
commit
b1f5762d25
@ -383,6 +383,7 @@ pref("browser.tabs.autoHide", false);
|
||||
pref("browser.tabs.closeWindowWithLastTab", true);
|
||||
pref("browser.tabs.insertRelatedAfterCurrent", true);
|
||||
pref("browser.tabs.warnOnClose", true);
|
||||
pref("browser.tabs.warnOnCloseOtherTabs", true);
|
||||
pref("browser.tabs.warnOnOpen", true);
|
||||
pref("browser.tabs.maxOpenBeforeWarn", 15);
|
||||
pref("browser.tabs.loadInBackground", true);
|
||||
|
@ -1450,9 +1450,10 @@
|
||||
if (tabsToClose <= 1)
|
||||
return true;
|
||||
|
||||
var canDisablePrompt = !!aAll;
|
||||
const pref = "browser.tabs.warnOnClose";
|
||||
if (canDisablePrompt && !Services.prefs.getBoolPref(pref))
|
||||
const pref = aAll ?
|
||||
"browser.tabs.warnOnClose" : "browser.tabs.warnOnCloseOtherTabs";
|
||||
var shouldPrompt = Services.prefs.getBoolPref(pref);
|
||||
if (!shouldPrompt)
|
||||
return true;
|
||||
|
||||
var ps = Services.prompt;
|
||||
@ -1476,13 +1477,13 @@
|
||||
+ (ps.BUTTON_TITLE_CANCEL * ps.BUTTON_POS_1),
|
||||
bundle.getString("tabs.closeButtonMultiple"),
|
||||
null, null,
|
||||
canDisablePrompt ?
|
||||
aAll ?
|
||||
bundle.getString("tabs.closeWarningPromptMe") : null,
|
||||
warnOnClose);
|
||||
var reallyClose = (buttonPressed == 0);
|
||||
|
||||
// don't set the pref unless they press OK and it's false
|
||||
if (canDisablePrompt && reallyClose && !warnOnClose.value)
|
||||
if (aAll && reallyClose && !warnOnClose.value)
|
||||
Services.prefs.setBoolPref(pref, false);
|
||||
|
||||
return reallyClose;
|
||||
|
Loading…
Reference in New Issue
Block a user