pjs/embedding/components/ui/progressDlg/nsProgressDialog.xul

170 строки
7.0 KiB
XML

<?xml version="1.0"?>
<!-- -*- Mode: HTML -*- -->
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Progress Dialog.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Scott MacGregor <mscott@netscape.com>
- Bill Law <law@netscape.com>
- Aaron Kaluszka <ask@swva.net>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://global/locale/nsProgressDialog.dtd">
<!-- This dialog can only be opened by creating an instance of the
component "@mozilla.org/progressdialog;1". You cannot open it
via window.open (or window.openDialog, or any variants thereof).
That code will pass an nsIObserver interface via window.arguments[0].
All "commands" in this dialog simply send notifications via that
interface.
See the implementation of that component in
http://lxr.mozilla.org/seamonkey/source/embedding/components/ui/progressDlg/nsProgressDialog.js
for details.
-->
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
title="&defaultTitle;"
onload="notifyObserver('onload')"
onunload="notifyObserver('onunload')"
style="width: 32em;">
<!-- This is the only JS code in this file. It simply routes the "command"
to the dialog's observer (the implementation in nsProgressDialog.js).
-->
<script type="application/x-javascript"><![CDATA[
function notifyObserver( cmd ) {
// Remember observer at onload time.
if ( cmd == 'onload' ) {
window.observer = window.arguments[0].QueryInterface( Components.interfaces.nsIObserver );
}
window.observer.observe( null, cmd, '' );
}
]]></script>
<!-- This is non-visible content that simply adds translatable string
into the document so that it is accessible to JS code.
-->
<data id="string.close">&close;</data>
<data id="string.progressMsg">&progressMsg;</data>
<data id="string.completeMsg">&completeMsg;</data>
<data id="string.percentMsg">&percentMsg;</data>
<data id="string.shortTimeFormat">&shortTimeFormat;</data>
<data id="string.longTimeFormat">&longTimeFormat;</data>
<data id="string.unknownTime">&unknownTime;</data>
<data id="string.pausedMsg">&pausedMsg;</data>
<data id="string.savingTitle">&savingTitle;</data>
<data id="string.openingTitle">&openingTitle;</data>
<data id="string.openingSource">&openingSource;</data>
<data id="string.openingTarget">&openingTarget;</data>
<data id="string.unknownSavingTitle">&unknownSavingTitle;</data>
<data id="string.unknownOpeningTitle">&unknownOpeningTitle;</data>
<data id="string.pause">&pause;</data>
<data id="string.resume">&resume;</data>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<hbox align="center" pack="end">
<label id="sourceLabel" value="&savingSource;"/>
</hbox>
<textbox id="source" class="scrollfield" readonly="true" flex="1"/>
</row>
<separator class="thin"/>
<row id="targetRow">
<hbox align="center" pack="end">
<label id="targetLabel" value="&savingTarget;"/>
</hbox>
<textbox id="target" class="scrollfield" readonly="true" flex="1"/>
</row>
<separator id="targetRowSeparator" class="thin"/>
<row>
<hbox align="center" pack="end">
<label value="&status;"/>
</hbox>
<label id="status" value="&#160;" flex="1"/>
</row>
<separator class="thin"/>
<row>
<hbox align="center" pack="end">
<label value="&timeLeft;"/>
</hbox>
<label id="timeLeft" value="&#160;"/>
</row>
<separator class="thin"/>
<row>
<hbox align="center" pack="end">
<label value="&timeElapsed;"/>
</hbox>
<label id="timeElapsed" value="&#160;"/>
</row>
<separator class="thin"/>
<row>
<hbox align="center" pack="end">
<label value="&progress;"/>
</hbox>
<progressmeter id="progress" mode="normal" value="0"/>
<hbox align="center" pack="end">
<label id="progressText" value="&#160;" style="width: 4em;"/>
</hbox>
</row>
<separator/>
</rows>
</grid>
<hbox align="center">
<checkbox id="keep" label="&keep;"/>
</hbox>
<separator id="keepSeparator"/>
<hbox>
<button id="cancel" label="&cancel;" oncommand="notifyObserver( 'oncancel' )"/>
<button id="pauseResume" label="&pause;" oncommand="window.notifyObserver( 'onpause' )"/>
<spacer flex="1"/>
<button id="launch" label="&launch;" disabled="true" oncommand="window.notifyObserver( 'onlaunch' )"/>
<button id="reveal" label="&reveal;" disabled="true" oncommand="window.notifyObserver( 'onreveal' )"/>
</hbox>
</window>