From 3ddac82ba71dd2d987476287d37eef4700aacfdf Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Sun, 17 Mar 2002 04:52:34 +0000 Subject: [PATCH] 102477 - Turning on download manager. r=law sr=ben a=dbaron git-svn-id: svn://10.0.0.236/trunk@116732 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/allmakefiles.sh | 3 + .../mac/build_scripts/MozillaBuildList.pm | 9 +++ .../ui/progressDlg/nsIProgressDialog.idl | 74 ++----------------- .../ui/progressDlg/nsProgressDialog.js | 20 ++++- mozilla/uriloader/base/MANIFEST_IDL | 1 + mozilla/uriloader/base/Makefile.in | 1 + mozilla/uriloader/base/makefile.win | 1 + .../exthandler/nsExternalHelperAppService.cpp | 63 +++++++--------- mozilla/xpfe/components/Makefile.in | 2 +- mozilla/xpfe/components/build/Makefile.in | 2 + mozilla/xpfe/components/build/makefile.win | 5 ++ mozilla/xpfe/components/build/nsModule.cpp | 8 ++ .../resources/downloadmanager.js | 5 +- .../resources/downloadmanager.xul | 8 +- .../locale/en-US/downloadmanager.dtd | 2 +- .../locale/en-US/downloadmanager.ent | 2 +- mozilla/xpfe/components/makefile.win | 1 + mozilla/xpinstall/packager/packages-mac | 2 + .../xpinstall/packager/packages-static-unix | 2 + .../xpinstall/packager/packages-static-win | 2 + mozilla/xpinstall/packager/packages-unix | 2 + mozilla/xpinstall/packager/packages-win | 2 + 22 files changed, 102 insertions(+), 115 deletions(-) diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh index cb3e47e8fa2..0d7f799c6fa 100755 --- a/mozilla/allmakefiles.sh +++ b/mozilla/allmakefiles.sh @@ -631,6 +631,9 @@ xpfe/components/bookmarks/Makefile xpfe/components/bookmarks/public/Makefile xpfe/components/bookmarks/src/Makefile xpfe/components/directory/Makefile +xpfe/components/download-manager/Makefile +xpfe/components/download-manager/src/Makefile +xpfe/components/download-manager/public/Makefile xpfe/components/timebomb/Makefile xpfe/components/timebomb/tools/Makefile xpfe/components/regviewer/Makefile diff --git a/mozilla/build/mac/build_scripts/MozillaBuildList.pm b/mozilla/build/mac/build_scripts/MozillaBuildList.pm index fd1025b2d84..b6703a0e402 100644 --- a/mozilla/build/mac/build_scripts/MozillaBuildList.pm +++ b/mozilla/build/mac/build_scripts/MozillaBuildList.pm @@ -275,6 +275,9 @@ sub InstallComponentFiles() # update notifications InstallResources(":mozilla:xpfe:components:updates:src:MANIFEST", "$components_dir"); + # download manager + InstallResources(":mozilla:xpfe:components:download-manager:src:MANIFEST_COMPONENTS", "$components_dir"); + # embedding UI InstallResources(":mozilla:embedding:components:ui:helperAppDlg:MANIFEST", "$components_dir"); InstallResources(":mozilla:embedding:components:ui:progressDlg:MANIFEST", "$components_dir"); @@ -529,6 +532,8 @@ sub ProcessJarManifests() CreateJarFromManifest(":mozilla:xpfe:communicator:resources:content:mac:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:bookmarks:resources:jar.mn", $chrome_dir, \%jars); + CreateJarFromManifest(":mozilla:xpfe:components:download-manager:resources:jar.mn", $chrome_dir, \%jars); + CreateJarFromManifest(":mozilla:xpfe:components:download-manager:resources:locale:en-US:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:content:mac:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:locale:en-US:unix:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:locale:en-US:win:jar.mn", $chrome_dir, \%jars); @@ -972,6 +977,8 @@ sub BuildClientDist() InstallFromManifest(":mozilla:xpfe:components:regviewer:MANIFEST_IDL", "$distdirectory:idl:"); # autocomplete InstallFromManifest(":mozilla:xpfe:components:autocomplete:public:MANIFEST_IDL", "$distdirectory:idl:"); + # download manager + InstallFromManifest(":mozilla:xpfe:components:download-manager:public:MANIFEST_IDL", "$distdirectory:idl:"); # XPAPPS InstallFromManifest(":mozilla:xpfe:appshell:public:MANIFEST", "$distdirectory:xpfe:"); @@ -1315,6 +1322,7 @@ sub BuildIDLProjects() BuildIDLProject(":mozilla:xpfe:components:timebomb:macbuild:timebombIDL.xml", "tmbm"); BuildIDLProject(":mozilla:xpfe:components:urlbarhistory:macbuild:urlbarhistoryIDL.xml", "urlbarhistory"); BuildIDLProject(":mozilla:xpfe:components:autocomplete:macbuild:AutoCompleteIDL.xml", "autocomplete"); + BuildIDLProject(":mozilla:xpfe:components:download-manager:macbuild:DownloadManagerIDL.xml", "download-manager"); BuildIDLProject(":mozilla:xpfe:appshell:macbuild:appshellIDL.xml", "appshell"); @@ -2047,6 +2055,7 @@ sub BuildXPAppProjects() # Components BuildOneProject(":mozilla:xpfe:components:find:macbuild:FindComponent.xml", "FindComponent$D.$S", 1, $main::ALIAS_SYM_FILES, 1); + BuildOneProject(":mozilla:xpfe:components:download-manager:macbuild:DownloadManager.xml", "DownloadManager$D.$S", 1, $main::ALIAS_SYM_FILES, 1); BuildOneProject(":mozilla:xpfe:components:xfer:macbuild:xfer.xml", "xfer$D.$S", 1, $main::ALIAS_SYM_FILES, 1); BuildOneProject(":mozilla:xpfe:components:regviewer:RegViewer.xml", "RegViewer$D.$S", 1, $main::ALIAS_SYM_FILES, 1); BuildOneProject(":mozilla:xpfe:components:shistory:macbuild:shistory.xml", "shistory$D.$S", 1, $main::ALIAS_SYM_FILES, 1); diff --git a/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl b/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl index f1bc69808ec..7b1f5df7fc8 100644 --- a/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl +++ b/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl @@ -21,12 +21,9 @@ * Bill Law law@netscape.com */ -#include "nsIWebProgressListener.idl" +#include "nsIDownload.idl" -interface nsIWebBrowserPersist; interface nsIDOMWindow; -interface nsILocalFile; -interface nsIObserver; /* nsIProgressDialog * @@ -50,75 +47,20 @@ interface nsIObserver; */ [scriptable, uuid(88A478B3-AF65-440a-94DC-ED9B154D2990)] -interface nsIProgressDialog : nsIWebProgressListener { +interface nsIProgressDialog : nsIDownload { /** * Open the dialog * * @param aParent Parent window; optional (if null, then * a top-level window is created) - * @param aPersist The stream transfer operation that the dialog is - * to show progress for. This is optional. If - * specified, then the progress dialog will register - * itself as the listener for that object. Otherwise, - * it is the caller's responsibility to connect this - * object to something that sends out the web progress - * notifications. */ - void open( in nsIDOMWindow aParent, in nsIWebBrowserPersist aPersist ); + void open( in nsIDOMWindow aParent ); - /** - * Set starting time to use in elapsed/remaining time calculations; - * this is useful in cases where the download might have started - * prior to the dialog opening; the time is specified as - * milliseconds, according to the convention for the JavaScript Date - * object getTime function; if not specified, this value will default - * to the time at which the progress dialog object is created. - */ - attribute long long startTime; - - /** - * URL of the source of the stream transfer that the dialog is - * displaying the progress of. - */ - attribute nsIURI source; - - /** - * Target of the stream transfer that the dialog is - * displaying the progress of. - */ - attribute nsILocalFile target; - - /** - * Set this attribute to indicate that the dialog is being - * used to display progress prior to opening a downloaded - * file with a helper application. The application string - * specified will appear on the dialog, unless the string - * is empty. This will also cause the "keep this dialog - * open after download" checkbox hidden. - */ - attribute wstring openingWith; - - /** - * Set this attribute to the observer object that will be - * notified when the user presses the Cancel button. The - * observer's "observe" method will be called with: - * aSubject = the nsIProgressDialog - * aTopic = "oncancel" - * aData = "" - */ - attribute nsIObserver observer; - - /** - * The web browser persist object doing the associated I/O. - * May be null. - */ - readonly attribute nsIWebBrowserPersist operation; - - /** - * The dialog object itself. This might be null if the dialog isn't - * open yet, or has been closed. - */ - readonly attribute nsIDOMWindow dialog; + /** + * The dialog object itself. This might be null if the dialog isn't + * open yet, or has been closed. + */ + attribute nsIDOMWindow dialog; }; diff --git a/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js b/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js index a243911dfe7..d847da72c83 100644 --- a/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js +++ b/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js @@ -64,6 +64,7 @@ function nsProgressDialog() { this.mTarget = null; this.mApp = null; this.mDialog = null; + this.mDisplayName = null; this.mPaused = null; this.mRequest = null; this.mCompleted = false; @@ -84,7 +85,7 @@ nsProgressDialog.prototype = { dialogFeatures: "chrome,titlebar,minimizable=yes", // getters/setters - get saving() { return this.openingWith == null; }, + get saving() { return this.openingWith == null || this.openingWith == ""; }, get parent() { return this.mParent; }, set parent(newval) { return this.mParent = newval; }, get operation() { return this.mOperation; }, @@ -109,6 +110,8 @@ nsProgressDialog.prototype = { set openingWith(newval) { return this.mApp = newval; }, get dialog() { return this.mDialog; }, set dialog(newval) { return this.mDialog = newval; }, + get displayName() { return this.mDisplayName; }, + set displayName(newval) { return this.mDisplayName = newval; }, get paused() { return this.mPaused; }, get request() { return this.mRequest; }, get completed() { return this.mCompleted; }, @@ -128,10 +131,9 @@ nsProgressDialog.prototype = { // ---------- nsIProgressDialog methods ---------- // open: Store aParentWindow and open the dialog. - open: function( aParentWindow, aPersist ) { + open: function( aParentWindow ) { // Save parent and "persist" operation. this.parent = aParentWindow; - this.operation = aPersist; // Open dialog using the WindowWatcher service. var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] @@ -142,6 +144,17 @@ nsProgressDialog.prototype = { this.dialogFeatures, this ); }, + + init: function( aSource, aTarget, aDisplayName, aOpeningWith, aStartTime, aOperation ) { + this.source = aSource; + this.target = aTarget; + this.displayName = aDisplayName; + this.openingWith = aOpeningWith; + if ( aStartTime ) { + this.startTime = aStartTime; + } + this.operation = aOperation; + }, // ---------- nsIWebProgressListener methods ---------- @@ -307,6 +320,7 @@ nsProgressDialog.prototype = { // of interface inheritance), nsIObserver, and nsISupports. QueryInterface: function (iid) { if (!iid.equals(Components.interfaces.nsIProgressDialog) && + !iid.equals(Components.interfaces.nsIDownload) && !iid.equals(Components.interfaces.nsIWebProgressListener) && !iid.equals(Components.interfaces.nsIObserver) && !iid.equals(Components.interfaces.nsISupports)) { diff --git a/mozilla/uriloader/base/MANIFEST_IDL b/mozilla/uriloader/base/MANIFEST_IDL index 6cf29fcda06..dda9d5c061b 100644 --- a/mozilla/uriloader/base/MANIFEST_IDL +++ b/mozilla/uriloader/base/MANIFEST_IDL @@ -9,3 +9,4 @@ nsIURILoader.idl nsIDocumentLoader.idl nsIWebProgress.idl nsIWebProgressListener.idl +nsIDownload.idl diff --git a/mozilla/uriloader/base/Makefile.in b/mozilla/uriloader/base/Makefile.in index 7aeef0c06f9..d51022f8c34 100644 --- a/mozilla/uriloader/base/Makefile.in +++ b/mozilla/uriloader/base/Makefile.in @@ -54,6 +54,7 @@ XPIDLSRCS = \ nsIURIContentListener.idl \ nsIURILoader.idl \ nsCURILoader.idl \ + nsIDownload.idl \ nsIDocumentLoader.idl \ nsIWebProgress.idl \ nsIWebProgressListener.idl \ diff --git a/mozilla/uriloader/base/makefile.win b/mozilla/uriloader/base/makefile.win index 94ca302bf3e..38138bf7d7e 100644 --- a/mozilla/uriloader/base/makefile.win +++ b/mozilla/uriloader/base/makefile.win @@ -51,6 +51,7 @@ XPIDLSRCS= \ .\nsIDocumentLoader.idl \ .\nsIWebProgress.idl \ .\nsIWebProgressListener.idl \ + .\nsIDownload.idl \ $(NULL) LIBRARY_NAME=uriloaderbase_s diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 0d9cf6ef237..c91253ae40f 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -39,6 +39,7 @@ #include "nsCURILoader.h" #include "nsIWebProgress.h" #include "nsIWebProgressListener.h" +#include "nsIDownload.h" #include "nsReadableUtils.h" // used to manage our in memory data source of helper applications @@ -1384,52 +1385,42 @@ nsresult nsExternalAppHandler::ShowProgressDialog() { // we are back from the helper app dialog (where the user chooses to save or open), but we aren't // done processing the load. in this case, throw up a progress dialog so the user can see what's going on... - nsresult rv = NS_OK; + nsresult rv; + nsCOMPtr local = do_QueryInterface(mFinalFileDestination); - nsCOMPtr progressDlg = do_CreateInstance( "@mozilla.org/progressdialog;1", &rv ); - if (progressDlg) + nsCOMPtr dl = do_CreateInstance("@mozilla.org/download;1", &rv); + if (NS_FAILED(rv)) return rv; + + nsXPIDLString openWith(NS_LITERAL_STRING("")); + nsMIMEInfoHandleAction action = nsIMIMEInfo::saveToDisk; + mMimeInfo->GetPreferredAction(&action); + if (action != nsIMIMEInfo::saveToDisk) { - // Wire up this progress dialog. - progressDlg->SetSource( mSourceUrl ); - progressDlg->SetStartTime( mTimeDownloadStarted ); - progressDlg->SetObserver(this); - nsCOMPtr local = do_QueryInterface(mFinalFileDestination); - progressDlg->SetTarget(local); - - nsMIMEInfoHandleAction action = nsIMIMEInfo::saveToDisk; - mMimeInfo->GetPreferredAction(&action); - if (action != nsIMIMEInfo::saveToDisk) + // Opening with an application; use either description or application file name. + mMimeInfo->GetApplicationDescription(getter_Copies(openWith)); + if (openWith.IsEmpty()) { - // Opening with an application; use either description or application file name. - nsXPIDLString openWith; - mMimeInfo->GetApplicationDescription(getter_Copies(openWith)); - if (openWith.IsEmpty()) + nsCOMPtr appl; + mMimeInfo->GetPreferredApplicationHandler(getter_AddRefs(appl)); + if (appl) { - nsCOMPtr appl; - mMimeInfo->GetPreferredApplicationHandler(getter_AddRefs(appl)); - if (appl) + nsCOMPtr file = do_QueryInterface(appl); + if (file) { - nsCOMPtr file = do_QueryInterface(appl); - if (file) - { - file->GetUnicodeLeafName(getter_Copies(openWith)); - } + file->GetUnicodeLeafName(getter_Copies(openWith)); } } - // Tell progress dialog what we're opening with. - progressDlg->SetOpeningWith(openWith); - } - - // Open the dialog. - rv = progressDlg->Open(nsnull, nsnull); - - if(NS_SUCCEEDED(rv)) - { - // Send notifications to the dialog. - this->SetWebProgressListener(progressDlg); } } + rv = dl->Init(mSourceUrl, local, nsnull, openWith, mTimeDownloadStarted, nsnull); + if (NS_FAILED(rv)) return rv; + + dl->SetObserver(this); + nsCOMPtr listener = do_QueryInterface(dl); + if (listener) + SetWebProgressListener(listener); + return rv; } diff --git a/mozilla/xpfe/components/Makefile.in b/mozilla/xpfe/components/Makefile.in index 08fb70b90c6..d41704e63b1 100644 --- a/mozilla/xpfe/components/Makefile.in +++ b/mozilla/xpfe/components/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = bookmarks directory filepicker find history search sidebar related regviewer xfer prefwindow shistory timebomb console autocomplete updates urlbarhistory intl resetPref +DIRS = bookmarks directory download-manager filepicker find history search sidebar related regviewer xfer prefwindow shistory timebomb console autocomplete updates urlbarhistory intl resetPref ifdef MOZ_ENABLE_XREMOTE DIRS += xremote diff --git a/mozilla/xpfe/components/build/Makefile.in b/mozilla/xpfe/components/build/Makefile.in index d16b500cc06..6a4232a8794 100644 --- a/mozilla/xpfe/components/build/Makefile.in +++ b/mozilla/xpfe/components/build/Makefile.in @@ -63,6 +63,7 @@ SHARED_LIBRARY_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)autocomplete_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)bookmarks_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)directory_s.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)downloadmanager_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)history_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)appcompintl_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)related_s.$(LIB_SUFFIX) \ @@ -75,6 +76,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../autocomplete/src \ -I$(srcdir)/../bookmarks/src \ -I$(srcdir)/../directory \ + -I$(srcdir)/../download-manager/src \ -I$(srcdir)/../history/src \ -I$(srcdir)/../related/src \ -I$(srcdir)/../search/src \ diff --git a/mozilla/xpfe/components/build/makefile.win b/mozilla/xpfe/components/build/makefile.win index 53c1876bb8a..43a98d8ed89 100644 --- a/mozilla/xpfe/components/build/makefile.win +++ b/mozilla/xpfe/components/build/makefile.win @@ -43,9 +43,12 @@ REQUIRES = xpcom \ content \ history \ search \ + progressDlg \ related \ urlbarhistory \ + uriloader \ mozldap \ + webbrowserpersist \ $(NULL) LCFLAGS = -DWIN32_LEAN_AND_MEAN @@ -62,6 +65,7 @@ SUB_LIBRARIES= \ $(DIST)\lib\autocomplete_s.lib \ $(DIST)\lib\bookmarks_s.lib \ $(DIST)\lib\directory_s.lib \ + $(DIST)\lib\downloadmanager_s.lib \ $(DIST)\lib\history_s.lib \ $(DIST)\lib\appcompintl_s.lib \ $(DIST)\lib\related_s.lib \ @@ -88,6 +92,7 @@ INCS = $(INCS) \ -I$(DEPTH)\xpfe\components\autocomplete\src \ -I$(DEPTH)\xpfe\components\bookmarks\src \ -I$(DEPTH)\xpfe\components\directory \ + -I$(DEPTH)\xpfe\components\download-manager\src \ -I$(DEPTH)\xpfe\components\history\src \ -I$(DEPTH)\xpfe\components\related\src \ -I$(DEPTH)\xpfe\components\search\src \ diff --git a/mozilla/xpfe/components/build/nsModule.cpp b/mozilla/xpfe/components/build/nsModule.cpp index 355baef3d85..c42d0bbbe7c 100644 --- a/mozilla/xpfe/components/build/nsModule.cpp +++ b/mozilla/xpfe/components/build/nsModule.cpp @@ -39,6 +39,8 @@ #include "nsAutoComplete.h" #include "nsBookmarksService.h" #include "nsDirectoryViewer.h" +#include "nsDownloadManager.h" +#include "nsDownloadProxy.h" #include "nsGlobalHistory.h" #include "rdf.h" #include "nsTimeBomb.h" @@ -63,6 +65,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteResults) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsBookmarksService, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGlobalHistory, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init) @@ -147,6 +151,10 @@ static const nsModuleComponentInfo components[] = { nsHTTPIndexConstructor }, { "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_DATASOURCE_CONTRACTID, nsHTTPIndexConstructor }, + { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, + nsDownloadManagerConstructor }, + { "Download", NS_DOWNLOAD_CID, NS_DOWNLOAD_CONTRACTID, + nsDownloadProxyConstructor }, { "Global History", NS_GLOBALHISTORY_CID, NS_GLOBALHISTORY_CONTRACTID, nsGlobalHistoryConstructor }, { "Global History", NS_GLOBALHISTORY_CID, NS_GLOBALHISTORY_DATASOURCE_CONTRACTID, diff --git a/mozilla/xpfe/components/download-manager/resources/downloadmanager.js b/mozilla/xpfe/components/download-manager/resources/downloadmanager.js index f4f5a72b3f1..1c84e8ca9bf 100644 --- a/mozilla/xpfe/components/download-manager/resources/downloadmanager.js +++ b/mozilla/xpfe/components/download-manager/resources/downloadmanager.js @@ -48,7 +48,7 @@ var gStatusBar = null; function NODE_ID(aElement) { - return aElement.getAttribute("ref") || aElement.id; + return aElement.id || aElement.getAttribute("ref"); } function Startup() @@ -134,7 +134,7 @@ var downloadViewController = { var cmds = ["cmd_properties", "cmd_pause", "cmd_cancel", "cmd_openfile", "cmd_showinshell"]; var selectionCount = gDownloadView.selectedItems.length; - if (!selectionCount) return false; + if (!selectionCount || !gDownloadView.getRowCount()) return false; var isDownloading = gDownloadManager.getDownload(gDownloadView.selectedItems[0].id); switch (aCommand) { @@ -204,6 +204,7 @@ var downloadViewController = { case "cmd_remove": for (i = 0; i < selection.length; ++i) gDownloadManager.removeDownload(selection[i].id); + window.updateCommands("tree-select"); break; case "cmd_selectAll": gDownloadView.selectAll(); diff --git a/mozilla/xpfe/components/download-manager/resources/downloadmanager.xul b/mozilla/xpfe/components/download-manager/resources/downloadmanager.xul index 9b0f6290ef8..7095dda4f1f 100644 --- a/mozilla/xpfe/components/download-manager/resources/downloadmanager.xul +++ b/mozilla/xpfe/components/download-manager/resources/downloadmanager.xul @@ -109,17 +109,15 @@ - + - - + - + diff --git a/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.dtd b/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.dtd index 95b0c981832..076ed6a3d26 100644 --- a/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.dtd +++ b/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.dtd @@ -15,7 +15,7 @@ - + diff --git a/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.ent b/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.ent index 95b0c981832..076ed6a3d26 100644 --- a/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.ent +++ b/mozilla/xpfe/components/download-manager/resources/locale/en-US/downloadmanager.ent @@ -15,7 +15,7 @@ - + diff --git a/mozilla/xpfe/components/makefile.win b/mozilla/xpfe/components/makefile.win index 62b95244f24..0577b3b51af 100644 --- a/mozilla/xpfe/components/makefile.win +++ b/mozilla/xpfe/components/makefile.win @@ -33,6 +33,7 @@ DIRS= \ regviewer \ related \ xfer \ + download-manager \ shistory \ timebomb \ console \ diff --git a/mozilla/xpinstall/packager/packages-mac b/mozilla/xpinstall/packager/packages-mac index 1d71a166749..34cc86928a2 100644 --- a/mozilla/xpinstall/packager/packages-mac +++ b/mozilla/xpinstall/packager/packages-mac @@ -92,6 +92,7 @@ viewer:Components:cookie.xpt viewer:Components:Cookie.shlb viewer:Components:appcomps.shlb viewer:Components:Directory.xpt +viewer:Components:downloadmanager.xpt viewer:Components:docshell.xpt viewer:Components:dom.shlb viewer:Components:dom.xpt @@ -203,6 +204,7 @@ viewer:Components:xmlextras.shlb viewer:Components:xmlsoap.xpt viewer:Components:nsHelperAppDlg.js viewer:Components:nsProgressDialog.js +viewer:Components:nsDownloadProgressListener.js viewer:Components:transformiix.xpt viewer:Components:transformiix.shlb viewer:Components:nsCloseAllWindows.js diff --git a/mozilla/xpinstall/packager/packages-static-unix b/mozilla/xpinstall/packager/packages-static-unix index 1e4add846b0..dcd9626f1ff 100644 --- a/mozilla/xpinstall/packager/packages-static-unix +++ b/mozilla/xpinstall/packager/packages-static-unix @@ -56,6 +56,7 @@ bin/res/cmessage.txt bin/components/bookmarks.xpt bin/components/directory.xpt +bin/components/downloadmanager.xpt bin/components/history.xpt bin/components/timebomb.xpt bin/components/related.xpt @@ -159,6 +160,7 @@ bin/components/nsHelperAppDlg.js bin/components/helperAppDlg.xpt bin/components/nsProgressDialog.js bin/components/progressDlg.xpt +bin/components/nsDownloadProgressListener.js bin/components/transformiix.xpt bin/chrome/help.jar diff --git a/mozilla/xpinstall/packager/packages-static-win b/mozilla/xpinstall/packager/packages-static-win index b86fb9d3bb4..1326abff0d3 100644 --- a/mozilla/xpinstall/packager/packages-static-win +++ b/mozilla/xpinstall/packager/packages-static-win @@ -66,6 +66,7 @@ bin\components\autocomplete.xpt bin\components\bookmarks.xpt bin\components\crypto.dll bin\components\directory.xpt +bin\components\downloadmanager.xpt bin\components\commandhandler.xpt bin\components\history.xpt bin\components\winhooks.xpt @@ -178,6 +179,7 @@ bin\components\nsHelperAppDlg.js bin\components\helperAppDlg.xpt bin\components\nsProgressDialog.js bin\components\progressDlg.xpt +bin\components\nsDownloadProgressListener.js bin\components\transformiix.xpt diff --git a/mozilla/xpinstall/packager/packages-unix b/mozilla/xpinstall/packager/packages-unix index ad2ac727b29..ce13fdec555 100644 --- a/mozilla/xpinstall/packager/packages-unix +++ b/mozilla/xpinstall/packager/packages-unix @@ -67,6 +67,7 @@ bin/libxlibrgb.so bin/components/libappcomps.so bin/components/bookmarks.xpt bin/components/directory.xpt +bin/components/downloadmanager.xpt bin/components/history.xpt bin/components/timebomb.xpt bin/components/related.xpt @@ -243,6 +244,7 @@ bin/components/nsHelperAppDlg.js bin/components/helperAppDlg.xpt bin/components/nsProgressDialog.js bin/components/progressDlg.xpt +bin/components/nsDownloadProgressListener.js bin/components/transformiix.xpt bin/components/libtransformiix.so bin/components/libfileview.so diff --git a/mozilla/xpinstall/packager/packages-win b/mozilla/xpinstall/packager/packages-win index c1deab776bc..7790fb04ef4 100644 --- a/mozilla/xpinstall/packager/packages-win +++ b/mozilla/xpinstall/packager/packages-win @@ -78,6 +78,7 @@ bin\components\appcomps.dll bin\components\autocomplete.xpt bin\components\bookmarks.xpt bin\components\directory.xpt +bin\components\downloadmanager.xpt bin\components\embedcomponents.dll bin\components\commandhandler.xpt bin\components\history.xpt @@ -255,6 +256,7 @@ bin\components\nsHelperAppDlg.js bin\components\helperAppDlg.xpt bin\components\nsProgressDialog.js bin\components\progressDlg.xpt +bin\components\nsDownloadProgressListener.js bin\components\transformiix.xpt bin\components\transformiix.dll bin\ISimpleDOMNodeMarshal.dll