Bug 274179 Add horizontal options to mouse wheel prefs panel

p=mozilla@Weilbacher.org r=neil.parkwaycc.co.uk sr=jag
This commit is contained in:
bugzilla%arlen.demon.co.uk 2005-02-04 13:19:14 +00:00
parent 1f31b87336
commit 044006f0b9
3 changed files with 228 additions and 85 deletions

View File

@ -375,8 +375,12 @@ you&apos;re not already viewing it, follow these steps:</p>
</ol>
<p>The Mouse Wheel preferences panel allows you to control how the mouse wheel
on your mouse (in between your mouse buttons) is used in
&brandShortName;:</p>
on your mouse (in between your mouse buttons) is used in &brandShortName;.
Modern mice may have two wheels or a button that can be used to switch the
scroll direction of the wheel. The behaviour for the vertical wheel function
is set in the upper panel <strong>Vertical scrolling</strong> while the
horizontal mode is controlled by the lower panel <strong>Horizontal
scrolling</strong>.</p>
<ul>
<li>Select <q>No modifier key</q> or select a key that you want to use
@ -385,16 +389,18 @@ you&apos;re not already viewing it, follow these steps:</p>
<ul>
<li><strong>Scroll the document by</strong>: Choose this to scroll the
document by the number of lines typed in the field.
document by the number of lines (or characters for horizontal movement)
typed in the field.
<ul>
<li><strong>Use system default</strong>: Choose this to use your
system&apos;s default setting&mdash;the number of lines you may
have previously entered will be overridden.</li>
system&apos;s default setting&mdash;the number of lines (characters)
you may have previously entered will be overridden.</li>
</ul>
</li>
<li><strong>Scroll a page up or a page down</strong>: Choose this to
scroll up or down one page at a time. This setting allows faster, but
less accurate scrolling through a page with your mouse wheel.</li>
<li><strong>Scroll a page up (left) or a page down (right)</strong>:
Choose this to scroll up or down one page at a time. This setting allows
faster, but less accurate scrolling through a page with your mouse
wheel.</li>
<li><strong>Move back and forward in the browsing history</strong>:
Choose this to use the mouse wheel to navigate back or forward to
previous pages you&apos;ve visited.</li>
@ -407,6 +413,9 @@ you&apos;re not already viewing it, follow these steps:</p>
<p><strong>Note</strong>: Each modifier key can be assigned to a different
function.</p>
</li>
<li>If your mouse does not have a mode for horizontal scrolling, any setting
in the lower panel <strong>Horizontal scrolling</strong> will be ignored.
</li>
</ul>
<p>[<a href="#advanced_preferences">Return to beginning of section</a>]</p>

View File

@ -23,6 +23,7 @@
Contributor(s):
bryner@brianryner.com
sspitzer@netscape.com
Peter Weilbacher <mozilla@weilbacher.org>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
@ -56,7 +57,11 @@
var _elementIDs = ["mousewheelWithNoKeyAction", "mousewheelWithNoKeyNumlines", "mousewheelWithNoKeySysNumlines",
"mousewheelWithAltKeyAction", "mousewheelWithAltKeyNumlines", "mousewheelWithAltKeySysNumlines",
"mousewheelWithCtrlKeyAction", "mousewheelWithCtrlKeyNumlines", "mousewheelWithCtrlKeySysNumlines",
"mousewheelWithShiftKeyAction", "mousewheelWithShiftKeyNumlines", "mousewheelWithShiftKeySysNumlines"];
"mousewheelWithShiftKeyAction", "mousewheelWithShiftKeyNumlines", "mousewheelWithShiftKeySysNumlines",
"mousewheelHorizWithNoKeyAction", "mousewheelWithNoKeyNumchars", "mousewheelWithNoKeySysNumchars",
"mousewheelHorizWithAltKeyAction", "mousewheelWithAltKeyNumchars", "mousewheelWithAltKeySysNumchars",
"mousewheelHorizWithCtrlKeyAction", "mousewheelWithCtrlKeyNumchars", "mousewheelWithCtrlKeySysNumchars",
"mousewheelHorizWithShiftKeyAction", "mousewheelWithShiftKeyNumchars", "mousewheelWithShiftKeySysNumchars"];
function switchPage( aElement )
{
@ -75,8 +80,10 @@
function Startup()
{
var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines"];
var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines"];
var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines",
"mousewheelWithNoKeyNumchars", "mousewheelWithAltKeyNumchars", "mousewheelWithCtrlKeyNumchars", "mousewheelWithShiftKeyNumchars"];
var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines",
"mousewheelWithNoKeySysNumchars", "mousewheelWithAltKeySysNumchars", "mousewheelWithCtrlKeySysNumchars", "mousewheelWithShiftKeySysNumchars"];
for( var i = 0; i < checkboxes.length; i++ )
{
var currEl = document.getElementById( checkboxes[i] );
@ -114,88 +121,206 @@
<tabpanels>
<!-- no key modifiers -->
<radiogroup id="mousewheelWithNoKeyAction"
prefstring="mousewheel.withnokey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithNoKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withnokey.numlines"
prefattribute="value"/>
<label value="&scrollLines.label;"/>
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<radiogroup id="mousewheelWithNoKeyAction"
prefstring="mousewheel.withnokey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithNoKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withnokey.numlines"
prefattribute="value"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithNoKeySysNumlines" label="&useSystemDefault.label;"
accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withnokey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithNoKeyNumlines', true);"/>
</vbox>
</hbox>
<checkbox id="mousewheelWithNoKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withnokey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithNoKeyNumlines', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithNoKeyAction"
prefstring="mousewheel.horizscroll.withnokey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithNoKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withnokey.numlines"
prefattribute="value"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithNoKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withnokey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithNoKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
<!-- alt modifiers -->
<radiogroup id="mousewheelWithAltKeyAction"
prefstring="mousewheel.withaltkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithAltKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withaltkey.numlines"/>
<label value="&scrollLines.label;"/>
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<radiogroup id="mousewheelWithAltKeyAction"
prefstring="mousewheel.withaltkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithAltKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withaltkey.numlines"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithAltKeySysNumlines" label="&useSystemDefault.label;"
accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withaltkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithAltKeyNumlines', true);"/>
</vbox>
</hbox>
<checkbox id="mousewheelWithAltKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withaltkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithAltKeyNumlines', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithAltKeyAction"
prefstring="mousewheel.horizscroll.withaltkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithAltKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withaltkey.numlines"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithAltKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withaltkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithAltKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
<!-- ctrl modifiers -->
<radiogroup id="mousewheelWithCtrlKeyAction"
prefstring="mousewheel.withcontrolkey.action" >
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithCtrlKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withcontrolkey.numlines"/>
<label value="&scrollLines.label;"/>
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<radiogroup id="mousewheelWithCtrlKeyAction"
prefstring="mousewheel.withcontrolkey.action" >
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithCtrlKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withcontrolkey.numlines"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithCtrlKeySysNumlines" label="&useSystemDefault.label;"
accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withcontrolkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithCtrlKeyNumlines', true);"/>
</vbox>
</hbox>
<checkbox id="mousewheelWithCtrlKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withcontrolkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithCtrlKeyNumlines', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithCtrlKeyAction"
prefstring="mousewheel.horizscroll.withcontrolkey.action" >
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithCtrlKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withcontrolkey.numlines"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithCtrlKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withcontrolkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithCtrlKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
<!-- shift modifiers -->
<radiogroup id="mousewheelWithShiftKeyAction" prefstring="mousewheel.withshiftkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithShiftKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withshiftkey.numlines"/>
<label value="&scrollLines.label;"/>
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<radiogroup id="mousewheelWithShiftKeyAction"
prefstring="mousewheel.withshiftkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithShiftKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withshiftkey.numlines"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithShiftKeySysNumlines" label="&useSystemDefault.label;"
accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withshiftkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithShiftKeyNumlines', true);"/>
</vbox>
</hbox>
<checkbox id="mousewheelWithShiftKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withshiftkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithShiftKeyNumlines', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithShiftKeyAction"
prefstring="mousewheel.horizscroll.withshiftkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithShiftKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withshiftkey.numlines"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithShiftKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withshiftkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithShiftKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
</tabpanels>
</tabbox>
</page>

View File

@ -8,14 +8,23 @@
<!ENTITY usingWheelAndAlt.label "&altKey.label;">
<!ENTITY usingWheelAndCtrl.label "&ctrlKey.label;">
<!ENTITY usingWheelAndShft.label "&shiftKey.label;">
<!ENTITY mousewheelGroup.label "Vertical scrolling">
<!ENTITY mousewheelHorizGroup.label "Horizontal scrolling">
<!ENTITY scroll.label "Scroll the document by ">
<!ENTITY scroll.accesskey "s">
<!ENTITY scrollHoriz.accesskey "c">
<!ENTITY scrollLines.label " lines. ">
<!ENTITY scrollChars.label " characters. ">
<!ENTITY useSystemDefault.label "Use system default">
<!ENTITY useSystemDefault.accesskey "y">
<!ENTITY useSystemDefaultHoriz.accesskey "d">
<!ENTITY scrollPgUpPgDn.label "Scroll a page up or a page down">
<!ENTITY scrollPgUpPgDn.accesskey "p">
<!ENTITY scrollPgLtPgRt.label "Scroll a page left or a page right">
<!ENTITY scrollPgLtPgRt.accesskey "o">
<!ENTITY history.label "Move back and forward in the browsing history">
<!ENTITY history.accesskey "h">
<!ENTITY history.accesskey "m">
<!ENTITY historyHoriz.accesskey "b">
<!ENTITY textsize.label "Make the text larger or smaller">
<!ENTITY textsize.accesskey "t">
<!ENTITY textsizeHoriz.accesskey "e">