home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / communicator / pref / pref-mousewheel.xul < prev    next >
Extensible Markup Language  |  2003-06-08  |  9KB  |  199 lines

  1. <?xml version="1.0"?> 
  2. <!--
  3.    The contents of this file are subject to the Netscape Public
  4.    License Version 1.1 (the "License"); you may not use this file
  5.    except in compliance with the License. You may obtain a copy of
  6.    the License at http://www.mozilla.org/NPL/
  7.     
  8.    Software distributed under the License is distributed on an "AS
  9.    IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10.    implied. See the License for the specific language governing
  11.    rights and limitations under the License.
  12.     
  13.    The Original Code is Mozilla Communicator client code, released
  14.    March 31, 1998.
  15.    
  16.    The Initial Developer of the Original Code is Netscape
  17.    Communications Corporation. Portions created by Netscape are
  18.    Copyright (C) 1998-1999 Netscape Communications Corporation. All
  19.    Rights Reserved.
  20.    
  21.    Contributor(s): 
  22.   bryner@uiuc.edu
  23.   sspitzer@netscape.com
  24.   -->
  25.  
  26. <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> 
  27.  
  28. <!DOCTYPE page [
  29. <!ENTITY % platformDTD SYSTEM "chrome://global-platform/locale/platformDialogOverlay.dtd" >
  30. %platformDTD;
  31. <!ENTITY % prefMousewheelDTD SYSTEM "chrome://communicator/locale/pref/pref-mousewheel.dtd" >
  32. %prefMousewheelDTD;
  33. ]>
  34.  
  35. <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  36.       onload="parent.initPanel('chrome://communicator/content/pref/pref-mousewheel.xul');"
  37.       headertitle="&title.label;">
  38.  
  39.   <script type="application/x-javascript">
  40.   <![CDATA[
  41.   var _elementIDs = ["mousewheelWithNoKeyAction", "mousewheelWithNoKeyNumlines", "mousewheelWithNoKeySysNumlines", 
  42.                      "mousewheelWithAltKeyAction", "mousewheelWithAltKeyNumlines", "mousewheelWithAltKeySysNumlines", 
  43.                      "mousewheelWithCtrlKeyAction", "mousewheelWithCtrlKeyNumlines", "mousewheelWithCtrlKeySysNumlines", 
  44.                      "mousewheelWithShiftKeyAction", "mousewheelWithShiftKeyNumlines", "mousewheelWithShiftKeySysNumlines"]; 
  45.    
  46.   function switchPage( aElement )
  47.   {
  48.     var deck = document.getElementById( "modifierDeck" );
  49.     deck.setAttribute( "selectedIndex", aElement.selectedItem.value );
  50.   }
  51.   
  52.   function doEnableElement( aEventTarget, aElementID )
  53.   {
  54.     var aElement = document.getElementById( aElementID );
  55.     if( aEventTarget.checked == true )
  56.       aElement.setAttribute( "disabled", "true" );
  57.     else
  58.       aElement.removeAttribute( "disabled" );
  59.   }
  60.   
  61.   function Startup()
  62.   {
  63.     var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines"];
  64.     var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines"];
  65.     for( var i = 0; i < checkboxes.length; i++ )
  66.     {
  67.       var currEl = document.getElementById( checkboxes[i] );
  68.       doEnableElement( currEl, fields[i] );
  69.     }
  70.   }  
  71.   
  72.    function enableField(aCheckbox, aNodeID, setFocus) 
  73.    { 
  74.      var el = document.getElementById(aNodeID); 
  75.      if (aCheckbox.checked) 
  76.        el.setAttribute("disabled", "true"); 
  77.      else 
  78.        el.removeAttribute("disabled"); 
  79.  
  80.      if (!el.disabled && setFocus)
  81.        el.focus();
  82.    } 
  83.  
  84.   ]]>
  85.   </script>
  86.  
  87.     <hbox align="center">
  88.       <label value="&mouseWheelPanel.label;" accesskey="&mouseWheelPanel.accesskey;" 
  89.              control="mouseWheelMode"/>
  90.     </hbox>
  91.  
  92.     <separator class="thin"/>
  93.   
  94.     <groupbox>
  95.       <caption>
  96.         <hbox> 
  97.           <menulist id="mouseWheelMode" oncommand="switchPage(this);"
  98.             preftype="bool" prefstring="pref.mousewheel.disable_button.modifier" prefattribute="disabled">
  99.             <menupopup>
  100.               <menuitem value="0" label="&usingJustTheWheel.label;"/>
  101.               <menuitem value="1" label="&usingWheelAndAlt.label;"/>
  102.               <menuitem value="2" label="&usingWheelAndCtrl.label;"/>
  103.               <menuitem value="3" label="&usingWheelAndShft.label;"/>
  104.             </menupopup>
  105.           </menulist>
  106.         </hbox>
  107.       </caption>
  108.  
  109.  
  110.     <deck id="modifierDeck" class="indent">
  111.       
  112.       <!-- no key modifiers -->
  113.       <radiogroup id="mousewheelWithNoKeyAction"
  114.                   prefstring="mousewheel.withnokey.action">
  115.         <hbox align="start">
  116.           <radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
  117.           <vbox align="start">
  118.             <hbox align="center">
  119.               <textbox id="mousewheelWithNoKeyNumlines" size="3" 
  120.                          preftype="int" prefstring="mousewheel.withnokey.numlines"
  121.                          prefattribute="value"/>
  122.               <label value="&scrollLines.label;"/>
  123.             </hbox>
  124.             <checkbox id="mousewheelWithNoKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
  125.                       prefstring="mousewheel.withnokey.sysnumlines"
  126.                       oncommand="enableField(this, 'mousewheelWithNoKeyNumlines', true);"/>
  127.           </vbox>
  128.         </hbox>
  129.         <radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
  130.         <radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
  131.         <radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
  132.       </radiogroup>
  133.         
  134.       <!-- alt modifiers -->
  135.       <radiogroup id="mousewheelWithAltKeyAction"
  136.                   prefstring="mousewheel.withaltkey.action">
  137.         <hbox align="start">
  138.           <radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
  139.           <vbox align="start">
  140.             <hbox align="center">
  141.               <textbox id="mousewheelWithAltKeyNumlines" size="3" 
  142.                         preftype="int" prefstring="mousewheel.withaltkey.numlines"/>
  143.               <label value="&scrollLines.label;"/>
  144.             </hbox>
  145.             <checkbox id="mousewheelWithAltKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
  146.                       prefstring="mousewheel.withaltkey.sysnumlines"
  147.                       oncommand="enableField(this, 'mousewheelWithAltKeyNumlines', true);"/>
  148.           </vbox>
  149.         </hbox>
  150.         <radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
  151.         <radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
  152.         <radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
  153.       </radiogroup>
  154.   
  155.       <!-- ctrl modifiers -->
  156.       <radiogroup id="mousewheelWithCtrlKeyAction"
  157.                   prefstring="mousewheel.withcontrolkey.action" >
  158.         <hbox align="start">
  159.           <radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
  160.           <vbox align="start">
  161.             <hbox align="center">
  162.               <textbox id="mousewheelWithCtrlKeyNumlines" size="3" 
  163.                        preftype="int" prefstring="mousewheel.withcontrolkey.numlines"/>
  164.               <label value="&scrollLines.label;"/>
  165.             </hbox>
  166.             <checkbox id="mousewheelWithCtrlKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
  167.                       prefstring="mousewheel.withcontrolkey.sysnumlines"
  168.                       oncommand="enableField(this, 'mousewheelWithCtrlKeyNumlines', true);"/>
  169.           </vbox>
  170.         </hbox>
  171.         <radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
  172.         <radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
  173.         <radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
  174.       </radiogroup>
  175.   
  176.       <!-- shift modifiers -->
  177.       <radiogroup id="mousewheelWithShiftKeyAction" prefstring="mousewheel.withshiftkey.action">
  178.         <hbox align="start">
  179.           <radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
  180.           <vbox align="start">
  181.             <hbox align="center">
  182.               <textbox id="mousewheelWithShiftKeyNumlines" size="3" 
  183.                          preftype="int" prefstring="mousewheel.withshiftkey.numlines"/>
  184.               <label value="&scrollLines.label;"/>
  185.             </hbox>
  186.             <checkbox id="mousewheelWithShiftKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
  187.                       prefstring="mousewheel.withshiftkey.sysnumlines"
  188.                       oncommand="enableField(this, 'mousewheelWithShiftKeyNumlines', true);"/>
  189.           </vbox>
  190.         </hbox>
  191.         <radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
  192.         <radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
  193.         <radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
  194.       </radiogroup>
  195.     </deck>     
  196.   </groupbox>
  197. </page>
  198.  
  199.