From ff1073cc0b044747efd521954bc46145e3656886 Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Wed, 2 May 2001 00:40:56 +0000 Subject: [PATCH] removing ^M --- .../directory/nsDirectoryViewer.cpp | 32 +++---- .../ucth/resources/helperAppDldProgress.js | 90 +++++++++---------- .../ucth/resources/helperAppDldProgress.xul | 12 +-- .../resources/locale/en-US/unknownContent.dtd | 4 +- .../locale/en-US/downloadProgress.dtd | 16 ++-- 5 files changed, 77 insertions(+), 77 deletions(-) diff --git a/xpfe/components/directory/nsDirectoryViewer.cpp b/xpfe/components/directory/nsDirectoryViewer.cpp index 9b259c094fbb..db56d3918900 100644 --- a/xpfe/components/directory/nsDirectoryViewer.cpp +++ b/xpfe/components/directory/nsDirectoryViewer.cpp @@ -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 requestor = do_QueryInterface(mContainer); - if (!requestor) - return NS_ERROR_NO_INTERFACE; - - nsCOMPtr 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 requestor = do_QueryInterface(mContainer); + if (!requestor) + return NS_ERROR_NO_INTERFACE; + + nsCOMPtr 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; } diff --git a/xpfe/components/ucth/resources/helperAppDldProgress.js b/xpfe/components/ucth/resources/helperAppDldProgress.js index 468bd6497650..bd3e82ed0bd8 100644 --- a/xpfe/components/ucth/resources/helperAppDldProgress.js +++ b/xpfe/components/ucth/resources/helperAppDldProgress.js @@ -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() + } +} diff --git a/xpfe/components/ucth/resources/helperAppDldProgress.xul b/xpfe/components/ucth/resources/helperAppDldProgress.xul index e3a7d4f89c16..64e65241251d 100644 --- a/xpfe/components/ucth/resources/helperAppDldProgress.xul +++ b/xpfe/components/ucth/resources/helperAppDldProgress.xul @@ -56,9 +56,9 @@ Contributor(s): &shortTimeFormat; &longTimeFormat; &unknownTime; - &pausedMsg; - &pauseButtonText; - &resumeButtonText; + &pausedMsg; + &pauseButtonText; + &resumeButtonText; @@ -122,9 +122,9 @@ Contributor(s): -