Bug 452317 - FeedConverter.js: QueryInterface should throw NS_ERROR_NO_INTERFACE...
[wine-gecko.git] / embedding / components / ui / progressDlg / nsProgressDialog.xul
blobfc164a858c9d125dab7cc0efb920e4c8a0821840
1 <?xml version="1.0"?>
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
16 - License.
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.
25 - Contributor(s):
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
55 interface.
57 See the implementation of that component in
58 http://lxr.mozilla.org/seamonkey/source/embedding/components/ui/progressDlg/nsProgressDialog.js
59 for details.
60 -->
62 <window xmlns:html="http://www.w3.org/1999/xhtml"
63 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
64 class="dialog"
65 title="&defaultTitle;"
66 onload="notifyObserver('onload')"
67 onunload="notifyObserver('onunload')"
68 style="width: 32em;">
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).
72 -->
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, '' );
81 ]]></script>
83 <!-- This is non-visible content that simply adds translatable string
84 into the document so that it is accessible to JS code.
85 -->
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>
104 <grid flex="1">
105 <columns>
106 <column/>
107 <column flex="1"/>
108 </columns>
110 <rows>
111 <row>
112 <hbox align="center" pack="end">
113 <label id="sourceLabel" value="&savingSource;"/>
114 </hbox>
115 <textbox id="source" class="scrollfield" readonly="true" flex="1"/>
116 </row>
117 <separator class="thin"/>
118 <row id="targetRow">
119 <hbox align="center" pack="end">
120 <label id="targetLabel" value="&savingTarget;"/>
121 </hbox>
122 <textbox id="target" class="scrollfield" readonly="true" flex="1"/>
123 </row>
124 <separator id="targetRowSeparator" class="thin"/>
125 <row>
126 <hbox align="center" pack="end">
127 <label value="&status;"/>
128 </hbox>
129 <label id="status" value="&#160;" flex="1"/>
130 </row>
131 <separator class="thin"/>
132 <row>
133 <hbox align="center" pack="end">
134 <label value="&timeLeft;"/>
135 </hbox>
136 <label id="timeLeft" value="&#160;"/>
137 </row>
138 <separator class="thin"/>
139 <row>
140 <hbox align="center" pack="end">
141 <label value="&timeElapsed;"/>
142 </hbox>
143 <label id="timeElapsed" value="&#160;"/>
144 </row>
145 <separator class="thin"/>
146 <row>
147 <hbox align="center" pack="end">
148 <label value="&progress;"/>
149 </hbox>
150 <progressmeter id="progress" mode="normal" value="0"/>
151 <hbox align="center" pack="end">
152 <label id="progressText" value="&#160;" style="width: 4em;"/>
153 </hbox>
154 </row>
155 <separator/>
156 </rows>
157 </grid>
158 <hbox align="center">
159 <checkbox id="keep" label="&keep;"/>
160 </hbox>
161 <separator id="keepSeparator"/>
162 <hbox>
163 <button id="cancel" label="&cancel;" oncommand="notifyObserver( 'oncancel' )"/>
164 <button id="pauseResume" label="&pause;" oncommand="window.notifyObserver( 'onpause' )"/>
165 <spacer flex="1"/>
166 <button id="launch" label="&launch;" disabled="true" oncommand="window.notifyObserver( 'onlaunch' )"/>
167 <button id="reveal" label="&reveal;" disabled="true" oncommand="window.notifyObserver( 'onreveal' )"/>
168 </hbox>
169 </window>