mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
Bug 923828 - Show the Metro download button only during downloads [r=emtwo]
This commit is contained in:
parent
ba32db4fed
commit
0aa375784e
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -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 =
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user