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 / cookie / pref-images.xul < prev    next >
Extensible Markup Language  |  2003-06-07  |  5KB  |  153 lines

  1. <?xml version="1.0"?> 
  2.  
  3. <!--
  4.    The contents of this file are subject to the Netscape Public
  5.    License Version 1.1 (the "License"); you may not use this file
  6.    except in compliance with the License. You may obtain a copy of
  7.    the License at http://www.mozilla.org/NPL/
  8.     
  9.    implied. See the License for the specific language governing
  10.    rights and limitations under the License.
  11.     
  12.    The Original Code is Mozilla Communicator client code, released
  13.    March 31, 1998.
  14.    
  15.    The Initial Developer of the Original Code is Netscape
  16.    Communications Corporation. Portions created by Netscape are
  17.    Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.    Rights Reserved.
  19.    
  20.    Contributor(s): 
  21.      Hσkan Waara <hwaara@chello.se>
  22.      Peter Annema <disttsc@bart.nl>
  23.   -->
  24. <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
  25.  
  26. <!DOCTYPE window [
  27. <!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
  28. %brandDTD;
  29. <!ENTITY % prefImagesDTD SYSTEM "chrome://cookie/locale/pref-images.dtd" >
  30. %prefImagesDTD;
  31. ]>
  32.  
  33. <page id="imagesPanel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  34.       onload="init();"
  35.       headertitle="&lHeader;">
  36.           
  37.   <script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
  38.  
  39.   <script type="application/x-javascript">
  40.   <![CDATA[
  41.   
  42.   var panel = "chrome://cookie/content/pref-images.xul";
  43.   var _elementIDs = ["accOrgImages", "networkImageBehaviour", "networkImageWarnAboutImages", "imageLooping"];
  44.  
  45.   function init()
  46.   {
  47.     parent.initPanel('chrome://cookie/content/pref-images.xul');
  48.  
  49.     imageBlockingEnabled();
  50.     setDisables();
  51.   }
  52.  
  53.   // Present finer control over image loading to the user.
  54.   // enable image blocker if "imageblocker.enabled" pref is true
  55.   function imageBlockingEnabled()
  56.   {
  57.     var enabled;
  58.     try {
  59.       enabled = parent.hPrefWindow.getPref("bool", "imageblocker.enabled");
  60.     }
  61.     catch(ex) {
  62.       enabled = false;
  63.     }
  64.     if (!enabled)
  65.     {
  66.       document.getElementById("haveImageBlocking").setAttribute("hidden", "true");
  67.       if (!document.getElementById("networkImageDisableImagesInMailNews"))
  68.         document.getElementById("haveImageBlockingOrMailnews").setAttribute("hidden", "true");
  69.     }
  70.   }
  71.  
  72.   function setDisables()
  73.   {
  74.     var imageBehavior = document.getElementById("networkImageBehaviour");
  75.     setWarnAboutImagesEnabled(imageBehavior.value != "2");
  76.  
  77.     // if mailnews is installed then we will have networkImageDisableImagesInMailNews checkbox
  78.     var networkImageDisableImagesInMailNews = document.getElementById("networkImageDisableImagesInMailNews");
  79.     if (networkImageDisableImagesInMailNews)
  80.       networkImageDisableImagesInMailNews.disabled = (imageBehavior.value == 2); 
  81.   }
  82.  
  83.   function setWarnAboutImagesEnabled(aEnabled)
  84.   {
  85.     var warnCheckbox = document.getElementById("networkImageWarnAboutImages");
  86.     if (warnCheckbox)
  87.     {
  88.       warnCheckbox.disabled = !aEnabled;
  89.       if (parent.hPrefWindow.getPrefIsLocked(warnCheckbox.getAttribute("prefstring")) )
  90.         warnCheckbox.disabled = true;
  91.     }
  92.   }
  93.  
  94.   ]]>
  95.   </script>
  96.  
  97.   <broadcaster id="haveImageBlocking"/>
  98.   <broadcaster id="haveImageBlockingOrMailnews"/>
  99.  
  100.   <groupbox id="imagesArea">
  101.     <caption label="&imageBlocking.label;"/>
  102.  
  103.     <description>&imageDetails;</description>
  104.  
  105.     <radiogroup id="networkImageBehaviour"
  106.                 prefstring="network.image.imageBehavior">
  107.       <radio value="2" label="&disableImages.label;"
  108.              accesskey="&disableImages.accesskey;"
  109.              oncommand="setDisables();"/>
  110.       <radio value="1" label="&accOrgImagesRadio.label;"
  111.              accesskey="&accOrgImagesRadio.accesskey;"
  112.              id="accOrgImages" observes="haveImageBlocking"
  113.              oncommand="setDisables();"/>
  114.       <radio value="0" label="&accAllImagesRadio.label;"
  115.              accesskey="&accAllImagesRadio.accesskey;"
  116.              oncommand="setDisables();"/>
  117.     </radiogroup>
  118.  
  119.     <separator id="networkImagesBehaviorSeparator" observes="haveImageBlockingOrMailnews"/>
  120.  
  121. <!--
  122.     <vbox align="start">
  123.       <checkbox id="networkImageWarnAboutImages" label="&warnAboutImages.label;"
  124.                 accesskey="&warnAboutImages.accesskey;" observes="haveImageBlocking"
  125.                 prefstring="network.image.warnAboutImages"/>
  126.     </vbox>
  127. -->
  128.  
  129.     <separator observes="haveImageBlocking"/>
  130.  
  131.     <hbox pack="end">
  132.       <button id="viewImages" label="&viewImages.label;"
  133.               accesskey="&viewImages.accesskey;" oncommand="viewImages();"
  134.               observes="haveImageBlocking"
  135.               prefstring="pref.advanced.images.disable_button.view_image"/>
  136.     </hbox>
  137.  
  138.   </groupbox>
  139.   <groupbox>
  140.     <caption label="&animLoopingTitle.label;"/>
  141.     <radiogroup id="imageLooping"
  142.                 preftype="string" prefstring="image.animation_mode">
  143.         <radio value="normal" label="&animLoopAsSpecified.label;"
  144.                accesskey="&animLoopAsSpecified.accesskey;"/>
  145.         <radio value="once" label="&animLoopOnce.label;"
  146.                accesskey="&animLoopOnce.accesskey;"/>
  147.         <radio value="none" label="&animLoopNever.label;"
  148.                accesskey="&animLoopNever.accesskey;"/>
  149.     </radiogroup>
  150.   </groupbox>
  151.  
  152. </page>
  153.