mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167146 - Use the displayOrigin option for the web app installation notification. r=myk
This commit is contained in:
parent
f2f90d26e3
commit
9af1b70505
@ -488,8 +488,8 @@ processHang.button.accessKey = O
|
||||
# Webapps notification popup
|
||||
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)?
|
||||
#LOCALIZATION NOTE (webapps.requestInstall2) %S is the web app name
|
||||
webapps.requestInstall2 = Do you want to install “%S” from this site?
|
||||
webapps.install.success = Application Installed
|
||||
webapps.install.inprogress = Installation in progress
|
||||
webapps.uninstall = Uninstall
|
||||
@ -497,7 +497,7 @@ webapps.uninstall.accesskey = U
|
||||
webapps.doNotUninstall = Don't Uninstall
|
||||
webapps.doNotUninstall.accesskey = D
|
||||
#LOCALIZATION NOTE (webapps.requestUninstall) %1$S is the web app name
|
||||
webapps.requestUninstall = Do you want to uninstall "%1$S"?
|
||||
webapps.requestUninstall = Do you want to uninstall “%1$S”?
|
||||
|
||||
# LOCALIZATION NOTE (fullscreen.entered): displayed when we enter HTML5 fullscreen mode, %S is the domain name of the focused website (e.g. mozilla.com).
|
||||
fullscreen.entered=%S is now fullscreen.
|
||||
|
@ -207,17 +207,16 @@ this.WebappManager = {
|
||||
let app = aData.app;
|
||||
let manifest = new ManifestHelper(jsonManifest, app.origin, app.manifestURL);
|
||||
|
||||
let host;
|
||||
let options = {};
|
||||
try {
|
||||
host = requestingURI.host;
|
||||
options.displayOrigin = requestingURI.host;
|
||||
} catch(e) {
|
||||
host = requestingURI.spec;
|
||||
options.displayOrigin = requestingURI.spec;
|
||||
}
|
||||
|
||||
let message = bundle.getFormattedString("webapps.requestInstall",
|
||||
[manifest.name, host], 2);
|
||||
let message = bundle.getFormattedString("webapps.requestInstall2",
|
||||
[manifest.name]);
|
||||
|
||||
let eventCallback = null;
|
||||
let gBrowser = chromeWin.gBrowser;
|
||||
if (gBrowser) {
|
||||
let windowID = aData.oid;
|
||||
@ -232,14 +231,14 @@ this.WebappManager = {
|
||||
|
||||
gBrowser.addProgressListener(listener);
|
||||
|
||||
eventCallback = (event) => {
|
||||
options.eventCallback = event => {
|
||||
if (event != "removed") {
|
||||
return;
|
||||
}
|
||||
// The notification was removed, so we should
|
||||
// remove our listener.
|
||||
gBrowser.removeProgressListener(listener);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
notification = chromeWin.PopupNotifications.show(aBrowser,
|
||||
@ -247,7 +246,7 @@ this.WebappManager = {
|
||||
message,
|
||||
"webapps-notification-icon",
|
||||
mainAction, [],
|
||||
eventCallback);
|
||||
options);
|
||||
},
|
||||
|
||||
doUninstall: function(aData, aBrowser) {
|
||||
@ -284,7 +283,7 @@ this.WebappManager = {
|
||||
[manifest.name]);
|
||||
|
||||
|
||||
let eventCallback = null;
|
||||
let options = {};
|
||||
let gBrowser = chromeWin.gBrowser;
|
||||
if (gBrowser) {
|
||||
let windowID = aData.oid;
|
||||
@ -299,21 +298,21 @@ this.WebappManager = {
|
||||
|
||||
gBrowser.addProgressListener(listener);
|
||||
|
||||
eventCallback = (event) => {
|
||||
options.eventCallback = event => {
|
||||
if (event != "removed") {
|
||||
return;
|
||||
}
|
||||
// The notification was removed, so we should
|
||||
// remove our listener.
|
||||
gBrowser.removeProgressListener(listener);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
notification = chromeWin.PopupNotifications.show(
|
||||
aBrowser, "webapps-uninstall", message,
|
||||
"webapps-notification-icon",
|
||||
mainAction, [secondaryAction],
|
||||
eventCallback);
|
||||
options);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user