Bug 923828 - Show the Metro download button only during downloads [r=emtwo]

This commit is contained in:
Matt Brubeck 2013-10-08 08:27:07 -07:00
parent ba32db4fed
commit 0aa375784e
3 changed files with 7 additions and 9 deletions

View File

@ -54,7 +54,6 @@ var MetroDownloadsView = {
Services.obs.addObserver(this, "dl-done", true);
Services.obs.addObserver(this, "dl-run", true);
Services.obs.addObserver(this, "dl-failed", true);
Services.obs.addObserver(this, "dl-request", true);
this._notificationBox = Browser.getNotificationBox();
this._notificationBox.addEventListener('AlertClose', this.handleEvent, true);
@ -75,7 +74,6 @@ var MetroDownloadsView = {
Services.obs.removeObserver(this, "dl-done");
Services.obs.removeObserver(this, "dl-run");
Services.obs.removeObserver(this, "dl-failed");
Services.obs.removeObserver(this, "dl-request");
}
},
@ -93,7 +91,7 @@ var MetroDownloadsView = {
}
}
if (this.manager.activeDownloadCount) {
Services.obs.notifyObservers(null, "dl-request", "");
ContextUI.displayNavbar();
}
},
@ -415,6 +413,8 @@ var MetroDownloadsView = {
this._progressNotification =
this.showNotification("download-progress", message, buttons,
this._notificationBox.PRIORITY_WARNING_LOW);
ContextUI.displayNavbar();
} else {
this._progressNotification.label = message;
}
@ -491,11 +491,6 @@ var MetroDownloadsView = {
download = aSubject.QueryInterface(Ci.nsIDownload);
this._showDownloadFailedNotification(download);
break;
case "dl-request":
setTimeout(function() {
ContextUI.displayNavbar();
}, 1000);
break;
}
},

View File

@ -65,7 +65,6 @@ HelperAppLauncherDialog.prototype = {
},
_showDownloadInfobar: function do_showDownloadInfobar(aLauncher) {
Services.obs.notifyObservers(null, "dl-request", "");
let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
let runButtonText =

View File

@ -743,6 +743,10 @@ documenttab[selected] .documenttab-selection {
visibility: collapse;
}
#download-progress:not([progress]) {
visibility: collapse;
}
#download-progress {
-moz-image-region: rect(0px, 40px, 40px, 0px) !important;
}