summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 10:23:42 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 10:23:42 +0200
commit2703a13f12a878395806e7381e825d01c1537d8c (patch)
treedc21da04df0bd86099697fb8bd0827234ae99b48 /application
parent38dc3017a07a701402e2e3a9fce7db6d1741fb68 (diff)
downloadUXP-2703a13f12a878395806e7381e825d01c1537d8c.tar
UXP-2703a13f12a878395806e7381e825d01c1537d8c.tar.gz
UXP-2703a13f12a878395806e7381e825d01c1537d8c.tar.lz
UXP-2703a13f12a878395806e7381e825d01c1537d8c.tar.xz
UXP-2703a13f12a878395806e7381e825d01c1537d8c.zip
Bug 1221330 - Show the app icon in the XUL upgraded notifications alert
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/components/nsBrowserGlue.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js
index 6bac1d223..b8de4f00d 100644
--- a/application/palemoon/components/nsBrowserGlue.js
+++ b/application/palemoon/components/nsBrowserGlue.js
@@ -1414,7 +1414,10 @@ BrowserGlue.prototype = {
let win = RecentWindow.getMostRecentBrowserWindow();
win.openUILinkIn(data, "tab");
}
- let imageURL = "chrome://browser/skin/web-notifications-icon.svg";
+ // Show the application icon for XUL notifications. We assume system-level
+ // notifications will include their own icon.
+ let imageURL = this._hasSystemAlertsService() ? "" :
+ "chrome://branding/content/about-logo.png";
let title = gBrowserBundle.GetStringFromName("webNotifications.upgradeTitle");
let text = gBrowserBundle.GetStringFromName("webNotifications.upgradeBody");
let url = Services.urlFormatter.formatURLPref("browser.push.warning.infoURL");
@@ -1428,6 +1431,14 @@ BrowserGlue.prototype = {
}
},
+ _hasSystemAlertsService: function() {
+ try {
+ return !!Cc["@mozilla.org/system-alerts-service;1"].getService(
+ Ci.nsIAlertsService);
+ } catch (e) {}
+ return false;
+ },
+
_getPersist: function BG__getPersist(aSource, aProperty) {
var target = this._dataSource.GetTarget(aSource, aProperty, true);
if (target instanceof Ci.nsIRDFLiteral)