diff options
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/components/alerts/resources/content/alert.js | 28 | ||||
-rw-r--r-- | toolkit/components/alerts/resources/content/alert.xul | 1 | ||||
-rw-r--r-- | toolkit/content/mozilla.xhtml | 6 | ||||
-rw-r--r-- | toolkit/locales/en-US/chrome/global/mozilla.dtd | 16 |
4 files changed, 38 insertions, 13 deletions
diff --git a/toolkit/components/alerts/resources/content/alert.js b/toolkit/components/alerts/resources/content/alert.js index 523ec378e..ead4d503f 100644 --- a/toolkit/components/alerts/resources/content/alert.js +++ b/toolkit/components/alerts/resources/content/alert.js @@ -7,7 +7,21 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/AppConstants.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -// Copied from nsILookAndFeel.h, see comments on eMetric_AlertNotificationOrigin +/* + * This indicates from which corner of the screen alerts slide in, + * and from which direction (horizontal/vertical). + * 0, the default, represents bottom right, sliding vertically. + * Use any bitwise combination of the following constants: + * NS_ALERT_HORIZONTAL (1), NS_ALERT_LEFT (2), NS_ALERT_TOP (4). + * + * 6 4 + * +-----------+ + * 7| |5 + * | | + * 3| |1 + * +-----------+ + * 2 0 + */ const NS_ALERT_HORIZONTAL = 1; const NS_ALERT_LEFT = 2; const NS_ALERT_TOP = 4; @@ -41,6 +55,8 @@ function prefillAlertInfo() { // arguments[11] -> the nsIURI.hostPort of the origin, optional // arguments[12] -> the alert icon URL, optional + document.getElementById('alertTime').setAttribute('value', (new Date).getTime()); + switch (window.arguments.length) { default: case 13: { @@ -235,7 +251,15 @@ function moveWindowToEnd() { let windows = Services.wm.getEnumerator("alert:alert"); while (windows.hasMoreElements()) { let alertWindow = windows.getNext(); - if (alertWindow != window) { + let alertWindowTime = Number( + alertWindow.document.getElementById('alertTime').getAttribute('value')); + let windowTime = Number( + window.document.getElementById('alertTime').getAttribute('value')); + // The time of window creation. + // Otherwise calling the notification twice (and more) in a row + // does not work. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1263155 + if ((alertWindow != window) && (alertWindowTime <= windowTime)) { if (gOrigin & NS_ALERT_TOP) { y = Math.max(y, alertWindow.screenY + alertWindow.outerHeight - WINDOW_SHADOW_SPREAD); } else { diff --git a/toolkit/components/alerts/resources/content/alert.xul b/toolkit/components/alerts/resources/content/alert.xul index 8597d9954..1549f4530 100644 --- a/toolkit/components/alerts/resources/content/alert.xul +++ b/toolkit/components/alerts/resources/content/alert.xul @@ -24,6 +24,7 @@ <script type="application/javascript" src="chrome://global/content/alerts/alert.js"/> <vbox id="alertBox" class="alertBox"> + <label id="alertTime" value="" hidden="true"/> <box id="alertTitleBox"> <image id="alertIcon"/> <label id="alertTitleLabel" class="alertTitle plain" crop="end"/> diff --git a/toolkit/content/mozilla.xhtml b/toolkit/content/mozilla.xhtml index 1ffde19e4..2acfc9f5d 100644 --- a/toolkit/content/mozilla.xhtml +++ b/toolkit/content/mozilla.xhtml @@ -13,7 +13,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset='utf-8' /> - <title>&mozilla.title.15.1;</title> + <title>&chronicles.title.55.2;</title> <style> html { @@ -54,11 +54,11 @@ a { <section> <p id="moztext"> - &mozilla.quote.15.1; + &chronicles.quote.55.2; </p> <p id="from"> - &mozilla.from.15.1; + &chronicles.from.55.2; </p> </section> diff --git a/toolkit/locales/en-US/chrome/global/mozilla.dtd b/toolkit/locales/en-US/chrome/global/mozilla.dtd index 74ae40d44..038d8eb75 100644 --- a/toolkit/locales/en-US/chrome/global/mozilla.dtd +++ b/toolkit/locales/en-US/chrome/global/mozilla.dtd @@ -2,13 +2,13 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -<!ENTITY mozilla.title.15.1 -'The Book of Mozilla, 15:1'> +<!ENTITY chronicles.title.55.2 +'The Chronicles of the Pale Moon, 55:2'> -<!ENTITY mozilla.quote.15.1 -'The <em>twins</em> of Mammon quarrelled. Their warring plunged the world into a <em>new darkness</em>, and the beast -abhorred the darkness. So it began to move <em>swiftly</em>, and grew more powerful, and went forth and multiplied. -And the beasts brought <em>fire</em> and light to the darkness.'> +<!ENTITY chronicles.quote.55.2 +'And so, our focus was drawn through time and space to the <em>emerging dragon</em> who would not abandon hope.<br/> +Its resilience, stubbornness and spirit unbroken, and searching for long hours to find those willing to <em>join</em> its cause.<br/> +The old nest abandoned, the death throes of the Beast ignored, and more determined than ever to find glory in the future.'> -<!ENTITY mozilla.from.15.1 -'from <strong>The Book of Mozilla,</strong> 15:1'> +<!ENTITY chronicles.from.55.2 +'from <strong>The Chronicles of the Pale Moon,</strong> 55:2'> |