mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Bug 1221330 - Show the app icon in the XUL upgraded notifications alert
This commit is contained in:
parent
71f257bd44
commit
4238f1570d
1 changed files with 12 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue