gecko-dev/xpfe/components/prefwindow/resources/content/pref-mousewheel.xul

217 lines
10 KiB
XML

<?xml version="1.0"?>
<!--
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/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
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):
bryner@uiuc.edu
sspitzer@netscape.com
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % platformDTD SYSTEM "chrome://global/locale/platformDialogOverlay.dtd" >
%platformDTD;
<!ENTITY % prefMousewheelDTD SYSTEM "chrome://communicator/locale/pref/pref-mousewheel.dtd" >
%prefMousewheelDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
onload="parent.initPanel('chrome://communicator/content/pref/pref-mousewheel.xul');"
orient="vertical">
<script language="JavaScript">
<![CDATA[
var _elementIDs = ["mousewheelWithNoKeyAction", "mousewheelWithNoKeyNumlines", "mousewheelWithNoKeySysNumlines",
"mousewheelWithAltKeyAction", "mousewheelWithAltKeyNumlines", "mousewheelWithAltKeySysNumlines",
"mousewheelWithCtrlKeyAction", "mousewheelWithCtrlKeyNumlines", "mousewheelWithCtrlKeySysNumlines",
"mousewheelWithShiftKeyAction", "mousewheelWithShiftKeyNumlines", "mousewheelWithShiftKeySysNumlines"];
function switchPage( aElement )
{
var deck = document.getElementById( "modifierDeck" );
deck.setAttribute( "index", aElement.selectedItem.data );
}
function doEnableElement( aEventTarget, aElementID )
{
var aElement = document.getElementById( aElementID );
if( aEventTarget.checked == true )
aElement.setAttribute( "disabled", "true" );
else
aElement.removeAttribute( "disabled" );
}
function Startup()
{
var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines"];
var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines"];
for( var i = 0; i < checkboxes.length; i++ )
{
var currEl = document.getElementById( checkboxes[i] );
doEnableElement( currEl, fields[i] );
}
}
function enableField(aCheckbox, aNodeID)
{
var el = document.getElementById(aNodeID);
if (aCheckbox.checked)
el.setAttribute("disabled", "true");
else
el.removeAttribute("disabled");
}
]]>
</script>
<script language="javascript" src="chrome://global/content/strres.js"></script>
<script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"></script>
<box class="box-smallheader" title="&title.label;"/>
<box orient="vertical">
<box valign="bottom" autostretch="never">
<box orient="vertical">
<text class="label" value="&mouseWheelPanel.label;" accesskey="&mouseWheelPanel.accesskey;"
for="mouseWheelMode"/>
</box>
</box>
</box>
<separator class="thin"/>
<titledbox orient="vertical">
<title>
<box>
<menulist id="mouseWheelMode" oncommand="switchPage(this);">
<menupopup>
<menuitem data="0" value="&usingJustTheWheel.label;"/>
<menuitem data="1" value="&usingWheelAndAlt.label;"/>
<menuitem data="2" value="&usingWheelAndCtrl.label;"/>
<menuitem data="3" value="&usingWheelAndShft.label;"/>
</menupopup>
</menulist>
</box>
</title>
<deck id="modifierDeck" class="indent">
<!-- no key modifiers -->
<radiogroup id="mousewheelWithNoKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withnokey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio group="mousewheelWithNoKeyAction" data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<hbox autostretch="never">
<textfield id="mousewheelWithNoKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withnokey.numlines"
prefattribute="value"/>
<text class="label" value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithNoKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withnokey.sysnumlines"
prefattribute="checked" oncommand="enableField(this, 'mousewheelWithNoKeyNumlines');"/>
</box>
</box>
<radio group="mousewheelWithNoKeyAction" data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio group="mousewheelWithNoKeyAction" data="2" value="&history.label;" accesskey="&history.accesskey;"/>
<radio group="mousewheelWithNoKeyAction" data="3" value="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<!-- alt modifiers -->
<radiogroup id="mousewheelWithAltKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withaltkey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio group="mousewheelWithAltKeyAction" data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<hbox autostretch="never">
<textfield id="mousewheelWithAltKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withaltkey.numlines"
prefattribute="value"/>
<text class="label" value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithAltKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withaltkey.sysnumlines"
prefattribute="checked" oncommand="enableField(this, 'mousewheelWithAltKeyNumlines');"/>
</box>
</box>
<radio group="mousewheelWithAltKeyAction" data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio group="mousewheelWithAltKeyAction" data="2" value="&history.label;" accesskey="&history.accesskey;"/>
<radio group="mousewheelWithAltKeyAction" data="3" value="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<!-- ctrl modifiers -->
<radiogroup id="mousewheelWithCtrlKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio group="mousewheelWithCtrlKeyAction" data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<hbox autostretch="never">
<textfield id="mousewheelWithCtrlKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.numlines"
prefattribute="value"/>
<text class="label" value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithCtrlKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withcontrolkey.sysnumlines"
prefattribute="checked" oncommand="enableField(this, 'mousewheelWithCtrlKeyNumlines');"/>
</box>
</box>
<radio group="mousewheelWithCtrlKeyAction" data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio group="mousewheelWithCtrlKeyAction" data="2" value="&history.label;" accesskey="&history.accesskey;"/>
<radio group="mousewheelWithCtrlKeyAction" data="3" value="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<!-- shift modifiers -->
<radiogroup id="mousewheelWithShiftKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withshiftkey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio group="mousewheelWithShiftKeyAction" data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<hbox autostretch="never">
<textfield id="mousewheelWithShiftKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withshiftkey.numlines"
prefattribute="value"/>
<text class="label" value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithShiftKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withshiftkey.sysnumlines"
prefattribute="checked" oncommand="enableField(this, 'mousewheelWithShiftKeyNumlines');"/>
</box>
</box>
<radio group="mousewheelWithShiftKeyAction" data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio group="mousewheelWithShiftKeyAction" data="2" value="&history.label;" accesskey="&history.accesskey;"/>
<radio group="mousewheelWithShiftKeyAction" data="3" value="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
</deck>
</titledbox>
</window>