1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-11-13 04:15:02 -05:00

* add mail_urgency_hint pref

* fix options' window size
This commit is contained in:
foudfou 2013-11-03 15:38:15 +01:00
parent ee7e691dae
commit 0f28d23f71
11 changed files with 28 additions and 3 deletions

View File

@ -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);

View File

@ -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>

View File

@ -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">

View File

@ -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.">

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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 "有新訊息時閃爍聊天圖示">

View File

@ -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);

View File

@ -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);
}