home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / 01_03.iso / software / ghostzilla_hit / files / ghostzilla-1.0-plus-install.exe / chrome / toolkit.jar / content / global / nsProgressDialog.xul < prev    next >
Encoding:
Extensible Markup Language  |  2002-04-09  |  6.8 KB  |  166 lines

  1. <?xml version="1.0"?> 
  2.  
  3.  <!-- -*- Mode: HTML -*- -->
  4.  
  5. <!-- ***** BEGIN LICENSE BLOCK *****
  6.    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
  7.    -
  8.    - The contents of this file are subject to the Mozilla Public License Version
  9.    - 1.1 (the "License"); you may not use this file except in compliance with
  10.    - the License. You may obtain a copy of the License at
  11.    - http://www.mozilla.org/MPL/
  12.    -
  13.    - Software distributed under the License is distributed on an "AS IS" basis,
  14.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  15.    - for the specific language governing rights and limitations under the
  16.    - License.
  17.    -
  18.    - The Original Code is Mozilla Progress Dialog.
  19.    -
  20.    - The Initial Developer of the Original Code is
  21.    - Netscape Communications Corp.
  22.    - Portions created by the Initial Developer are Copyright (C) 2002
  23.    - the Initial Developer. All Rights Reserved.
  24.    -
  25.    - Contributor(s):
  26.    -   Scott MacGregor <mscott@netscape.com>
  27.    -   Bill Law        <law@netscape.com>
  28.    -
  29.    - Alternatively, the contents of this file may be used under the terms of
  30.    - either the GNU General Public License Version 2 or later (the "GPL"), or
  31.    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  32.    - in which case the provisions of the GPL or the LGPL are applicable instead
  33.    - of those above. If you wish to allow use of your version of this file only
  34.    - under the terms of either the GPL or the LGPL, and not to allow others to
  35.    - use your version of this file under the terms of the MPL, indicate your
  36.    - decision by deleting the provisions above and replace them with the notice
  37.    - and other provisions required by the LGPL or the GPL. If you do not delete
  38.    - the provisions above, a recipient may use your version of this file under
  39.    - the terms of any one of the MPL, the GPL or the LGPL.
  40.    -
  41.    - ***** END LICENSE BLOCK ***** -->
  42.  
  43. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  44. <?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
  45.  
  46. <!DOCTYPE window SYSTEM "chrome://global/locale/nsProgressDialog.dtd">
  47.  
  48. <!-- This dialog can only be opened by creating an instance of the
  49.      component "@mozilla.org/progressdialog;1".  You cannot open it
  50.      via window.open (or window.openDialog, or any variants thereof).
  51.  
  52.      That code will pass an nsIObserver interface via window.arguments[0].
  53.      All "commands" in this dialog simply send notifications via that
  54.      interface.
  55.  
  56.      See the implementation of that component in
  57.      http://lxr.mozilla.org/seamonkey/source/embedding/components/ui/progressDlg/nsProgressDialog.js
  58.      for details.
  59. -->
  60.  
  61. <window xmlns:html="http://www.w3.org/1999/xhtml"
  62.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  63.         class="dialog"
  64.         title="&defaultTitle;"
  65.         onload="notifyObserver('onload')"
  66.         onunload="notifyObserver('onunload')">
  67.  
  68.     <!-- This is the only JS code in this file.  It simply routes the "command"
  69.          to the dialog's observer (the implementation in nsProgressDialog.js).
  70.     -->
  71.     <script type="application/x-javascript"><![CDATA[
  72.         function notifyObserver( cmd ) {
  73.             // Remember observer at onload time.
  74.             if ( cmd == 'onload' ) {
  75.                 window.observer = window.arguments[0].QueryInterface( Components.interfaces.nsIObserver );
  76.             }
  77.             window.observer.observe( null, cmd, '' );
  78.         }
  79.     ]]></script>
  80.  
  81.     <!-- This is non-visible content that simply adds translatable string
  82.          into the document so that it is accessible to JS code.
  83.     -->
  84.   
  85.     <data id="string.close">&close;</data>
  86.     <data id="string.progressMsg">&progressMsg;</data>
  87.     <data id="string.completeMsg">&completeMsg;</data>
  88.     <data id="string.percentMsg">&percentMsg;</data>
  89.     <data id="string.shortTimeFormat">&shortTimeFormat;</data>
  90.     <data id="string.longTimeFormat">&longTimeFormat;</data>
  91.     <data id="string.unknownTime">&unknownTime;</data>
  92.     <data id="string.pausedMsg">&pausedMsg;</data>
  93.     <data id="string.savingTitle">&savingTitle;</data>
  94.     <data id="string.openingTitle">&openingTitle;</data>
  95.     <data id="string.openingSource">&openingSource;</data>
  96.     <data id="string.openingTarget">&openingTarget;</data>
  97.     <data id="string.pause">&pause;</data>
  98.     <data id="string.resume">&resume;</data>
  99.  
  100.     <grid flex="1">
  101.         <columns>
  102.             <column/>
  103.             <column flex="1"/>
  104.         </columns>
  105.       
  106.         <rows>
  107.             <row>
  108.                 <hbox align="center" pack="end">
  109.                     <label id="sourceLabel" value="&savingSource;"/>
  110.                 </hbox>
  111.                 <textbox id="source" class="scrollfield" readonly="true" flex="1"/>
  112.             </row>
  113.             <separator class="thin"/>
  114.             <row id="targetRow">
  115.                 <hbox align="center" pack="end">
  116.                     <label id="targetLabel" value="&savingTarget;"/>
  117.                 </hbox>
  118.                 <textbox id="target" class="scrollfield" readonly="true" flex="1"/>
  119.             </row>
  120.             <separator id="targetRowSeparator" class="thin"/>
  121.             <row>
  122.                 <hbox align="center" pack="end">
  123.                     <label value="&status;"/>
  124.                 </hbox>
  125.                 <label id="status" value=" " flex="1"/>
  126.             </row>
  127.             <separator class="thin"/>
  128.             <row>
  129.                 <hbox align="center" pack="end">
  130.                     <label value="&timeLeft;"/>
  131.                 </hbox>
  132.                 <label id="timeLeft" value=" "/>
  133.             </row>
  134.             <separator class="thin"/>
  135.             <row>
  136.                 <hbox align="center" pack="end">
  137.                     <label value="&timeElapsed;"/>
  138.                 </hbox>
  139.                 <label id="timeElapsed" value=" "/>
  140.             </row>
  141.             <separator class="thin"/>
  142.             <row>             
  143.                 <hbox align="center" pack="end">
  144.                     <label value="&progress;"/>
  145.                 </hbox>
  146.                 <progressmeter id="progress" mode="normal" value="0"/>
  147.                 <hbox align="center" pack="end">
  148.                     <label id="progressText" value=" " style="width: 4em;"/>
  149.                 </hbox>
  150.             </row>
  151.             <separator/>
  152.       </rows>
  153.     </grid>
  154.     <hbox align="center">
  155.         <checkbox id="keep" label="&keep;"/>
  156.     </hbox>
  157.     <separator id="keepSeparator"/>
  158.     <hbox>
  159.         <button id="cancel" label="&cancel;" oncommand="notifyObserver( 'oncancel' )"/>
  160.         <button id="pauseResume"  label="&pause;"  oncommand="window.notifyObserver( 'onpause' )"/>
  161.         <spacer flex="1"/>
  162.         <button id="launch" label="&launch;" disabled="true" oncommand="window.notifyObserver( 'onlaunch' )"/>
  163.         <button id="reveal" label="&reveal;" disabled="true" oncommand="window.notifyObserver( 'onreveal' )"/>
  164.     </hbox>
  165. </window>
  166.