Bug 411947 - Download Manager UI not accessed with the nsIDownloadManagerUI everwhere. r=mconnor, a=mconnor

git-svn-id: svn://10.0.0.236/trunk@244057 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sdwilsh%shawnwilsher.com 2008-01-26 21:01:44 +00:00
parent 1e64df4184
commit f1152fb362
2 changed files with 7 additions and 3 deletions

View File

@ -107,9 +107,7 @@
<command id="Browser:OpenLocation" oncommand="openLocation();"/>
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
<command id="Tools:Downloads" oncommand="toOpenWindowByType('Download:Manager',
'chrome://mozapps/content/downloads/downloads.xul',
'chrome,dialog=no,resizable');"/>
<command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
<command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/>
<command id="Tools:Sanitize"
oncommand="Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null);"/>

View File

@ -2988,6 +2988,12 @@ function toJavaScriptConsole()
toOpenWindowByType("global:console", "chrome://global/content/console.xul");
}
function BrowserDownloadsUI()
{
Cc["@mozilla.org/download-manager-ui;1"].
getService(Ci.nsIDownloadManagerUI).show();
}
function toOpenWindowByType(inType, uri, features)
{
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();