Bug 333860 - When starting offline, Compatibility Wizard should not be checking for updates. patch=Dave Townsend (Mossop), r=rob_strong, ui-r=beltzner

This commit is contained in:
rob_strong%exchangecode.com 2006-07-19 20:11:40 +00:00
Родитель 0a07420a3d
Коммит 8bbe04e7d8
3 изменённых файлов: 42 добавлений и 2 удалений

Просмотреть файл

@ -1,5 +1,12 @@
<!ENTITY updateWizard.title "&brandShortName; Update">
<!ENTITY offline.title "&brandShortName; is working offline">
<!ENTITY offline.description "&brandShortName; needs to go online in order to see if updates
are available for your add-ons to make them compatible with this
version.">
<!ENTITY offline.toggleOffline.label "Go online now.">
<!ENTITY offline.toggleOffline.accesskey "G">
<!ENTITY mismatch.win.title "Incompatible Add-ons">
<!ENTITY mismatch.introduction1.label "The following add-ons are not compatible with this version
of &brandShortName;:">

Просмотреть файл

@ -89,8 +89,14 @@ var gUpdateWizard = {
}
catch (e) {
}
document.documentElement.currentPage =
document.getElementById("versioninfo");
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
if (ioService.offline)
document.documentElement.currentPage =
document.getElementById("offline");
else
document.documentElement.currentPage =
document.getElementById("versioninfo");
},
onWizardFinish: function ()
@ -161,6 +167,22 @@ var gUpdateWizard = {
}
};
var gOfflinePage = {
onPageAdvanced: function ()
{
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
ioService.offline = false;
return true;
},
toggleOffline: function ()
{
var nextbtn = document.documentElement.getButton("next");
nextbtn.disabled = !nextbtn.disabled;
}
}
var gVersionInfoPage = {
_completeCount: 0,
_totalCount: 0,

Просмотреть файл

@ -67,6 +67,17 @@
<wizardpage id="dummy" pageid="dummy"/>
<wizardpage id="offline" pageid="offline" next="versioninfo"
label="&offline.title;"
onpageadvanced="return gOfflinePage.onPageAdvanced();">
<description>&offline.description;</description>
<checkbox id="toggleOffline"
checked="true"
label="&offline.toggleOffline.label;"
accesskey="&offline.toggleOffline.accesskey;"
oncommand="gOfflinePage.toggleOffline();"/>
</wizardpage>
<wizardpage id="versioninfo" pageid="versioninfo" next="mismatch"
label="&compatCheck.title;"
onpageshow="gVersionInfoPage.onPageShow();">