removing ^M

This commit is contained in:
dougt%netscape.com 2001-05-02 00:40:56 +00:00
parent c1cf4aaeb0
commit ff1073cc0b
5 changed files with 77 additions and 77 deletions

View File

@ -65,7 +65,7 @@
#include "nsIWindowWatcher.h"
#include "nsIPrompt.h"
#include "nsIAuthPrompt.h"
#include "nsIProgressEventSink.h"
#include "nsIProgressEventSink.h"
#include "nsIContent.h"
#include "nsIDOMWindow.h"
#include "nsIDOMWindowInternal.h"
@ -410,21 +410,21 @@ nsHTTPIndexParser::GetInterface(const nsIID &anIID, void **aResult )
return wwatch->GetNewAuthPrompter(aDOMWindow, (nsIAuthPrompt**)aResult);
}
if (anIID.Equals(NS_GET_IID(nsIProgressEventSink))) {
nsCOMPtr<nsIInterfaceRequestor> requestor = do_QueryInterface(mContainer);
if (!requestor)
return NS_ERROR_NO_INTERFACE;
nsCOMPtr<nsIProgressEventSink> sink = do_GetInterface(requestor);
if (!sink)
return NS_ERROR_NO_INTERFACE;
*aResult = sink;
NS_ADDREF((nsISupports*)*aResult);
return NS_OK;
}
if (anIID.Equals(NS_GET_IID(nsIProgressEventSink))) {
nsCOMPtr<nsIInterfaceRequestor> requestor = do_QueryInterface(mContainer);
if (!requestor)
return NS_ERROR_NO_INTERFACE;
nsCOMPtr<nsIProgressEventSink> sink = do_GetInterface(requestor);
if (!sink)
return NS_ERROR_NO_INTERFACE;
*aResult = sink;
NS_ADDREF((nsISupports*)*aResult);
return NS_OK;
}
return NS_ERROR_NO_INTERFACE;
}

View File

@ -40,7 +40,7 @@ var interval = 500; // Update every 500 milliseconds.
var lastUpdate = -interval; // Update initially.
var keepProgressWindowUpBox;
var targetFile;
var gRestartChecked = false;
var gRestartChecked = false;
// These are to throttle down the updating of the download rate figure.
var priorRate = 0;
@ -50,7 +50,7 @@ var rateChangeLimit = 2;
// all progress notifications are done through our nsIWebProgressListener implementation...
var progressListener = {
onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus)
{
{
if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
{
// we are done downloading...
@ -73,26 +73,26 @@ var progressListener = {
onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
{
if (!gRestartChecked)
{
gRestartChecked = true;
// right now, all that supports restarting downloads is ftp (rfc959)
ftpChannel = aRequest.QueryInterface(Components.interfaces.nsIFTPChannel);
if (ftpChannel) {
dialog.pause.setAttribute("hidden", false);
dialog.pause.setAttribute("label", getString("pause"));
}
}
// this is so that we don't clobber the status text if
// a onProgressChange event happens after we press the pause btn.
if (dialog.downloadPaused)
{
dialog.status.setAttribute("value", getString("pausedMsg"));
}
dialog.request = aRequest;
if (!gRestartChecked)
{
gRestartChecked = true;
// right now, all that supports restarting downloads is ftp (rfc959)
ftpChannel = aRequest.QueryInterface(Components.interfaces.nsIFTPChannel);
if (ftpChannel) {
dialog.pause.setAttribute("hidden", false);
dialog.pause.setAttribute("label", getString("pause"));
}
}
// this is so that we don't clobber the status text if
// a onProgressChange event happens after we press the pause btn.
if (dialog.downloadPaused)
{
dialog.status.setAttribute("value", getString("pausedMsg"));
}
dialog.request = aRequest;
var overallProgress = aCurTotalProgress;
@ -323,9 +323,9 @@ function onLoad() {
dialog.timeLeft = document.getElementById("dialog.timeLeft");
dialog.timeElapsed = document.getElementById("dialog.timeElapsed");
dialog.cancel = document.getElementById("cancel");
dialog.pause = document.getElementById("pause")
dialog.request = 0;
dialog.downloadPaused = false;
dialog.pause = document.getElementById("pause")
dialog.request = 0;
dialog.downloadPaused = false;
keepProgressWindowUpBox = document.getElementById('keepProgressDialogUp');
// Set up dialog button callbacks.
@ -409,9 +409,9 @@ function setupPostProgressUI()
var openButton = document.getElementById('open');
openFolderButton.removeAttribute("disabled");
openButton.removeAttribute("disabled");
dialog.pause.setAttribute("disabled", true);
openButton.removeAttribute("disabled");
dialog.pause.setAttribute("disabled", true);
}
// when we receive a stop notification we are done reporting progress on the download
@ -443,20 +443,20 @@ function doOpenFolder()
localFile.reveal();
} catch (ex) {}
}
function doPauseButton() {
if (dialog.downloadPaused)
{
// resume
dialog.downloadPaused = false;
dialog.pause.setAttribute("label", getString("pause"));
dialog.request.resume()
}
else
{
// suspend
dialog.downloadPaused = true;
dialog.pause.setAttribute("label", getString("resume"));
dialog.request.suspend()
}
}
function doPauseButton() {
if (dialog.downloadPaused)
{
// resume
dialog.downloadPaused = false;
dialog.pause.setAttribute("label", getString("pause"));
dialog.request.resume()
}
else
{
// suspend
dialog.downloadPaused = true;
dialog.pause.setAttribute("label", getString("resume"));
dialog.request.suspend()
}
}

View File

@ -56,9 +56,9 @@ Contributor(s):
<data id="dialog.strings.shortTimeFormat">&shortTimeFormat;</data>
<data id="dialog.strings.longTimeFormat">&longTimeFormat;</data>
<data id="dialog.strings.unknownTime">&unknownTime;</data>
<data id="dialog.strings.pausedMsg">&pausedMsg;</data>
<data id="dialog.strings.pause">&pauseButtonText;</data>
<data id="dialog.strings.resume">&resumeButtonText;</data>
<data id="dialog.strings.pausedMsg">&pausedMsg;</data>
<data id="dialog.strings.pause">&pauseButtonText;</data>
<data id="dialog.strings.resume">&resumeButtonText;</data>
<grid flex="1">
<columns>
@ -122,9 +122,9 @@ Contributor(s):
<separator/>
<box id="CancelButton">
<button class="dialog" id="cancel" label="&dialogCancel.label;" oncommand="doCancelButton()"/>
<button class="dialog" id="pause" hidden="true" oncommand="doPauseButton()"/>
<spring flex="1"/>
<button class="dialog" id="cancel" label="&dialogCancel.label;" oncommand="doCancelButton()"/>
<button class="dialog" id="pause" hidden="true" oncommand="doPauseButton()"/>
<spring flex="1"/>
<button class="dialog" id="open" label="&open.label;" disabled="true" oncommand="doOpen()"/>
<button class="dialog" id="openFolder" label="&openFolder.label;" disabled="true" oncommand="doOpenFolder()"/>
</box>

View File

@ -12,6 +12,6 @@
<!ENTITY dialogPick.label "Open With...">
<!ENTITY dialogSave.label "Save File...">
<!ENTITY dialogCancel.label "Cancel">
<!ENTITY dialogPause.label "Pause">
<!ENTITY dialogResume.label "Resume">
<!ENTITY dialogPause.label "Pause">
<!ENTITY dialogResume.label "Resume">

View File

@ -9,9 +9,9 @@
<!ENTITY timeLeft "Time Left:">
<!ENTITY progress "Progress:">
<!ENTITY dialogCancel.label "Cancel">
<!ENTITY pauseButtonText "Pause">
<!ENTITY resumeButtonText "Resume">
<!ENTITY dialogCancel.label "Cancel">
<!ENTITY pauseButtonText "Pause">
<!ENTITY resumeButtonText "Resume">
<!ENTITY confirmCancel "Are you sure you want to cancel the saving of this file?">
@ -69,11 +69,11 @@
#1 will be replaced by the percentage of the file that has been saved -->
<!ENTITY percentMsg "#1&#037;">
<!-- LOCALIZATION NOTE (pausedMsg):
This string is used to indicate that the download is paused -->
<!ENTITY pausedMsg "Download Paused">
<!-- LOCALIZATION NOTE (pausedMsg):
This string is used to indicate that the download is paused -->
<!ENTITY pausedMsg "Download Paused">
<!-- Error messages -->
<!ENTITY diskFullMsg "There is not enough free space to store the file. Free up space and try again, or choose a different target location.">