117505 - save file dialog has paint inssue with pause/resume button (ftp downloads). r=timeless sr=hewitt a=dbaron

git-svn-id: svn://10.0.0.236/trunk@116782 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blakeross%telocity.com
2002-03-18 05:10:24 +00:00
parent 92d735e650
commit 0963d87f4b
2 changed files with 7 additions and 12 deletions

View File

@@ -586,8 +586,7 @@ nsProgressDialog.prototype = {
}
// Disable the Pause/Resume buttons.
this.dialogElement( "pause" ).disabled = true;
this.dialogElement( "resume" ).disabled = true;
this.dialogElement( "pauseResume" ).disabled = true;
// Fix up dialog layout (which gets messed up sometimes).
this.dialog.sizeToContent();
@@ -611,10 +610,8 @@ nsProgressDialog.prototype = {
setPaused: function( pausing ) {
// If state changing, then update stuff.
if ( this.paused != pausing ) {
// Set selected index:
// Going from active state to paused: 2 -> "resume"
// Going from initial or paused state to active: 1 -> "pause"
this.dialogElement( "pauseResume" ).selectedIndex = pausing ? 2 : 1;
var string = pausing ? "resume" : "pause";
this.dialogElement( "pauseResume" ).label = this.getString(string);
// If we have a request, suspend/resume it.
if ( this.request ) {
@@ -642,7 +639,7 @@ nsProgressDialog.prototype = {
try {
ftpChannel = aRequest.QueryInterface( Components.interfaces.nsIFTPChannel );
if ( ftpChannel ) {
this.dialogElement("pauseResume").selectedIndex = 1;
this.dialogElement("pauseResume").label = this.getString("pause");
this.paused = false;
}
} catch ( e ) {