[Pkg-mozext-commits] [firetray] 06/09: * add mail_urgency_hint pref * fix options' window size
David Prévot
taffit at alioth.debian.org
Wed Nov 6 22:03:56 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch dfsg-clean
in repository firetray.
commit 0f28d23f718c73bc7f36db434bca33270ee23b07
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Sun Nov 3 15:38:15 2013 +0100
* add mail_urgency_hint pref
* fix options' window size
---
src/chrome/content/options.js | 6 ++++--
src/chrome/content/options.xul | 7 +++++++
src/chrome/locale/en-US/options.dtd | 2 ++
src/chrome/locale/es-AR/options.dtd | 2 ++
src/chrome/locale/fr/options.dtd | 2 ++
src/chrome/locale/it/options.dtd | 2 ++
src/chrome/locale/nl/options.dtd | 2 ++
src/chrome/locale/sk-SK/options.dtd | 2 ++
src/chrome/locale/zh-TW/options.dtd | 2 ++
src/defaults/preferences/prefs.js | 1 +
src/modules/FiretrayMessaging.jsm | 3 ++-
11 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/chrome/content/options.js b/src/chrome/content/options.js
index bde3d46..768c06c 100644
--- a/src/chrome/content/options.js
+++ b/src/chrome/content/options.js
@@ -48,6 +48,8 @@ var firetrayUIOptions = {
this.initAppIconNames();
if (firetray.Handler.inMailApp)
this.initNewMailIconNames();
+
+ window.sizeToContent();
},
onQuit: function(e) {
@@ -715,10 +717,10 @@ var firetrayUIOptions = {
window.addEventListener(
'load', function (e) {
removeEventListener('load', arguments.callee, true);
- firetrayUIOptions.onLoad(); },
+ firetrayUIOptions.onLoad(e); },
false);
window.addEventListener(
'unload', function (e) {
removeEventListener('unload', arguments.callee, true);
- firetrayUIOptions.onQuit(); },
+ firetrayUIOptions.onQuit(e); },
false);
diff --git a/src/chrome/content/options.xul b/src/chrome/content/options.xul
index f501e31..9c13423 100644
--- a/src/chrome/content/options.xul
+++ b/src/chrome/content/options.xul
@@ -136,6 +136,7 @@
<preference id="pref_mail_accounts" name="extensions.firetray.mail_accounts" type="string"/>
<preference id="pref_folder_count_recursive" name="extensions.firetray.folder_count_recursive" type="bool" />
<preference id="pref_only_favorite_folders" name="extensions.firetray.only_favorite_folders" type="bool" />
+ <preference id="pref_mail_urgency_hint" name="extensions.firetray.mail_urgency_hint" type="bool" />
</preferences>
<vbox align="left" flex="1">
@@ -299,6 +300,12 @@
observes="broadcaster-notification-disabled" />
</hbox>
+ <checkbox id="ui_mail_urgency_hint"
+ label="&mail_urgency_hint.label;"
+ accesskey="&mail_urgency_hint.accesskey;"
+ preference="pref_mail_urgency_hint"
+ observes="broadcaster-notification-disabled"/>
+
</vbox>
</prefpane>
diff --git a/src/chrome/locale/en-US/options.dtd b/src/chrome/locale/en-US/options.dtd
index 4e04568..070b087 100644
--- a/src/chrome/locale/en-US/options.dtd
+++ b/src/chrome/locale/en-US/options.dtd
@@ -87,6 +87,8 @@
<!ENTITY mail_change_trigger.accesskey "L">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "Absolute path of the program to run when the message count changes. This program will get the new message count as the first argument.">
+<!ENTITY mail_urgency_hint.label "Set X11 urgency hint">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "Enable chat icon">
<!ENTITY chat_icon_enable.accesskey "E">
diff --git a/src/chrome/locale/es-AR/options.dtd b/src/chrome/locale/es-AR/options.dtd
index 274e38d..cfea0ce 100644
--- a/src/chrome/locale/es-AR/options.dtd
+++ b/src/chrome/locale/es-AR/options.dtd
@@ -77,6 +77,8 @@
<!ENTITY mail_change_trigger.accesskey "L">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "Ruta absoluta del programa para correr cuando la cuenta de mensajes cambia. Este programa obtendrá recibira el contador de nuevos mensajes como primer argumento.">
+<!ENTITY mail_urgency_hint.label "Set X11 urgency hint">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "Habilitar ícono de chat">
<!ENTITY chat_icon_enable.accesskey "H">
<!ENTITY chat_icon_blink.label "Icono de chat parpadea con mensajes nuevos.">
diff --git a/src/chrome/locale/fr/options.dtd b/src/chrome/locale/fr/options.dtd
index b633b97..4241f8f 100644
--- a/src/chrome/locale/fr/options.dtd
+++ b/src/chrome/locale/fr/options.dtd
@@ -77,6 +77,8 @@
<!ENTITY mail_change_trigger.accesskey "L">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "Chemin absolu du programme à lancer lorsque le compte des messages a changé. Ce programme prendra pour base le nouveau décompte de messages">
+<!ENTITY mail_urgency_hint.label "Activer l'indice d'urgence X11">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "Activer l'icône du chat">
<!ENTITY chat_icon_enable.accesskey "A">
<!ENTITY chat_icon_blink.label "L'icône du chat clignote à l'arrivée de nouveaux messages">
diff --git a/src/chrome/locale/it/options.dtd b/src/chrome/locale/it/options.dtd
index c895df8..38bb1e6 100644
--- a/src/chrome/locale/it/options.dtd
+++ b/src/chrome/locale/it/options.dtd
@@ -77,6 +77,8 @@
<!ENTITY mail_change_trigger.accesskey "L">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "Percorso assoluto del programma da lanciare quando viene incrementato il contatore dei messaggi non letti. Il programma utilizzerà il contatore dei nuovi messaggi come primo argomento.">
+<!ENTITY mail_urgency_hint.label "Set X11 urgency hint">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "Attiva icona della chat">
<!ENTITY chat_icon_enable.accesskey "E">
<!ENTITY chat_icon_blink.label "Lampeggiamento dell'icona della chat per nuovi messaggi">
diff --git a/src/chrome/locale/nl/options.dtd b/src/chrome/locale/nl/options.dtd
index 31f36cc..4fe78ab 100644
--- a/src/chrome/locale/nl/options.dtd
+++ b/src/chrome/locale/nl/options.dtd
@@ -77,6 +77,8 @@
<!ENTITY mail_change_trigger.accesskey "S">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "Absoluut pad van het uit te voeren programma wanneer het aantal wijzigt. Dit programma krijgt het aantal nieuwe berichten als het eerste argument.">
+<!ENTITY mail_urgency_hint.label "Set X11 urgency hint">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "Chatpictogram inschakelen">
<!ENTITY chat_icon_enable.accesskey "s">
<!ENTITY chat_icon_blink.label "Chatpictogram knippert bij nieuwe berichten">
diff --git a/src/chrome/locale/sk-SK/options.dtd b/src/chrome/locale/sk-SK/options.dtd
index 040daf8..2f34358 100644
--- a/src/chrome/locale/sk-SK/options.dtd
+++ b/src/chrome/locale/sk-SK/options.dtd
@@ -87,6 +87,8 @@
<!ENTITY mail_change_trigger.accesskey "S">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "Absolútna cesta programu, ktorý bude spustený pri zmene počtu správ. Prvý argument je počet nových správ.">
+<!ENTITY mail_urgency_hint.label "Set X11 urgency hint">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "Zapnúť ikonu chatu">
<!ENTITY chat_icon_enable.accesskey "E">
diff --git a/src/chrome/locale/zh-TW/options.dtd b/src/chrome/locale/zh-TW/options.dtd
index 18d3111..18ab34a 100644
--- a/src/chrome/locale/zh-TW/options.dtd
+++ b/src/chrome/locale/zh-TW/options.dtd
@@ -77,6 +77,8 @@
<!ENTITY mail_change_trigger.accesskey "L">
<!ENTITY mail_change_trigger.placeholder "/bin/notify-send">
<!ENTITY mail_change_trigger.tooltip "要在訊息數改變時執行程式的絕對路徑。程式會將新的訊息數作為第一個參數。">
+<!ENTITY mail_urgency_hint.label "Set X11 urgency hint">
+<!ENTITY mail_urgency_hint.accesskey "X">
<!ENTITY chat_icon_enable.label "啟用聊天圖示">
<!ENTITY chat_icon_enable.accesskey "E">
<!ENTITY chat_icon_blink.label "有新訊息時閃爍聊天圖示">
diff --git a/src/defaults/preferences/prefs.js b/src/defaults/preferences/prefs.js
index 6fea825..aa2191f 100644
--- a/src/defaults/preferences/prefs.js
+++ b/src/defaults/preferences/prefs.js
@@ -25,6 +25,7 @@ pref("extensions.firetray.chat_icon_enable", true);
pref("extensions.firetray.chat_icon_blink", true);
pref("extensions.firetray.chat_icon_blink_style", 0);
+pref("extensions.firetray.mail_urgency_hint", true);
pref("extensions.firetray.message_count_type", 0);
pref("extensions.firetray.mail_notification_enabled", true);
pref("extensions.firetray.mail_notification_type", 0);
diff --git a/src/modules/FiretrayMessaging.jsm b/src/modules/FiretrayMessaging.jsm
index 4805794..d364601 100644
--- a/src/modules/FiretrayMessaging.jsm
+++ b/src/modules/FiretrayMessaging.jsm
@@ -183,7 +183,8 @@ firetray.Messaging = {
if (mailChangeTriggerFile)
firetray.Messaging.runProcess(mailChangeTriggerFile, [newMsgCount.toString()]);
- if (newMsgCount > currentMsgCount)
+ let setUrgency = firetray.Utils.prefService.getBoolPref("mail_urgency_hint");
+ if (setUrgency && (newMsgCount > currentMsgCount))
for (let winId in firetray.Handler.windows)
firetray.Window.setUrgency(winId, true);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list