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

175 lines
7.8 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/TR/REC-html40"
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[
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] );
}
}
]]>
</script>
<box class="box-smallheader" title="&title.label;"/>
<titledbox orient="vertical">
<title><text value="&mouseWheelTitle.label;"/></title>
<box>
<text class="label" value="&mouseWheelPanel.label;" accesskey="&mouseWheelPanel.accesskey;" for="mouseWheelMode"/>
<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>
<deck id="modifierDeck" flex="1" 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 data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithNoKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withnokey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithNoKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withnokey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.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 data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithAltKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withaltkey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithAltKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withaltkey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.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 data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithCtrlKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithCtrlKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withcontrolkey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.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 data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithShiftKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withshiftkey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithShiftKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withshiftkey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.accesskey;"/>
</radiogroup>
</deck>
</titledbox>
</window>