add utilityOverlay to shift non-widget-toolkit global stuff into, required for clean skinnability.

This commit is contained in:
ben%netscape.com 2006-07-29 05:33:20 +00:00
Родитель 16e7590e5d
Коммит ea1a93b725
3 изменённых файлов: 58 добавлений и 0 удалений

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

@ -0,0 +1,25 @@
/**
* Go into online/offline mode
**/
function setOfflineStatus(aToggleFlag)
{
var ioService = nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}",
"nsIIOService");
var broadcaster = document.getElementById("Communicator:WorkMode");
if (aToggleFlag)
ioService.offline = !ioService.offline;
if (ioService.offline && broadcaster)
{
broadcaster.setAttribute("offline", "true");
broadcaster.setAttribute("value", bundle.GetStringFromName("goonline"));
}
else if (broadcaster)
{
broadcaster.removeAttribute("offline");
broadcaster.setAttribute("value", bundle.GetStringFromName("gooffline"));
}
}

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

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/content/utilityOverlay.css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">
<overlay id="utilityOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="javascript" src="chrome://communicator/content/utilityOverlay.js"></script>
<!-- online/offline status indicators -->
<broadcasterset id="broadcasterset">
<broadcaster id="Communicator:Synchronize" value="&offlineSynchronizeCmd.label;" disabled="true" />
<broadcaster id="Communicator:WorkMode" value="&offlineGoOfflineCmd.label;" oncommand="setOfflineStatus(true);"/>
</broadcasterset>
<statusbarpanel id="offline-status" observes="Communicator:WorkMode"/>
<menu id="offlineMenu" value="&offlineMenu.label;" accesskey="&offlineMenu.accesskey;">
<menupopup id="offlineMenuPopup">
<menuitem position="1" accesskey="&offlineGoOfflineCmd.accesskey;" observes="Communicator:WorkMode"/>
<menuseparator position="2"/>
<menuitem position="3" accesskey="&offlineSynchronizeCmd.accesskey;" observes="Communicator:Synchronize"/>
</menupopup>
</menu>
</overlay>

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

@ -0,0 +1,8 @@
<!-- these things need to move into utilityOverlay.xul -->
<!ENTITY offlineMenu.label "Offline">
<!ENTITY offlineMenu.accesskey "f">
<!ENTITY offlineGoOfflineCmd.label "Work Offline">
<!ENTITY offlineGoOfflineCmd.accesskey "w">
<!ENTITY offlineSynchronizeCmd.label "Synchronize">
<!ENTITY offlineSynchronizeCmd.accesskey "s">