зеркало из https://github.com/mozilla/pjs.git
Fix to setDefault browser bug.
This commit is contained in:
Родитель
8af7273e0d
Коммит
9c623a043b
|
@ -109,6 +109,29 @@
|
|||
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox class='box-prefgroupitem' id='system-box'>
|
||||
|
||||
<caption label="&systemCaption.label;" />
|
||||
|
||||
<vbox class="box-prefpadding">
|
||||
|
||||
<!-- NOTE WARNING: We use the same pref as in FF but we use with a different
|
||||
meaning. Our check is actually a *set* -->
|
||||
|
||||
<checkbox id="setDefaultBrowser"
|
||||
tabindex="15"
|
||||
onfocus="prefFocus('system-box')" onblur="prefBlur('system-box')"
|
||||
label="&setDefaultBrowser.label;"
|
||||
preference="browser.shell.checkDefaultBrowser" prefvalue=""
|
||||
prefuitype="bool"
|
||||
onclick="setDefaultBrowser();syncPref(this);"
|
||||
/>
|
||||
|
||||
</vbox>
|
||||
|
||||
</groupbox>
|
||||
|
||||
</vbox>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
|
|
@ -218,6 +218,27 @@ function downloadChooseFolder() {
|
|||
|
||||
}
|
||||
|
||||
function setDefaultBrowser() {
|
||||
|
||||
/* In the device, there is a live synch here. With desktop we fail nice here, so
|
||||
the pref can be set */
|
||||
|
||||
try {
|
||||
|
||||
var device = Components.classes["@mozilla.org/device/support;1"].getService(nsIDeviceSupport);
|
||||
|
||||
if(document.getElementById("setDefaultBrowser").checked) {
|
||||
|
||||
if( !device.isDefaultBrowser() )
|
||||
device.setDefaultBrowser();
|
||||
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* New Mini Pref Implementation
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
|
||||
<preferenceset id="prefsInstance" >
|
||||
<preferenceitem preftype="string" id="browser.startup.homepage" name="browserStartupHomepage" />
|
||||
<preferenceitem preftype="bool" id="browser.shell.checkDefaultBrowser" name="setDefaultBrowser" />
|
||||
<preferenceitem preftype="int" id="permissions.default.image" name="enableImages" />
|
||||
<preferenceitem preftype="bool" id="ssr.enabled" name="ssr"/>
|
||||
<preferenceitem preftype="bool" id="skey.enabled" name="skey" />
|
||||
|
|
|
@ -39,6 +39,11 @@
|
|||
<!ENTITY loadHomePageCurrent.label "Use Home Pages">
|
||||
<!ENTITY loadHomePageBlank.label "Use Blank Page">
|
||||
|
||||
<!-- System Integration -->
|
||||
|
||||
<!ENTITY systemCaption.label "System Integration">
|
||||
<!ENTITY setDefaultBrowser.label "Set Minimo as the default browser">
|
||||
|
||||
<!-- Small Screen Settings -->
|
||||
|
||||
<!ENTITY sssCaption.label "Small Screen Settings">
|
||||
|
|
Загрузка…
Ссылка в новой задаче