156 lines
6.0 KiB
XML
156 lines
6.0 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!-- -*- Mode: HTML -*- -->
|
|
|
|
<!-- The contents of this file are subject to the Netscape 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/NPL/
|
|
|
|
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 Communicator client code, released
|
|
March 31, 1998.
|
|
|
|
The Initial Developer of the Original Code is Netscape
|
|
Communications Corporation. Portions created by Netscape are
|
|
Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
|
Rights Reserved.
|
|
|
|
Contributor(s):
|
|
Scott MacGregor <mscott@netscape.com>
|
|
Bill Law <law@netscape.com>
|
|
-->
|
|
|
|
|
|
<?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')">
|
|
|
|
<!-- 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.savingAlertTitle">&savingAlertTitle;</data>
|
|
<data id="string.openingTitle">&openingTitle;</data>
|
|
<data id="string.openingAlertTitle">&openingAlertTitle;</data>
|
|
<data id="string.openingSource">&openingSource;</data>
|
|
<data id="string.openingTarget">&openingTarget;</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="" 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="" flex="1"/>
|
|
</row>
|
|
<separator id="targetRowSeparator" class="thin"/>
|
|
<row>
|
|
<hbox align="center" pack="end">
|
|
<label value="&status;"/>
|
|
</hbox>
|
|
<label id="status" value=" " flex="1"/>
|
|
</row>
|
|
<separator class="thin"/>
|
|
<row>
|
|
<hbox align="center" pack="end">
|
|
<label value="&timeLeft;"/>
|
|
</hbox>
|
|
<label id="timeLeft" value=" "/>
|
|
</row>
|
|
<separator class="thin"/>
|
|
<row>
|
|
<hbox align="center" pack="end">
|
|
<label value="&timeElapsed;"/>
|
|
</hbox>
|
|
<label id="timeElapsed" value=" "/>
|
|
</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=" "/>
|
|
</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' )"/>
|
|
<deck id="pauseResume">
|
|
<spacer/>
|
|
<button id="pause" label="&pause;" oncommand="window.notifyObserver( 'onpause' )"/>
|
|
<button id="resume" label="&resume;" oncommand="window.notifyObserver( 'onpause' )"/>
|
|
</deck>
|
|
<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>
|