Bug 1040868 - Move 'default browser'stuff back to the General preferences pane. r=jaws.
This commit is contained in:
@@ -30,43 +30,6 @@ var gAdvancedPane = {
|
|||||||
advancedPrefs.selectedIndex = preference.value;
|
advancedPrefs.selectedIndex = preference.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
this.updateSetDefaultBrowser();
|
|
||||||
#ifdef XP_WIN
|
|
||||||
// In Windows 8 we launch the control panel since it's the only
|
|
||||||
// way to get all file type association prefs. So we don't know
|
|
||||||
// when the user will select the default. We refresh here periodically
|
|
||||||
// in case the default changes. On other Windows OS's defaults can also
|
|
||||||
// be set while the prefs are open.
|
|
||||||
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
|
||||||
|
|
||||||
#ifdef MOZ_METRO
|
|
||||||
// Pre Windows 8, we should hide the update related settings
|
|
||||||
// for the Metro browser
|
|
||||||
let version = Components.classes["@mozilla.org/system-info;1"].
|
|
||||||
getService(Components.interfaces.nsIPropertyBag2).
|
|
||||||
getProperty("version");
|
|
||||||
let preWin8 = parseFloat(version) < 6.2;
|
|
||||||
this._showingWin8Prefs = !preWin8;
|
|
||||||
if (preWin8) {
|
|
||||||
["autoMetro", "autoMetroIndent"].forEach(
|
|
||||||
function(id) document.getElementById(id).collapsed = true
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
let brandShortName =
|
|
||||||
document.getElementById("bundleBrand").getString("brandShortName");
|
|
||||||
let bundlePrefs = document.getElementById("bundlePreferences");
|
|
||||||
let autoDesktop = document.getElementById("autoDesktop");
|
|
||||||
autoDesktop.label =
|
|
||||||
bundlePrefs.getFormattedString("updateAutoDesktop.label",
|
|
||||||
[brandShortName]);
|
|
||||||
autoDesktop.accessKey =
|
|
||||||
bundlePrefs.getString("updateAutoDesktop.accessKey");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_UPDATER
|
#ifdef MOZ_UPDATER
|
||||||
this.updateReadPrefs();
|
this.updateReadPrefs();
|
||||||
#endif
|
#endif
|
||||||
@@ -854,49 +817,4 @@ var gAdvancedPane = {
|
|||||||
"chrome://pippki/content/device_manager.xul",
|
"chrome://pippki/content/device_manager.xul",
|
||||||
"", null);
|
"", null);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
,
|
|
||||||
|
|
||||||
// SYSTEM DEFAULTS
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Preferences:
|
|
||||||
*
|
|
||||||
* browser.shell.checkDefault
|
|
||||||
* - true if a default-browser check (and prompt to make it so if necessary)
|
|
||||||
* occurs at startup, false otherwise
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show button for setting browser as default browser or information that
|
|
||||||
* browser is already the default browser.
|
|
||||||
*/
|
|
||||||
updateSetDefaultBrowser: function()
|
|
||||||
{
|
|
||||||
let shellSvc = getShellService();
|
|
||||||
let setDefaultPane = document.getElementById("setDefaultPane");
|
|
||||||
if (!shellSvc) {
|
|
||||||
setDefaultPane.hidden = true;
|
|
||||||
document.getElementById("alwaysCheckDefault").disabled = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let selectedIndex =
|
|
||||||
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
|
||||||
setDefaultPane.selectedIndex = selectedIndex;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set browser as the operating system default browser.
|
|
||||||
*/
|
|
||||||
setDefaultBrowser: function()
|
|
||||||
{
|
|
||||||
let shellSvc = getShellService();
|
|
||||||
if (!shellSvc)
|
|
||||||
return;
|
|
||||||
shellSvc.setDefaultBrowser(true, false);
|
|
||||||
let selectedIndex =
|
|
||||||
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
|
||||||
document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,16 +40,6 @@
|
|||||||
#endif
|
#endif
|
||||||
<preference id="layout.spellcheckDefault" name="layout.spellcheckDefault" type="int"/>
|
<preference id="layout.spellcheckDefault" name="layout.spellcheckDefault" type="int"/>
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
<preference id="browser.shell.checkDefaultBrowser"
|
|
||||||
name="browser.shell.checkDefaultBrowser"
|
|
||||||
type="bool"/>
|
|
||||||
|
|
||||||
<preference id="pref.general.disable_button.default_browser"
|
|
||||||
name="pref.general.disable_button.default_browser"
|
|
||||||
type="bool"/>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
<!-- Data Choices tab -->
|
<!-- Data Choices tab -->
|
||||||
|
|
||||||
#ifdef MOZ_TELEMETRY_REPORTING
|
#ifdef MOZ_TELEMETRY_REPORTING
|
||||||
@@ -172,26 +162,6 @@
|
|||||||
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
||||||
preference="layout.spellcheckDefault"/>
|
preference="layout.spellcheckDefault"/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
<!-- System Defaults -->
|
|
||||||
<groupbox id="systemDefaultsGroup" orient="vertical">
|
|
||||||
<caption label="&systemDefaults.label;"/>
|
|
||||||
|
|
||||||
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
|
||||||
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
|
|
||||||
flex="1"/>
|
|
||||||
<hbox class="indent">
|
|
||||||
<deck id="setDefaultPane">
|
|
||||||
<button id="setDefaultButton"
|
|
||||||
label="&setDefault.label;" accesskey="&setDefault.accesskey;"
|
|
||||||
oncommand="gAdvancedPane.setDefaultBrowser();"
|
|
||||||
preference="pref.general.disable_button.default_browser"/>
|
|
||||||
<description>&isDefault.label;</description>
|
|
||||||
</deck>
|
|
||||||
</hbox>
|
|
||||||
</groupbox>
|
|
||||||
#endif
|
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
||||||
#ifdef MOZ_DATA_REPORTING
|
#ifdef MOZ_DATA_REPORTING
|
||||||
|
|||||||
@@ -22,42 +22,6 @@ var gAdvancedPane = {
|
|||||||
if (preference.value !== null)
|
if (preference.value !== null)
|
||||||
advancedPrefs.selectedIndex = preference.value;
|
advancedPrefs.selectedIndex = preference.value;
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
this.updateSetDefaultBrowser();
|
|
||||||
#ifdef XP_WIN
|
|
||||||
// In Windows 8 we launch the control panel since it's the only
|
|
||||||
// way to get all file type association prefs. So we don't know
|
|
||||||
// when the user will select the default. We refresh here periodically
|
|
||||||
// in case the default changes. On other Windows OS's defaults can also
|
|
||||||
// be set while the prefs are open.
|
|
||||||
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
|
||||||
|
|
||||||
#ifdef MOZ_METRO
|
|
||||||
// Pre Windows 8, we should hide the update related settings
|
|
||||||
// for the Metro browser
|
|
||||||
let version = Components.classes["@mozilla.org/system-info;1"].
|
|
||||||
getService(Components.interfaces.nsIPropertyBag2).
|
|
||||||
getProperty("version");
|
|
||||||
let preWin8 = parseFloat(version) < 6.2;
|
|
||||||
this._showingWin8Prefs = !preWin8;
|
|
||||||
if (preWin8) {
|
|
||||||
["autoMetro", "autoMetroIndent"].forEach(
|
|
||||||
function(id) document.getElementById(id).collapsed = true
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
let brandShortName =
|
|
||||||
document.getElementById("bundleBrand").getString("brandShortName");
|
|
||||||
let bundlePrefs = document.getElementById("bundlePreferences");
|
|
||||||
let autoDesktop = document.getElementById("autoDesktop");
|
|
||||||
autoDesktop.label =
|
|
||||||
bundlePrefs.getFormattedString("updateAutoDesktop.label",
|
|
||||||
[brandShortName]);
|
|
||||||
autoDesktop.accessKey =
|
|
||||||
bundlePrefs.getString("updateAutoDesktop.accessKey");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifdef MOZ_UPDATER
|
#ifdef MOZ_UPDATER
|
||||||
this.updateReadPrefs();
|
this.updateReadPrefs();
|
||||||
#endif
|
#endif
|
||||||
@@ -825,49 +789,4 @@ var gAdvancedPane = {
|
|||||||
"mozilla:devicemanager",
|
"mozilla:devicemanager",
|
||||||
"modal=yes", null);
|
"modal=yes", null);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
,
|
|
||||||
|
|
||||||
// SYSTEM DEFAULTS
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Preferences:
|
|
||||||
*
|
|
||||||
* browser.shell.checkDefault
|
|
||||||
* - true if a default-browser check (and prompt to make it so if necessary)
|
|
||||||
* occurs at startup, false otherwise
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show button for setting browser as default browser or information that
|
|
||||||
* browser is already the default browser.
|
|
||||||
*/
|
|
||||||
updateSetDefaultBrowser: function()
|
|
||||||
{
|
|
||||||
let shellSvc = getShellService();
|
|
||||||
let setDefaultPane = document.getElementById("setDefaultPane");
|
|
||||||
if (!shellSvc) {
|
|
||||||
setDefaultPane.hidden = true;
|
|
||||||
document.getElementById("alwaysCheckDefault").disabled = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let selectedIndex =
|
|
||||||
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
|
||||||
setDefaultPane.selectedIndex = selectedIndex;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set browser as the operating system default browser.
|
|
||||||
*/
|
|
||||||
setDefaultBrowser: function()
|
|
||||||
{
|
|
||||||
let shellSvc = getShellService();
|
|
||||||
if (!shellSvc)
|
|
||||||
return;
|
|
||||||
shellSvc.setDefaultBrowser(true, false);
|
|
||||||
let selectedIndex =
|
|
||||||
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
|
||||||
document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,16 +44,6 @@
|
|||||||
name="layout.spellcheckDefault"
|
name="layout.spellcheckDefault"
|
||||||
type="int"/>
|
type="int"/>
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
<preference id="browser.shell.checkDefaultBrowser"
|
|
||||||
name="browser.shell.checkDefaultBrowser"
|
|
||||||
type="bool"/>
|
|
||||||
|
|
||||||
<preference id="pref.general.disable_button.default_browser"
|
|
||||||
name="pref.general.disable_button.default_browser"
|
|
||||||
type="bool"/>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_TELEMETRY_REPORTING
|
#ifdef MOZ_TELEMETRY_REPORTING
|
||||||
<preference id="toolkit.telemetry.enabled"
|
<preference id="toolkit.telemetry.enabled"
|
||||||
name="toolkit.telemetry.enabled"
|
name="toolkit.telemetry.enabled"
|
||||||
@@ -200,23 +190,6 @@
|
|||||||
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
||||||
preference="layout.spellcheckDefault"/>
|
preference="layout.spellcheckDefault"/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
<!-- System Defaults -->
|
|
||||||
<groupbox id="systemDefaultsGroup" orient="vertical" align="start">
|
|
||||||
<caption><label>&systemDefaults.label;</label></caption>
|
|
||||||
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
|
||||||
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"/>
|
|
||||||
<hbox class="indent">
|
|
||||||
<deck id="setDefaultPane">
|
|
||||||
<button id="setDefaultButton"
|
|
||||||
label="&setDefault.label;" accesskey="&setDefault.accesskey;"
|
|
||||||
oncommand="gAdvancedPane.setDefaultBrowser();"
|
|
||||||
preference="pref.general.disable_button.default_browser"/>
|
|
||||||
<label id="isDefaultLabel">&isDefault.label;</label>
|
|
||||||
</deck>
|
|
||||||
</hbox>
|
|
||||||
</groupbox>
|
|
||||||
#endif
|
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
#ifdef MOZ_DATA_REPORTING
|
#ifdef MOZ_DATA_REPORTING
|
||||||
<!-- Data Choices -->
|
<!-- Data Choices -->
|
||||||
|
|||||||
@@ -11,6 +11,43 @@ var gMainPane = {
|
|||||||
*/
|
*/
|
||||||
init: function ()
|
init: function ()
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
this.updateSetDefaultBrowser();
|
||||||
|
#ifdef XP_WIN
|
||||||
|
// In Windows 8 we launch the control panel since it's the only
|
||||||
|
// way to get all file type association prefs. So we don't know
|
||||||
|
// when the user will select the default. We refresh here periodically
|
||||||
|
// in case the default changes. On other Windows OS's defaults can also
|
||||||
|
// be set while the prefs are open.
|
||||||
|
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
||||||
|
|
||||||
|
#ifdef MOZ_METRO
|
||||||
|
// Pre Windows 8, we should hide the update related settings
|
||||||
|
// for the Metro browser
|
||||||
|
let version = Components.classes["@mozilla.org/system-info;1"].
|
||||||
|
getService(Components.interfaces.nsIPropertyBag2).
|
||||||
|
getProperty("version");
|
||||||
|
let preWin8 = parseFloat(version) < 6.2;
|
||||||
|
this._showingWin8Prefs = !preWin8;
|
||||||
|
if (preWin8) {
|
||||||
|
["autoMetro", "autoMetroIndent"].forEach(
|
||||||
|
function(id) document.getElementById(id).collapsed = true
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
let brandShortName =
|
||||||
|
document.getElementById("bundleBrand").getString("brandShortName");
|
||||||
|
let bundlePrefs = document.getElementById("bundlePreferences");
|
||||||
|
let autoDesktop = document.getElementById("autoDesktop");
|
||||||
|
autoDesktop.label =
|
||||||
|
bundlePrefs.getFormattedString("updateAutoDesktop.label",
|
||||||
|
[brandShortName]);
|
||||||
|
autoDesktop.accessKey =
|
||||||
|
bundlePrefs.getString("updateAutoDesktop.accessKey");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// set up the "use current page" label-changing listener
|
// set up the "use current page" label-changing listener
|
||||||
this._updateUseCurrentButton();
|
this._updateUseCurrentButton();
|
||||||
window.addEventListener("focus", this._updateUseCurrentButton.bind(this), false);
|
window.addEventListener("focus", this._updateUseCurrentButton.bind(this), false);
|
||||||
@@ -495,4 +532,46 @@ var gMainPane = {
|
|||||||
var linkTargeting = document.getElementById("linkTargeting");
|
var linkTargeting = document.getElementById("linkTargeting");
|
||||||
return linkTargeting.checked ? 3 : 2;
|
return linkTargeting.checked ? 3 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
,
|
||||||
|
/*
|
||||||
|
* Preferences:
|
||||||
|
*
|
||||||
|
* browser.shell.checkDefault
|
||||||
|
* - true if a default-browser check (and prompt to make it so if necessary)
|
||||||
|
* occurs at startup, false otherwise
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show button for setting browser as default browser or information that
|
||||||
|
* browser is already the default browser.
|
||||||
|
*/
|
||||||
|
updateSetDefaultBrowser: function()
|
||||||
|
{
|
||||||
|
let shellSvc = getShellService();
|
||||||
|
let defaultBrowserBox = document.getElementById("defaultBrowserBox");
|
||||||
|
if (!shellSvc) {
|
||||||
|
defaultBrowserBox.hidden = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let setDefaultPane = document.getElementById("setDefaultPane");
|
||||||
|
let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
||||||
|
setDefaultPane.selectedIndex = selectedIndex;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set browser as the operating system default browser.
|
||||||
|
*/
|
||||||
|
setDefaultBrowser: function()
|
||||||
|
{
|
||||||
|
let shellSvc = getShellService();
|
||||||
|
if (!shellSvc)
|
||||||
|
return;
|
||||||
|
shellSvc.setDefaultBrowser(true, false);
|
||||||
|
let selectedIndex =
|
||||||
|
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
||||||
|
document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,16 @@
|
|||||||
name="browser.startup.homepage"
|
name="browser.startup.homepage"
|
||||||
type="wstring"/>
|
type="wstring"/>
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
<preference id="browser.shell.checkDefaultBrowser"
|
||||||
|
name="browser.shell.checkDefaultBrowser"
|
||||||
|
type="bool"/>
|
||||||
|
|
||||||
|
<preference id="pref.general.disable_button.default_browser"
|
||||||
|
name="pref.general.disable_button.default_browser"
|
||||||
|
type="bool"/>
|
||||||
|
#endif
|
||||||
|
|
||||||
<preference id="pref.browser.homepage.disable_button.current_page"
|
<preference id="pref.browser.homepage.disable_button.current_page"
|
||||||
name="pref.browser.homepage.disable_button.current_page"
|
name="pref.browser.homepage.disable_button.current_page"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
@@ -100,6 +110,27 @@
|
|||||||
hidden="true">
|
hidden="true">
|
||||||
<caption><label>&startup.label;</label></caption>
|
<caption><label>&startup.label;</label></caption>
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
<vbox id="defaultBrowserBox">
|
||||||
|
<hbox align="center">
|
||||||
|
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
||||||
|
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault2.accesskey;"/>
|
||||||
|
</hbox>
|
||||||
|
<deck id="setDefaultPane">
|
||||||
|
<hbox align="center" class="indent">
|
||||||
|
<label id="isNotDefaultLabel" flex="1">&isNotDefault.label;</label>
|
||||||
|
<button id="setDefaultButton"
|
||||||
|
label="&setAsMyDefaultBrowser.label;" accesskey="&setAsMyDefaultBrowser.accesskey;"
|
||||||
|
oncommand="gMainPane.setDefaultBrowser();"
|
||||||
|
preference="pref.general.disable_button.default_browser"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox align="center" class="indent">
|
||||||
|
<label id="isDefaultLabel" flex="1">&isDefault.label;</label>
|
||||||
|
</hbox>
|
||||||
|
</deck>
|
||||||
|
<separator class="thin"/>
|
||||||
|
</vbox>
|
||||||
|
#endif
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<label accesskey="&startupPage.accesskey;"
|
<label accesskey="&startupPage.accesskey;"
|
||||||
control="browserStartupPage">&startupPage.label;</label>
|
control="browserStartupPage">&startupPage.label;</label>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ browser.jar:
|
|||||||
* content/browser/preferences/languages.xul
|
* content/browser/preferences/languages.xul
|
||||||
content/browser/preferences/languages.js
|
content/browser/preferences/languages.js
|
||||||
* content/browser/preferences/main.xul
|
* content/browser/preferences/main.xul
|
||||||
content/browser/preferences/main.js
|
* content/browser/preferences/main.js
|
||||||
* content/browser/preferences/permissions.xul
|
* content/browser/preferences/permissions.xul
|
||||||
* content/browser/preferences/permissions.js
|
* content/browser/preferences/permissions.js
|
||||||
* content/browser/preferences/preferences.xul
|
* content/browser/preferences/preferences.xul
|
||||||
|
|||||||
@@ -17,6 +17,43 @@ var gMainPane = {
|
|||||||
{
|
{
|
||||||
this._pane = document.getElementById("paneMain");
|
this._pane = document.getElementById("paneMain");
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
this.updateSetDefaultBrowser();
|
||||||
|
#ifdef XP_WIN
|
||||||
|
// In Windows 8 we launch the control panel since it's the only
|
||||||
|
// way to get all file type association prefs. So we don't know
|
||||||
|
// when the user will select the default. We refresh here periodically
|
||||||
|
// in case the default changes. On other Windows OS's defaults can also
|
||||||
|
// be set while the prefs are open.
|
||||||
|
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
||||||
|
|
||||||
|
#ifdef MOZ_METRO
|
||||||
|
// Pre Windows 8, we should hide the update related settings
|
||||||
|
// for the Metro browser
|
||||||
|
let version = Components.classes["@mozilla.org/system-info;1"].
|
||||||
|
getService(Components.interfaces.nsIPropertyBag2).
|
||||||
|
getProperty("version");
|
||||||
|
let preWin8 = parseFloat(version) < 6.2;
|
||||||
|
this._showingWin8Prefs = !preWin8;
|
||||||
|
if (preWin8) {
|
||||||
|
["autoMetro", "autoMetroIndent"].forEach(
|
||||||
|
function(id) document.getElementById(id).collapsed = true
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
let brandShortName =
|
||||||
|
document.getElementById("bundleBrand").getString("brandShortName");
|
||||||
|
let bundlePrefs = document.getElementById("bundlePreferences");
|
||||||
|
let autoDesktop = document.getElementById("autoDesktop");
|
||||||
|
autoDesktop.label =
|
||||||
|
bundlePrefs.getFormattedString("updateAutoDesktop.label",
|
||||||
|
[brandShortName]);
|
||||||
|
autoDesktop.accessKey =
|
||||||
|
bundlePrefs.getString("updateAutoDesktop.accessKey");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// set up the "use current page" label-changing listener
|
// set up the "use current page" label-changing listener
|
||||||
this._updateUseCurrentButton();
|
this._updateUseCurrentButton();
|
||||||
window.addEventListener("focus", this._updateUseCurrentButton.bind(this), false);
|
window.addEventListener("focus", this._updateUseCurrentButton.bind(this), false);
|
||||||
@@ -427,4 +464,46 @@ var gMainPane = {
|
|||||||
startupPref.updateElements(); // select the correct index in the startup menulist
|
startupPref.updateElements(); // select the correct index in the startup menulist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
,
|
||||||
|
/*
|
||||||
|
* Preferences:
|
||||||
|
*
|
||||||
|
* browser.shell.checkDefault
|
||||||
|
* - true if a default-browser check (and prompt to make it so if necessary)
|
||||||
|
* occurs at startup, false otherwise
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show button for setting browser as default browser or information that
|
||||||
|
* browser is already the default browser.
|
||||||
|
*/
|
||||||
|
updateSetDefaultBrowser: function()
|
||||||
|
{
|
||||||
|
let shellSvc = getShellService();
|
||||||
|
let defaultBrowserBox = document.getElementById("defaultBrowserBox");
|
||||||
|
if (!shellSvc) {
|
||||||
|
defaultBrowserBox.hidden = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let setDefaultPane = document.getElementById("setDefaultPane");
|
||||||
|
let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
||||||
|
setDefaultPane.selectedIndex = selectedIndex;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set browser as the operating system default browser.
|
||||||
|
*/
|
||||||
|
setDefaultBrowser: function()
|
||||||
|
{
|
||||||
|
let shellSvc = getShellService();
|
||||||
|
if (!shellSvc)
|
||||||
|
return;
|
||||||
|
shellSvc.setDefaultBrowser(true, false);
|
||||||
|
let selectedIndex =
|
||||||
|
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
|
||||||
|
document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,6 +34,16 @@
|
|||||||
name="browser.startup.homepage"
|
name="browser.startup.homepage"
|
||||||
type="wstring"/>
|
type="wstring"/>
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
<preference id="browser.shell.checkDefaultBrowser"
|
||||||
|
name="browser.shell.checkDefaultBrowser"
|
||||||
|
type="bool"/>
|
||||||
|
|
||||||
|
<preference id="pref.general.disable_button.default_browser"
|
||||||
|
name="pref.general.disable_button.default_browser"
|
||||||
|
type="bool"/>
|
||||||
|
#endif
|
||||||
|
|
||||||
<preference id="pref.browser.homepage.disable_button.current_page"
|
<preference id="pref.browser.homepage.disable_button.current_page"
|
||||||
name="pref.browser.homepage.disable_button.current_page"
|
name="pref.browser.homepage.disable_button.current_page"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
@@ -67,6 +77,27 @@
|
|||||||
<groupbox id="startupGroup">
|
<groupbox id="startupGroup">
|
||||||
<caption label="&startup.label;"/>
|
<caption label="&startup.label;"/>
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
|
<vbox id="defaultBrowserBox">
|
||||||
|
<hbox align="center">
|
||||||
|
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
||||||
|
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault2.accesskey;"/>
|
||||||
|
</hbox>
|
||||||
|
<deck id="setDefaultPane">
|
||||||
|
<hbox align="center" class="indent">
|
||||||
|
<label id="isNotDefaultLabel" flex="1">&isNotDefault.label;</label>
|
||||||
|
<button id="setDefaultButton"
|
||||||
|
label="&setAsMyDefaultBrowser.label;" accesskey="&setAsMyDefaultBrowser.accesskey;"
|
||||||
|
oncommand="gMainPane.setDefaultBrowser();"
|
||||||
|
preference="pref.general.disable_button.default_browser"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox align="center" class="indent">
|
||||||
|
<label id="isDefaultLabel" flex="1">&isDefault.label;</label>
|
||||||
|
</hbox>
|
||||||
|
</deck>
|
||||||
|
<separator class="thin"/>
|
||||||
|
</vbox>
|
||||||
|
#endif
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<label value="&startupPage.label;" accesskey="&startupPage.accesskey;"
|
<label value="&startupPage.label;" accesskey="&startupPage.accesskey;"
|
||||||
control="browserStartupPage"/>
|
control="browserStartupPage"/>
|
||||||
|
|||||||
@@ -26,13 +26,6 @@
|
|||||||
<!ENTITY checkSpelling.label "Check my spelling as I type">
|
<!ENTITY checkSpelling.label "Check my spelling as I type">
|
||||||
<!ENTITY checkSpelling.accesskey "t">
|
<!ENTITY checkSpelling.accesskey "t">
|
||||||
|
|
||||||
<!ENTITY systemDefaults.label "System Defaults">
|
|
||||||
<!ENTITY alwaysCheckDefault.label "Always check to see if &brandShortName; is the default browser on startup"><!--XXX-->
|
|
||||||
<!ENTITY alwaysCheckDefault.accesskey "w">
|
|
||||||
<!ENTITY setDefault.label "Make &brandShortName; the default browser">
|
|
||||||
<!ENTITY setDefault.accesskey "d">
|
|
||||||
<!ENTITY isDefault.label "&brandShortName; is currently your default browser">
|
|
||||||
|
|
||||||
<!ENTITY dataChoicesTab.label "Data Choices">
|
<!ENTITY dataChoicesTab.label "Data Choices">
|
||||||
|
|
||||||
<!ENTITY healthReportSection.label "&brandShortName; Health Report">
|
<!ENTITY healthReportSection.label "&brandShortName; Health Report">
|
||||||
|
|||||||
@@ -30,3 +30,11 @@
|
|||||||
<!ENTITY chooseFolderMac.accesskey "e">
|
<!ENTITY chooseFolderMac.accesskey "e">
|
||||||
<!ENTITY alwaysAsk.label "Always ask me where to save files">
|
<!ENTITY alwaysAsk.label "Always ask me where to save files">
|
||||||
<!ENTITY alwaysAsk.accesskey "A">
|
<!ENTITY alwaysAsk.accesskey "A">
|
||||||
|
|
||||||
|
<!ENTITY alwaysCheckDefault.label "Always check to see if &brandShortName; is the default browser on startup">
|
||||||
|
<!ENTITY alwaysCheckDefault2.accesskey "w">
|
||||||
|
<!ENTITY setAsMyDefaultBrowser.label "Make &brandShortName; My Default Browser">
|
||||||
|
<!ENTITY setAsMyDefaultBrowser.accesskey "D">
|
||||||
|
<!ENTITY isDefault.label "&brandShortName; is currently your default browser">
|
||||||
|
<!ENTITY isNotDefault.label "&brandShortName; is not your default browser">
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ label.small {
|
|||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* General Pane */
|
||||||
|
#isNotDefaultLabel {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
/* Content Pane */
|
/* Content Pane */
|
||||||
#translationAttributionImage {
|
#translationAttributionImage {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
|
|||||||
@@ -167,6 +167,12 @@ caption {
|
|||||||
font: message-box !important;
|
font: message-box !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* General Pane */
|
||||||
|
|
||||||
|
#isNotDefaultLabel {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Privacy Pane
|
* Privacy Pane
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ prefpane {
|
|||||||
|
|
||||||
/* General Pane */
|
/* General Pane */
|
||||||
|
|
||||||
|
#isNotDefaultLabel {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
#downloadFolder {
|
#downloadFolder {
|
||||||
-moz-margin-start: 0;
|
-moz-margin-start: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ label.small {
|
|||||||
margin: 6px;
|
margin: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* General Pane */
|
||||||
|
|
||||||
|
#isNotDefaultLabel {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
/* Content Pane */
|
/* Content Pane */
|
||||||
#translationAttributionImage {
|
#translationAttributionImage {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
|
|||||||
Reference in New Issue
Block a user