1999-06-04 23:28:56 +00:00
|
|
|
<?xml version="1.0"?>
|
1999-08-10 02:48:56 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
The contents of this file are subject to the Netscape Public
|
|
|
|
License Version 1.1 (the "License"); you may not use this file
|
|
|
|
except in compliance with the License. You may obtain a copy of
|
|
|
|
the License at http://www.mozilla.org/NPL/
|
|
|
|
|
|
|
|
implied. See the License for the specific language governing
|
|
|
|
rights and limitations under the License.
|
|
|
|
|
|
|
|
The Original Code is Mozilla Communicator client code, released
|
|
|
|
March 31, 1998.
|
|
|
|
|
|
|
|
The Initial Developer of the Original Code is Netscape
|
|
|
|
Communications Corporation. Portions created by Netscape are
|
|
|
|
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
|
|
|
Rights Reserved.
|
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
-->
|
2006-05-17 02:24:52 +00:00
|
|
|
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
2006-05-17 02:29:13 +00:00
|
|
|
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
|
1999-08-10 02:48:56 +00:00
|
|
|
|
2006-05-17 02:24:35 +00:00
|
|
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd" >
|
1999-06-04 23:28:56 +00:00
|
|
|
|
2006-05-17 02:25:47 +00:00
|
|
|
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
2006-05-17 02:28:44 +00:00
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
2006-05-17 02:24:52 +00:00
|
|
|
class="color-dialog"
|
2006-05-17 02:29:13 +00:00
|
|
|
orient="vertical"
|
2006-05-17 02:27:13 +00:00
|
|
|
onload="parent.initPanel(panel);">
|
2006-05-17 02:24:52 +00:00
|
|
|
|
2006-05-17 02:28:42 +00:00
|
|
|
<script type="application/x-javascript">
|
2006-05-17 02:24:52 +00:00
|
|
|
<![CDATA[
|
2006-05-17 02:26:11 +00:00
|
|
|
var panel = "chrome://communicator/content/pref/pref-advanced.xul";
|
Fix for http://bugzilla.mozilla.org/show_bug.cgi?id=84882. Add a entry, windows
only, the the advanced prefs panel. This is not a pref, but UI that has the
following semantics:
when the panel loads, if there is a shortcut in the windows startup folder for
turbo mode, the checkbox in the UI is set. Otherwise, it is clear,
when the user hits OK, if the checkbox is not set, the shortcut is removed, if
necessary. Otherwise, if the checkbox is set, the shortcut is added, if necessary.
r=ssu, sr=mscott, a=asa
2006-05-17 02:29:18 +00:00
|
|
|
var _elementIDs = ["advancedJavaAllow", "javascriptEnabled", "advancedMailFTP", "advancedMailFTPAddress",
|
|
|
|
"enableTurbo"];
|
2006-05-17 02:27:59 +00:00
|
|
|
|
|
|
|
function Startup()
|
|
|
|
{
|
|
|
|
ftpCheck();
|
Fix for http://bugzilla.mozilla.org/show_bug.cgi?id=84882. Add a entry, windows
only, the the advanced prefs panel. This is not a pref, but UI that has the
following semantics:
when the panel loads, if there is a shortcut in the windows startup folder for
turbo mode, the checkbox in the UI is set. Otherwise, it is clear,
when the user hits OK, if the checkbox is not set, the shortcut is removed, if
necessary. Otherwise, if the checkbox is set, the shortcut is added, if necessary.
r=ssu, sr=mscott, a=asa
2006-05-17 02:29:18 +00:00
|
|
|
turboCheck();
|
2006-05-17 02:27:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function ftpCheck()
|
|
|
|
{
|
|
|
|
var checked = document.getElementById("advancedMailFTP").checked;
|
|
|
|
var field = document.getElementById("advancedMailFTPAddress");
|
2006-05-17 02:29:14 +00:00
|
|
|
field.disabled = !checked;
|
2006-05-17 02:29:19 +00:00
|
|
|
if (checked)
|
|
|
|
field.focus();
|
2006-05-17 02:27:59 +00:00
|
|
|
}
|
Fix for http://bugzilla.mozilla.org/show_bug.cgi?id=84882. Add a entry, windows
only, the the advanced prefs panel. This is not a pref, but UI that has the
following semantics:
when the panel loads, if there is a shortcut in the windows startup folder for
turbo mode, the checkbox in the UI is set. Otherwise, it is clear,
when the user hits OK, if the checkbox is not set, the shortcut is removed, if
necessary. Otherwise, if the checkbox is set, the shortcut is added, if necessary.
r=ssu, sr=mscott, a=asa
2006-05-17 02:29:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Name: turboCheck()
|
|
|
|
*
|
|
|
|
* Arguments: none
|
|
|
|
*
|
|
|
|
* Description: This function is called when the root advanced prefs panel
|
|
|
|
* is loaded. The turbo mode setting is not exactly a preference -- setting
|
|
|
|
* the checkbox should (on leaving the prefs with an "Ok") result in a call
|
|
|
|
* to the backend to do the necessary win32 registry twiddling needed for
|
|
|
|
* turbo mode to go into affect. Clearing it should undo this work. We need
|
|
|
|
* to call the backend to determine if turbo mode is enabled (since we are
|
|
|
|
* required to check for it in a non-trivial way) and then explicitly set the
|
|
|
|
* checkbox here based on what we find. Finally, we have to hide the checkbox
|
|
|
|
* (and the titled box that frames it) if we are not executing on a Win32
|
|
|
|
* platform.
|
|
|
|
*
|
|
|
|
* Return Value: void
|
|
|
|
*
|
|
|
|
* Original Code: syd@netscape.com 6/8/2001
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
function turboCheck()
|
|
|
|
{
|
|
|
|
var aframe = document.getElementById("perfSettings");
|
|
|
|
var abox = document.getElementById("perfLabel");
|
|
|
|
var alabel = document.getElementById("perfBox");
|
|
|
|
var acheckbox = document.getElementById("enableTurbo");
|
|
|
|
if ( navigator.platform != "Win32" ) {
|
|
|
|
aframe.setAttribute( "style", "visibility: hidden" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
aframe.setAttribute( "style", "visibility: visible" );
|
|
|
|
|
|
|
|
/* find out what the setting should be and reflect it in the UI */
|
|
|
|
|
|
|
|
try {
|
|
|
|
hooks = Components.classes["@mozilla.org/winhooks;1"];
|
|
|
|
if ( hooks ) {
|
|
|
|
hooks = hooks.getService(Components.interfaces.nsIWindowsHooks);
|
|
|
|
}
|
|
|
|
if ( hooks ) {
|
|
|
|
var isEnabled = hooks.isStartupTurboEnabled();
|
|
|
|
if ( isEnabled == true ) {
|
|
|
|
acheckbox.setAttribute( "checked", true );
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
acheckbox.setAttribute( "checked", false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch( ex ) {
|
|
|
|
}
|
|
|
|
|
|
|
|
parent.hPrefWindow.registerOKCallbackFunc( saveTurboSetting );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Name: saveTurboSetting()
|
|
|
|
*
|
|
|
|
* Arguments: none
|
|
|
|
*
|
|
|
|
* Description: This function is called when the user hits the OK button in
|
|
|
|
* the preferences panel. The function determines what the turbo "preference"
|
|
|
|
* setting is and performs the appropriate action to enable or disable turbo mode.
|
|
|
|
*
|
|
|
|
* Return Value: void
|
|
|
|
*
|
|
|
|
* Original Code: syd@netscape.com 6/9/2001
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
function saveTurboSetting()
|
|
|
|
{
|
|
|
|
if ( navigator.platform != "Win32" ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var acheckbox = document.getElementById("enableTurbo");
|
|
|
|
try {
|
|
|
|
hooks = Components.classes["@mozilla.org/winhooks;1"];
|
|
|
|
if ( hooks ) {
|
|
|
|
hooks = hooks.getService(Components.interfaces.nsIWindowsHooks);
|
|
|
|
}
|
|
|
|
if ( hooks ) {
|
|
|
|
var isEnabled = acheckbox.checked;
|
|
|
|
if ( isEnabled == true ) {
|
|
|
|
hooks.startupTurboEnable();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
hooks.startupTurboDisable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch( ex ) {
|
|
|
|
}
|
|
|
|
}
|
2006-05-17 02:25:11 +00:00
|
|
|
|
2006-05-17 02:24:52 +00:00
|
|
|
]]>
|
|
|
|
</script>
|
2006-05-17 02:27:14 +00:00
|
|
|
|
2006-05-17 02:24:57 +00:00
|
|
|
<box class="box-smallheader" title="&lHeader;"/>
|
1999-06-04 23:28:56 +00:00
|
|
|
|
2006-05-17 02:27:59 +00:00
|
|
|
<titledbox orient="vertical" id="advancedSettings">
|
2006-05-17 02:28:51 +00:00
|
|
|
<label value="&advancedTitle.label;"/>
|
2006-05-17 02:27:59 +00:00
|
|
|
<vbox autostretch="never" id="contentEnablingBox">
|
2006-05-17 02:28:51 +00:00
|
|
|
<checkbox id="advancedJavaAllow" label="&enbJavaCheck.label;" accesskey="&enbJavaCheck.accesskey;"
|
2006-05-17 02:27:59 +00:00
|
|
|
pref="true" preftype="bool" prefstring="security.enable_java"
|
|
|
|
prefattribute="checked"/>
|
2006-05-17 02:28:51 +00:00
|
|
|
<checkbox id="javascriptEnabled" label="&enbJsCheck.label;" accesskey="&enbJsCheck.accesskey;"
|
2006-05-17 02:27:59 +00:00
|
|
|
pref="true" preftype="bool" prefstring="javascript.enabled"
|
|
|
|
prefattribute="checked"/>
|
|
|
|
</vbox>
|
|
|
|
<vbox>
|
|
|
|
<separator/>
|
|
|
|
<html>&description.label;</html>
|
|
|
|
<separator/>
|
|
|
|
</vbox>
|
|
|
|
<vbox autostretch="never">
|
2006-05-17 02:28:51 +00:00
|
|
|
<checkbox id="advancedMailFTP" label="&sendAddFtpCheck.label;" accesskey="&sendAddFtpCheck.accesskey;"
|
2006-05-17 02:27:59 +00:00
|
|
|
pref="true" preftype="bool" prefstring="advanced.mailftp"
|
|
|
|
prefattribute="checked" oncommand="ftpCheck();"/>
|
|
|
|
</vbox>
|
|
|
|
<hbox class="indent">
|
2006-05-17 02:28:45 +00:00
|
|
|
<textbox id="advancedMailFTPAddress"
|
2006-05-17 02:27:59 +00:00
|
|
|
pref="true" preftype="string" prefstring="network.ftp.anonymous_password"
|
|
|
|
prefattribute="value" flex="2"/>
|
|
|
|
<spring flex="1"/>
|
|
|
|
</hbox>
|
|
|
|
<separator/>
|
|
|
|
</titledbox>
|
Fix for http://bugzilla.mozilla.org/show_bug.cgi?id=84882. Add a entry, windows
only, the the advanced prefs panel. This is not a pref, but UI that has the
following semantics:
when the panel loads, if there is a shortcut in the windows startup folder for
turbo mode, the checkbox in the UI is set. Otherwise, it is clear,
when the user hits OK, if the checkbox is not set, the shortcut is removed, if
necessary. Otherwise, if the checkbox is set, the shortcut is added, if necessary.
r=ssu, sr=mscott, a=asa
2006-05-17 02:29:18 +00:00
|
|
|
<titledbox orient="vertical" id="perfSettings">
|
|
|
|
<label id="perfLabel" value="&perfTitle.label;"/>
|
|
|
|
<vbox id="perfBox" autostretch="never">
|
|
|
|
<checkbox id="enableTurbo" label="&enableTurbo.label;" accesskey="&enableTurboCheck.accesskey;"/>
|
|
|
|
</vbox>
|
|
|
|
</titledbox>
|
|
|
|
|
2006-05-17 02:27:59 +00:00
|
|
|
</window>
|
2006-05-17 02:24:57 +00:00
|
|
|
|
1999-06-11 18:22:51 +00:00
|
|
|
|