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 ) {

View File

@@ -94,6 +94,8 @@
<data id="string.openingTitle">&openingTitle;</data>
<data id="string.openingSource">&openingSource;</data>
<data id="string.openingTarget">&openingTarget;</data>
<data id="string.pause">&pause;</data>
<data id="string.resume">&resume;</data>
<grid flex="1">
<columns>
@@ -155,11 +157,7 @@
<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>
<button id="pauseResume" label="&pause;" oncommand="window.notifyObserver( 'onpause' )"/>
<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' )"/>