mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-25 06:10:35 +00:00
Bug 777517 - Webapp installation alert should launch app on click. r=myk
This commit is contained in:
parent
70b6524ced
commit
a13901fe5f
@ -114,7 +114,7 @@ this.webappsUI = {
|
||||
}
|
||||
|
||||
DOMApplicationRegistry.confirmInstall(aData, false, localDir);
|
||||
installationSuccessNotification(app, aWindow);
|
||||
installationSuccessNotification(aData, app, aWindow);
|
||||
} else {
|
||||
DOMApplicationRegistry.denyInstall(aData);
|
||||
}
|
||||
@ -140,7 +140,15 @@ this.webappsUI = {
|
||||
}
|
||||
}
|
||||
|
||||
function installationSuccessNotification(app, aWindow) {
|
||||
function installationSuccessNotification(aData, app, aWindow) {
|
||||
let launcher = {
|
||||
observe: function(aSubject, aTopic) {
|
||||
if (aTopic == "alertclickcallback") {
|
||||
WebappOSUtils.launch(aData.app);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let bundle = aWindow.gNavigatorBundle;
|
||||
|
||||
if (("@mozilla.org/alerts-service;1" in Cc)) {
|
||||
@ -152,7 +160,7 @@ function installationSuccessNotification(app, aWindow) {
|
||||
notifier.showAlertNotification(app.iconURI.spec,
|
||||
bundle.getString("webapps.install.success"),
|
||||
app.appNameAsFilename,
|
||||
false, null, null);
|
||||
true, null, launcher);
|
||||
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user