mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 755934. Display notification for successful app installation. r=felipe
This commit is contained in:
parent
c23822e53e
commit
6ee8836765
@ -357,6 +357,7 @@ webapps.install = Install
|
||||
webapps.install.accesskey = I
|
||||
#LOCALIZATION NOTE (webapps.requestInstall) %1$S is the web app name, %2$S is the site from which the web app is installed
|
||||
webapps.requestInstall = Do you want to install "%1$S" from this site (%2$S)?
|
||||
webapps.install.success = Application Installed
|
||||
|
||||
# Telemetry opt-out prompt for Aurora and Nightly
|
||||
# LOCALIZATION NOTE (telemetryOptOutPrompt): %1$S and %3$S will be replaced by
|
||||
|
@ -117,6 +117,7 @@ let webappsUI = {
|
||||
}
|
||||
|
||||
DOMApplicationRegistry.confirmInstall(aData, false, localDir);
|
||||
installationSuccessNotification(app, aWindow);
|
||||
} else {
|
||||
DOMApplicationRegistry.denyInstall(aData);
|
||||
}
|
||||
@ -141,3 +142,21 @@ let webappsUI = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function installationSuccessNotification(app, aWindow) {
|
||||
let bundle = aWindow.gNavigatorBundle;
|
||||
|
||||
if (("@mozilla.org/alerts-service;1" in Cc)) {
|
||||
let notifier;
|
||||
try {
|
||||
notifier = Cc["@mozilla.org/alerts-service;1"].
|
||||
getService(Ci.nsIAlertsService);
|
||||
|
||||
notifier.showAlertNotification(app.iconURI.spec,
|
||||
bundle.getString("webapps.install.success"),
|
||||
app.appNameAsFilename,
|
||||
false, null, null);
|
||||
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user