зеркало из https://github.com/mozilla/pjs.git
add offline checkbox
This commit is contained in:
Родитель
3a3a8b3db6
Коммит
fc97f867a0
|
@ -46,6 +46,17 @@ function StartUp()
|
|||
|
||||
loadElements();
|
||||
highlightCurrentProfile();
|
||||
|
||||
// set the checkbox to reflect the current state.
|
||||
var offlineState = document.getElementById("offlineState");
|
||||
try {
|
||||
var ioService = nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}",
|
||||
"nsIIOService");
|
||||
offlineState.checked = ioService.offline;
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
|
||||
DoEnabling();
|
||||
}
|
||||
|
||||
|
@ -149,8 +160,16 @@ function onStart()
|
|||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// start in online or offline mode
|
||||
var offlineState = document.getElementById("offlineState");
|
||||
var ioService = nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}",
|
||||
"nsIIOService");
|
||||
ioService.offline = offlineState.checked;
|
||||
|
||||
try {
|
||||
dump("start with profile: " + profilename + "\n");
|
||||
|
||||
profile.startApprunner(profilename);
|
||||
ExitApp();
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<!-- note: wtf is with the 'onclose' above. Is that a real, actual, valid event?! -->
|
||||
|
||||
<script language="javascript" src="chrome://global/content/strres.js"></script>
|
||||
<script language="javascript" src="chrome://global/content/nsJSComponentManager.js"></script>
|
||||
<script language="javascript" src="chrome://communicator/content/profile/profileSelection.js"></script>
|
||||
<script language="javascript" src="chrome://communicator/content/profile/profileManager.js"></script>
|
||||
|
||||
|
@ -81,17 +82,22 @@
|
|||
|
||||
<separator class="thin" orient="vertical"/>
|
||||
|
||||
<tree id="profiles" class="inset" flex="1"
|
||||
onclick="HandleClickEvent( event );"
|
||||
onkeypress="HandleKeyEvent( event );">
|
||||
<treecol/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell class="treecell-header outset" value="&availprofiles.label;"/>
|
||||
</treerow>
|
||||
</treehead>
|
||||
<treechildren id="profilekids"/>
|
||||
</tree>
|
||||
<box orient="vertical" flex="1">
|
||||
<tree id="profiles" class="inset" flex="1"
|
||||
onclick="HandleClickEvent( event );"
|
||||
onkeypress="HandleKeyEvent( event );">
|
||||
<treecol/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell class="treecell-header outset" value="&availprofiles.label;"/>
|
||||
</treerow>
|
||||
</treehead>
|
||||
<treechildren id="profilekids"/>
|
||||
</tree>
|
||||
<box autostretch="never">
|
||||
<checkbox id="offlineState" value="&offlineState.label;" accesskey="&offlineState.accesskey;"/>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<box class="selection">
|
||||
|
|
Загрузка…
Ссылка в новой задаче