Bug 654388 - Restore Previous Session" button is always hidden if "Default Browser" dialog pops [r=gavin]
This commit is contained in:
@@ -1564,23 +1564,27 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||
}
|
||||
catch (ex) { /* never mind; suppose SessionStore is broken */ }
|
||||
if (shouldCheck && !shell.isDefaultBrowser(true) && !willRecoverSession) {
|
||||
var brandBundle = document.getElementById("bundle_brand");
|
||||
var shellBundle = document.getElementById("bundle_shell");
|
||||
// Delay the set-default-browser prompt so it doesn't block
|
||||
// initialisation of the session store service.
|
||||
setTimeout(function () {
|
||||
var brandBundle = document.getElementById("bundle_brand");
|
||||
var shellBundle = document.getElementById("bundle_shell");
|
||||
|
||||
var brandShortName = brandBundle.getString("brandShortName");
|
||||
var promptTitle = shellBundle.getString("setDefaultBrowserTitle");
|
||||
var promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",
|
||||
[brandShortName]);
|
||||
var checkboxLabel = shellBundle.getFormattedString("setDefaultBrowserDontAsk",
|
||||
[brandShortName]);
|
||||
var checkEveryTime = { value: shouldCheck };
|
||||
var ps = Services.prompt;
|
||||
var rv = ps.confirmEx(window, promptTitle, promptMessage,
|
||||
ps.STD_YES_NO_BUTTONS,
|
||||
null, null, null, checkboxLabel, checkEveryTime);
|
||||
if (rv == 0)
|
||||
shell.setDefaultBrowser(true, false);
|
||||
shell.shouldCheckDefaultBrowser = checkEveryTime.value;
|
||||
var brandShortName = brandBundle.getString("brandShortName");
|
||||
var promptTitle = shellBundle.getString("setDefaultBrowserTitle");
|
||||
var promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",
|
||||
[brandShortName]);
|
||||
var checkboxLabel = shellBundle.getFormattedString("setDefaultBrowserDontAsk",
|
||||
[brandShortName]);
|
||||
var checkEveryTime = { value: shouldCheck };
|
||||
var ps = Services.prompt;
|
||||
var rv = ps.confirmEx(window, promptTitle, promptMessage,
|
||||
ps.STD_YES_NO_BUTTONS,
|
||||
null, null, null, checkboxLabel, checkEveryTime);
|
||||
if (rv == 0)
|
||||
shell.setDefaultBrowser(true, false);
|
||||
shell.shouldCheckDefaultBrowser = checkEveryTime.value;
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user