3 <!-- -*- Mode: HTML -*- -->
5 <!-- ***** BEGIN LICENSE BLOCK *****
6 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
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/
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
18 - The Original Code is Mozilla Progress Dialog.
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.
26 - Scott MacGregor <mscott@netscape.com>
27 - Bill Law <law@netscape.com>
28 - Aaron Kaluszka <ask@swva.net>
30 - Alternatively, the contents of this file may be used under the terms of
31 - either the GNU General Public License Version 2 or later (the "GPL"), or
32 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
33 - in which case the provisions of the GPL or the LGPL are applicable instead
34 - of those above. If you wish to allow use of your version of this file only
35 - under the terms of either the GPL or the LGPL, and not to allow others to
36 - use your version of this file under the terms of the MPL, indicate your
37 - decision by deleting the provisions above and replace them with the notice
38 - and other provisions required by the LGPL or the GPL. If you do not delete
39 - the provisions above, a recipient may use your version of this file under
40 - the terms of any one of the MPL, the GPL or the LGPL.
42 - ***** END LICENSE BLOCK ***** -->
44 <?xml-stylesheet href=
"chrome://global/skin/" type=
"text/css"?>
45 <?xul-overlay href=
"chrome://global/content/dialogOverlay.xul"?>
47 <!DOCTYPE window SYSTEM
"chrome://global/locale/nsProgressDialog.dtd">
49 <!-- This dialog can only be opened by creating an instance of the
50 component "@mozilla.org/progressdialog;1". You cannot open it
51 via window.open (or window.openDialog, or any variants thereof).
53 That code will pass an nsIObserver interface via window.arguments[0].
54 All "commands" in this dialog simply send notifications via that
57 See the implementation of that component in
58 http://lxr.mozilla.org/seamonkey/source/embedding/components/ui/progressDlg/nsProgressDialog.js
62 <window xmlns:
html=
"http://www.w3.org/1999/xhtml"
63 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
65 title=
"&defaultTitle;"
66 onload=
"notifyObserver('onload')"
67 onunload=
"notifyObserver('onunload')"
70 <!-- This is the only JS code in this file. It simply routes the "command"
71 to the dialog's observer (the implementation in nsProgressDialog.js).
73 <script type=
"application/x-javascript"><![CDATA[
74 function notifyObserver( cmd ) {
75 // Remember observer at onload time.
76 if ( cmd == 'onload' ) {
77 window.observer = window.arguments[
0].QueryInterface( Components.interfaces.nsIObserver );
79 window.observer.observe( null, cmd, '' );
83 <!-- This is non-visible content that simply adds translatable string
84 into the document so that it is accessible to JS code.
87 <data id=
"string.close">&close;</data>
88 <data id=
"string.progressMsg">&progressMsg;</data>
89 <data id=
"string.completeMsg">&completeMsg;</data>
90 <data id=
"string.percentMsg">&percentMsg;</data>
91 <data id=
"string.shortTimeFormat">&shortTimeFormat;</data>
92 <data id=
"string.longTimeFormat">&longTimeFormat;</data>
93 <data id=
"string.unknownTime">&unknownTime;</data>
94 <data id=
"string.pausedMsg">&pausedMsg;</data>
95 <data id=
"string.savingTitle">&savingTitle;</data>
96 <data id=
"string.openingTitle">&openingTitle;</data>
97 <data id=
"string.openingSource">&openingSource;</data>
98 <data id=
"string.openingTarget">&openingTarget;</data>
99 <data id=
"string.unknownSavingTitle">&unknownSavingTitle;</data>
100 <data id=
"string.unknownOpeningTitle">&unknownOpeningTitle;</data>
101 <data id=
"string.pause">&pause;</data>
102 <data id=
"string.resume">&resume;</data>
112 <hbox align=
"center" pack=
"end">
113 <label id=
"sourceLabel" value=
"&savingSource;"/>
115 <textbox id=
"source" class=
"scrollfield" readonly=
"true" flex=
"1"/>
117 <separator class=
"thin"/>
119 <hbox align=
"center" pack=
"end">
120 <label id=
"targetLabel" value=
"&savingTarget;"/>
122 <textbox id=
"target" class=
"scrollfield" readonly=
"true" flex=
"1"/>
124 <separator id=
"targetRowSeparator" class=
"thin"/>
126 <hbox align=
"center" pack=
"end">
127 <label value=
"&status;"/>
129 <label id=
"status" value=
" " flex=
"1"/>
131 <separator class=
"thin"/>
133 <hbox align=
"center" pack=
"end">
134 <label value=
"&timeLeft;"/>
136 <label id=
"timeLeft" value=
" "/>
138 <separator class=
"thin"/>
140 <hbox align=
"center" pack=
"end">
141 <label value=
"&timeElapsed;"/>
143 <label id=
"timeElapsed" value=
" "/>
145 <separator class=
"thin"/>
147 <hbox align=
"center" pack=
"end">
148 <label value=
"&progress;"/>
150 <progressmeter id=
"progress" mode=
"normal" value=
"0"/>
151 <hbox align=
"center" pack=
"end">
152 <label id=
"progressText" value=
" " style=
"width: 4em;"/>
158 <hbox align=
"center">
159 <checkbox id=
"keep" label=
"&keep;"/>
161 <separator id=
"keepSeparator"/>
163 <button id=
"cancel" label=
"&cancel;" oncommand=
"notifyObserver( 'oncancel' )"/>
164 <button id=
"pauseResume" label=
"&pause;" oncommand=
"window.notifyObserver( 'onpause' )"/>
166 <button id=
"launch" label=
"&launch;" disabled=
"true" oncommand=
"window.notifyObserver( 'onlaunch' )"/>
167 <button id=
"reveal" label=
"&reveal;" disabled=
"true" oncommand=
"window.notifyObserver( 'onreveal' )"/>