From 2a3bf650f0ff3b6c27ef8c403b38a4aecd3c66e2 Mon Sep 17 00:00:00 2001 From: "pete.zha%sun.com" Date: Thu, 25 Jul 2002 05:10:46 +0000 Subject: [PATCH] unix: should remove the Reveal Location & Launch File buttons from download progress dialog bug=90008 r=jkeiser sr=bzbarsky a=asa git-svn-id: svn://10.0.0.236/trunk@125768 18797224-902f-48f8-a5cc-f745e15eee43 --- .../ui/progressDlg/nsProgressDialog.js | 20 ++++++++++++++----- mozilla/modules/libpref/src/init/all.js | 1 + mozilla/modules/libpref/src/unix/unix.js | 3 +++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js b/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js index 73a83e9933c..569566eb250 100644 --- a/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js +++ b/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js @@ -590,13 +590,23 @@ nsProgressDialog.prototype = { cancelButton.label = this.getString( "close" ); cancelButton.focus(); - // Activate reveal/launch buttons. - this.enable( "reveal" ); + // Activate reveal/launch buttons if we are them. + var enableButtons = true; try { - if ( this.target && !this.target.isExecutable() ) { - this.enable( "launch" ); + var prefs = Components.classes[ "@mozilla.org/preferences-service;1" ] + .getService( Components.interfaces.nsIPrefBranch ); + enableButtons = prefs.getBoolPref( "browser.download.progressDnldDialog.enable_launch_reveal_buttons" ); + } catch ( e ) { + } + + if ( enableButtons ) { + this.enable( "reveal" ); + try { + if ( this.target && !this.target.isExecutable() ) { + this.enable( "launch" ); + } + } catch(e) { } - } catch(e) { } // Disable the Pause/Resume buttons. diff --git a/mozilla/modules/libpref/src/init/all.js b/mozilla/modules/libpref/src/init/all.js index 7530d0369a9..8876bf8f771 100644 --- a/mozilla/modules/libpref/src/init/all.js +++ b/mozilla/modules/libpref/src/init/all.js @@ -134,6 +134,7 @@ pref("browser.prefWindowModal", true); pref("browser.show_about_as_stupid_modal_window", false); pref("browser.download.progressDnldDialog.keepAlive", true); // keep the dnload progress dialog up after dnload is complete +pref("browser.download.progressDnldDialog.enable_launch_reveal_buttons", true); // various default search settings pref("browser.search.defaulturl", "chrome://navigator-region/locale/region.properties"); diff --git a/mozilla/modules/libpref/src/unix/unix.js b/mozilla/modules/libpref/src/unix/unix.js index f2b6b740198..f7b8a9f9d36 100644 --- a/mozilla/modules/libpref/src/unix/unix.js +++ b/mozilla/modules/libpref/src/unix/unix.js @@ -362,6 +362,9 @@ pref("print.postscript.nativefont.x-western", ""); pref("print.postscript.nativefont.zh-CN", ""); pref("print.postscript.nativefont.zh-TW", ""); +// For the download dialog +pref("browser.download.progressDnldDialog.enable_launch_reveal_buttons", false); + pref("mail.signature_date", 0); // until bug #130581 is fixed, we need to override this on linux