revert accidental checkin

This commit is contained in:
gavin%gavinsharp.com 2005-11-19 02:38:14 +00:00
parent 6fe48243c4
commit 3940b258b4

View File

@ -895,7 +895,33 @@ function delayedStartup()
gClickSelectsAll = gPrefService.getBoolPref("browser.urlbar.clickSelectsAll");
#ifdef HAVE_SHELL_SERVICE
if (!getShellService()) {
// Perform default browser checking (after window opens).
var shell = getShellService();
if (shell) {
var shouldCheck = shell.shouldCheckDefaultBrowser;
if (shouldCheck && !shell.isDefaultBrowser(true)) {
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]);
const IPS = Components.interfaces.nsIPromptService;
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(IPS);
var checkEveryTime = { value: shouldCheck };
var rv = ps.confirmEx(window, promptTitle, promptMessage,
(IPS.BUTTON_TITLE_YES * IPS.BUTTON_POS_0) +
(IPS.BUTTON_TITLE_NO * IPS.BUTTON_POS_1),
null, null, null, checkboxLabel, checkEveryTime);
if (rv == 0)
shell.setDefaultBrowser(true, false);
shell.shouldCheckDefaultBrowser = checkEveryTime.value;
}
} else {
// We couldn't get the shell service; go hide the mail toolbar button.
var mailbutton = document.getElementById("mail-button");
if (mailbutton)