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):
|
|
|
|
-->
|
2000-04-25 02:17:38 +00:00
|
|
|
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
2001-04-05 19:53:13 +00:00
|
|
|
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
|
1999-08-10 02:48:56 +00:00
|
|
|
|
2000-04-19 21:42:30 +00:00
|
|
|
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd" >
|
1999-06-04 23:28:56 +00:00
|
|
|
|
2000-06-15 09:54:41 +00:00
|
|
|
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
2001-03-21 02:08:19 +00:00
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
2000-04-25 02:17:38 +00:00
|
|
|
class="color-dialog"
|
2001-04-05 19:53:13 +00:00
|
|
|
orient="vertical"
|
2000-08-10 23:27:21 +00:00
|
|
|
onload="parent.initPanel(panel);">
|
2000-04-25 02:17:38 +00:00
|
|
|
|
2001-03-11 12:17:34 +00:00
|
|
|
<script type="application/x-javascript">
|
2000-04-25 02:17:38 +00:00
|
|
|
<![CDATA[
|
2000-06-17 03:26:47 +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
2001-06-20 05:51:47 +00:00
|
|
|
var _elementIDs = ["advancedJavaAllow", "javascriptEnabled", "advancedMailFTP", "advancedMailFTPAddress",
|
|
|
|
"enableTurbo"];
|
2001-03-07 07:50:14 +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
2001-06-20 05:51:47 +00:00
|
|
|
turboCheck();
|
2001-03-07 07:50:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function ftpCheck()
|
|
|
|
{
|
|
|
|
var checked = document.getElementById("advancedMailFTP").checked;
|
|
|
|
var field = document.getElementById("advancedMailFTPAddress");
|
2001-04-17 23:12:16 +00:00
|
|
|
field.disabled = !checked;
|
2001-06-26 02:45:44 +00:00
|
|
|
if (checked)
|
|
|
|
field.focus();
|
2001-03-07 07:50:14 +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
2001-06-20 05:51:47 +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
|
2001-07-09 18:41:07 +00:00
|
|
|
* (and the group box that frames it) if we are not executing on a Win32
|
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
2001-06-20 05:51:47 +00:00
|
|
|
* 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 ) {
|
|
|
|
}
|
|
|
|
}
|
2000-05-04 04:31:12 +00:00
|
|
|
|
2000-04-25 02:17:38 +00:00
|
|
|
]]>
|
|
|
|
</script>
|
2000-08-16 22:54:56 +00:00
|
|
|
|
2001-07-09 18:41:07 +00:00
|
|
|
<hbox class="box-smallheader" title="&lHeader;"/>
|
1999-06-04 23:28:56 +00:00
|
|
|
|
2001-07-09 18:41:07 +00:00
|
|
|
<groupbox orient="vertical" id="advancedSettings">
|
2001-03-22 00:59:29 +00:00
|
|
|
<label value="&advancedTitle.label;"/>
|
2001-03-07 07:50:14 +00:00
|
|
|
<vbox autostretch="never" id="contentEnablingBox">
|
2001-03-22 00:59:29 +00:00
|
|
|
<checkbox id="advancedJavaAllow" label="&enbJavaCheck.label;" accesskey="&enbJavaCheck.accesskey;"
|
2001-03-07 07:50:14 +00:00
|
|
|
pref="true" preftype="bool" prefstring="security.enable_java"
|
|
|
|
prefattribute="checked"/>
|
2001-03-22 00:59:29 +00:00
|
|
|
<checkbox id="javascriptEnabled" label="&enbJsCheck.label;" accesskey="&enbJsCheck.accesskey;"
|
2001-03-07 07:50:14 +00:00
|
|
|
pref="true" preftype="bool" prefstring="javascript.enabled"
|
|
|
|
prefattribute="checked"/>
|
|
|
|
</vbox>
|
|
|
|
<vbox>
|
|
|
|
<separator/>
|
|
|
|
<html>&description.label;</html>
|
|
|
|
<separator/>
|
|
|
|
</vbox>
|
|
|
|
<vbox autostretch="never">
|
2001-03-22 00:59:29 +00:00
|
|
|
<checkbox id="advancedMailFTP" label="&sendAddFtpCheck.label;" accesskey="&sendAddFtpCheck.accesskey;"
|
2001-03-07 07:50:14 +00:00
|
|
|
pref="true" preftype="bool" prefstring="advanced.mailftp"
|
|
|
|
prefattribute="checked" oncommand="ftpCheck();"/>
|
|
|
|
</vbox>
|
|
|
|
<hbox class="indent">
|
2001-03-22 00:15:47 +00:00
|
|
|
<textbox id="advancedMailFTPAddress"
|
2001-03-07 07:50:14 +00:00
|
|
|
pref="true" preftype="string" prefstring="network.ftp.anonymous_password"
|
|
|
|
prefattribute="value" flex="2"/>
|
|
|
|
<spring flex="1"/>
|
|
|
|
</hbox>
|
|
|
|
<separator/>
|
2001-07-09 18:41:07 +00:00
|
|
|
</groupbox>
|
|
|
|
<groupbox orient="vertical" id="perfSettings">
|
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
2001-06-20 05:51:47 +00:00
|
|
|
<label id="perfLabel" value="&perfTitle.label;"/>
|
|
|
|
<vbox id="perfBox" autostretch="never">
|
|
|
|
<checkbox id="enableTurbo" label="&enableTurbo.label;" accesskey="&enableTurboCheck.accesskey;"/>
|
2001-07-09 18:41:07 +00:00
|
|
|
</vbox>
|
|
|
|
</groupbox>
|
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
2001-06-20 05:51:47 +00:00
|
|
|
|
2001-03-07 07:50:14 +00:00
|
|
|
</window>
|
2000-04-30 02:47:45 +00:00
|
|
|
|
1999-06-11 18:22:51 +00:00
|
|
|
|