gecko-dev/suite/common/pref/pref.xul

93 строки
3.2 KiB
Plaintext
Исходник Обычный вид История

1999-06-05 03:28:56 +04:00
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
2006-05-17 06:24:52 +04:00
2006-05-17 06:24:35 +04:00
<?xul-overlay href="chrome://communicator/content/pref/preftree.xul"?>
2006-05-17 06:24:35 +04:00
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref.dtd" >
<!-- This dialog has a fixed size and is not resizable.
You MAY NOT increase the size of this dialog.
Questions, Comments -> ben@netscape.com -->
<dialog id="prefDialog"
2006-05-17 06:24:52 +04:00
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&prefWindow.title;"
style="&prefWindow.size;"
windowtype="mozilla:preferences"
buttons="accept,cancel,help"
onload="Startup();"
ondialogaccept="return hPrefWindow.onOK(event);"
ondialogcancel="return hPrefWindow.onCancel(event);"
ondialoghelp="return doHelpButton(event)"
persist="screenX screenY">
2006-05-17 06:24:52 +04:00
2006-05-17 06:25:11 +04:00
<script>
<![CDATA[
var hPrefWindow = null;
/** General startup routine for preferences dialog.
* Place all necessary modifications to pref tree here.
**/
function Startup()
{
// Check for an existing pref window.
const kWindowMediatorContractID = "@mozilla.org/rdf/datasource;1?name=window-mediator";
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
var windows = kWindowMediator.getEnumerator("mozilla:preferences");
var prefWindow;
while ((prefWindow = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindow)) &&
prefWindow != window) {
// Prefs already open, activate it and close this one.
prefWindow.focus();
window.close();
}
2006-05-17 06:25:11 +04:00
hPrefWindow = new nsPrefWindow('panelFrame');
if( !hPrefWindow )
throw "failed to create prefwindow";
hPrefWindow.init();
2006-05-17 06:26:16 +04:00
// If this call worked, we could center the window here:
// centerWindowOnScreen();
2006-05-17 06:25:11 +04:00
}
]]>
</script>
<script type="application/x-javascript" src="chrome://global/content/nsWidgetStateManager.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/nsPrefWindow.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-help.js"/>
<script type="application/x-javascript" src="chrome://help/content/help.js"/>
<hbox flex="1">
<!-- tree sidebar -->
<outliner id="prefsTree" style="width: 13em;"/>
<vbox flex="1">
<dialogheader id="header"/>
<iframe id="panelFrame" name="panelFrame" style="width: 0px" flex="1"/>
</vbox>
2006-05-17 06:30:36 +04:00
</hbox>
<script type="application/x-javascript">
<![CDATA[
2006-05-17 06:30:36 +04:00
if(window.arguments && window.arguments[0]) {
document.getElementById("panelFrame").setAttribute("src", window.arguments[0] );
2006-05-17 06:24:52 +04:00
document.getElementById("panelFrame").setAttribute("tag", window.arguments[0] );
}
else {
2006-05-17 06:24:35 +04:00
document.getElementById("panelFrame").setAttribute("src", "chrome://communicator/content/pref/pref-navigator.xul" );
2006-05-17 06:24:52 +04:00
document.getElementById("panelFrame").setAttribute("tag", "chrome://communicator/content/pref/pref-navigator.xul" );
}
]]>
</script>
<separator/>
</dialog>