add smtp progress notification

r=ducarroz
sr=sspitzer
This commit is contained in:
mscott%netscape.com 2001-06-29 04:37:00 +00:00
Родитель 3a722d8e06
Коммит bbd30dbed1
5 изменённых файлов: 23 добавлений и 13 удалений

Просмотреть файл

@ -118,14 +118,14 @@ var progressListener = {
{
if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_START)
{
document.getElementById('progressmeter').setAttribute( "mode", "undetermined" );
document.getElementById('compose-progressmeter').setAttribute( "mode", "undetermined" );
}
if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
{
sendOrSaveOperationInProgress = false;
document.getElementById('progressmeter').setAttribute( "mode", "normal" );
document.getElementById('progressmeter').setAttribute( "value", 0 );
document.getElementById('compose-progressmeter').setAttribute( "mode", "normal" );
document.getElementById('compose-progressmeter').setAttribute( "value", 0 );
setTimeout("document.getElementById('statusText').setAttribute('label', '')", 5000);
}
},

Просмотреть файл

@ -522,7 +522,8 @@
<statusbar id="status-bar">
<box id="component-bar"/>
<statusbarpanel id="statusText" flex="1" label="&defaultStatusText.label;"/>
<progressmeter id="progressmeter" class="progressmeter-statusbar"
<progressmeter id="compose-progressmeter" class="progressmeter-statusbar"
mode="normal" value="0" statusbar="true"/>
<statusbarpanel id="offline-status" class="statusbarpanel-icononly"/>
<resizer class="window-diagonal"/>

Просмотреть файл

@ -43,7 +43,7 @@ var progressListener = {
if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_START)
{
// Put progress meter in undetermined mode.
dialog.progress.setAttribute( "value", 0 );
// dialog.progress.setAttribute( "value", 0 );
dialog.progress.setAttribute( "mode", "undetermined" );
}
@ -61,9 +61,10 @@ var progressListener = {
// Put progress meter at 100%.
dialog.progress.setAttribute( "value", 100 );
dialog.progress.setAttribute( "mode", "normal" );
var percentMsg = getString( "percentMsg" );
var percentMsg = getString( "progressText" );
percentMsg = replaceInsert( percentMsg, 1, 100 );
dialog.progressText.setAttribute("value", percentMsg);
window.close();
}
},
@ -81,6 +82,8 @@ var progressListener = {
if ( percent > 100 )
percent = 100;
dialog.progress.removeAttribute( "mode");
// Advance progress meter.
dialog.progress.setAttribute( "value", percent );
}
@ -92,11 +95,8 @@ var progressListener = {
dialog.progress.setAttribute( "mode", "undetermined" );
}
// Update status msg.
dialog.status.setAttribute("value", status);
// Update percentage label on progress meter.
var percentMsg = getString( "percentMsg" );
var percentMsg = getString( "progressText" );
percentMsg = replaceInsert( percentMsg, 1, percent );
dialog.progressText.setAttribute("value", percentMsg);
},
@ -108,7 +108,8 @@ var progressListener = {
onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
{
dialog.status.setAttribute("value", aMessage);
if (aMessage != "")
dialog.status.setAttribute("value", aMessage);
},
onSecurityChange: function(aWebProgress, aRequest, state)
@ -195,7 +196,7 @@ function onLoad() {
// set our web progress listener on the helper app launcher
msgProgress.registerListener(progressListener);
window.moveTo(opener.screenX + 16, opener.screenY + 32);
moveToAlertPosition();
//We need to delay the set title else dom will overwrite it
return window.setTimeout(SetTitle, 0, subject);

Просмотреть файл

@ -55,6 +55,7 @@ Contributor(s):
<data id="dialog.strings.titlePrefixSave">&titlePrefixSave;</data>
<data id="dialog.strings.messageSent">&messageSent;</data>
<data id="dialog.strings.messageSaved">&messageSaved;</data>
<data id="dialog.strings.progressText">&percentMsg;</data>
<grid flex="1">
<columns>
@ -75,7 +76,7 @@ Contributor(s):
</box>
<progressmeter id="dialog.progress" mode="normal" value="0"/>
<box autostretch="never" halign="right">
<text class="label" id="dialog.progressText" value="&#160;"/>
<text class="label" id="dialog.progressText" value="&percentMsg;"/>
</box>
</row>
</rows>

Просмотреть файл

@ -10,6 +10,13 @@
<!ENTITY dialogCancel.label "Cancel">
<!ENTITY dialogClose.label "Close">
<!-- LOCALIZATION NOTE (percentMsg):
This string is used to format the text to the right of the progress
meter.
#1 will be replaced by the percentage of the file that has been saved -->
<!ENTITY percentMsg "#1&#037;">
<!ENTITY messageSent "Your message has been sent">
<!ENTITY messageSaved "Your message has been saved">