mirror of
https://github.com/moparisthebest/FireTray
synced 2024-11-11 03:25:07 -05:00
* options: ability to choose fixed 'newmail' icon
* fix actual color update after icon text color pick
This commit is contained in:
parent
919d9fe3df
commit
9242e07206
@ -106,6 +106,7 @@ firetray.UIOptions = {
|
||||
chooseMailIconFile: function() {
|
||||
var filepath = document.getElementById("custom_mail_icon_filename");
|
||||
this._chooseIconFile(filepath);
|
||||
firetray.Messaging.updateUnreadMsgCount();
|
||||
},
|
||||
|
||||
_chooseIconFile: function(iconFilename) {
|
||||
|
@ -25,9 +25,9 @@
|
||||
<tab label="&input_options;" disabled="true" tooltiptext="&NOT_IMPLEMENTED_YET;"/>
|
||||
<tab label="&mail_options;" id="mail_tab" />
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<tabpanels flex="1">
|
||||
|
||||
<tabpanel id="general_tabpanel">
|
||||
<tabpanel id="general_tabpanel" flex="1">
|
||||
|
||||
<groupbox flex="1">
|
||||
<caption label="&windows_behaviour;" tooltiptext="&windows_behaviour.tooltip;" />
|
||||
@ -43,10 +43,10 @@
|
||||
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel id="input_tabpanel" />
|
||||
<tabpanel id="input_tabpanel" flex="1" />
|
||||
|
||||
<tabpanel id="mail_tabpanel">
|
||||
<vbox align="left" flex="1" >
|
||||
<tabpanel id="mail_tabpanel" flex="1">
|
||||
<vbox align="left" flex="1">
|
||||
|
||||
<!-- <label value="&mail_notification;" class="header" /> -->
|
||||
<groupbox flex="1">
|
||||
@ -55,38 +55,41 @@
|
||||
<radio id="radio_mail_icon1" label="&mail_notification_disabled;"
|
||||
accesskey="&mail_notification_disabled.accesskey;"
|
||||
oncommand="firetray.UIOptions.updateNotificationSettings()" />
|
||||
<radio id="radio_mail_icon2" label="&mail_notification_unread_count;"
|
||||
accesskey="&mail_notification_unread_count.accesskey;"
|
||||
oncommand="firetray.UIOptions.updateNotificationSettings()" />
|
||||
<hbox>
|
||||
<radio id="radio_mail_icon2" label="&mail_notification_unread_count;"
|
||||
accesskey="&mail_notification_unread_count.accesskey;"
|
||||
oncommand="firetray.UIOptions.updateNotificationSettings()" />
|
||||
<hbox id="icon_text_color" align="center">
|
||||
<label value="&icon_text_color;" accesskey="&icon_text_color.accesskey;"/>
|
||||
<colorpicker id="btn_icon_text_color" type="button"
|
||||
preference="pref_string_icon_text_color"
|
||||
onchange="firetray.Messaging.updateUnreadMsgCount();"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<radio id="radio_mail_icon3" label="&mail_notification_newmail_icon;"
|
||||
accesskey="&mail_notification_newmail_icon.accesskey;"
|
||||
oncommand="firetray.UIOptions.updateNotificationSettings()" />
|
||||
<radio id="radio_mail_icon4" label="&mail_notification_custom_mail_icon;"
|
||||
accesskey="&mail_notification_custom_mail_icon.accesskey;"
|
||||
oncommand="firetray.UIOptions.updateNotificationSettings()" />
|
||||
<hbox>
|
||||
<radio id="radio_mail_icon4" label="&mail_notification_custom_mail_icon;"
|
||||
accesskey="&mail_notification_custom_mail_icon.accesskey;"
|
||||
oncommand="firetray.UIOptions.updateNotificationSettings()" />
|
||||
<hbox id="custom_mail_icon" align="center" flex="1" >
|
||||
<textbox id="custom_mail_icon_filename" preference="pref_string_custom_mail_icon"
|
||||
onblur="firetray.Messaging.updateUnreadMsgCount();" flex="1" />
|
||||
<button id="custom_mail_icon_select" label="&choose;"
|
||||
accesskey="&choose.accesskey;"
|
||||
oncommand="firetray.UIOptions.chooseMailIconFile()" />
|
||||
</hbox>
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="icon_text_color" align="center">
|
||||
<label value="&icon_text_color;" accesskey="&icon_text_color.accesskey;"/>
|
||||
<colorpicker id="btn_icon_text_color" type="button"
|
||||
preference="pref_string_icon_text_color" />
|
||||
</hbox>
|
||||
|
||||
<hbox id="custom_mail_icon" align="center" flex="1" >
|
||||
<textbox id="custom_mail_icon_filename" preference="pref_string_custom_mail_icon"
|
||||
hidden="FALSE" flex="1" />
|
||||
<button id="custom_mail_icon_select" label="&choose;"
|
||||
accesskey="&choose.accesskey;"
|
||||
oncommand="firetray.UIOptions.chooseMailIconFile()" />
|
||||
</hbox>
|
||||
|
||||
<groupbox flex="1">
|
||||
<caption label="&unread_count_account_exceptions;"
|
||||
tooltiptext="&unread_count_account_exceptions.tooltip;" />
|
||||
|
||||
<tree id="ui_tree_mail_accounts" flex="1" rows="10" minwidth="300"
|
||||
seltype="single" editable="true"
|
||||
<tree id="ui_tree_mail_accounts" flex="1" rows="10" minwidth="400"
|
||||
seltype="single" editable="true" hidecolumnpicker="false"
|
||||
preference-editable="true"
|
||||
preference="pref_string_mail_accounts"
|
||||
onsynctopreference="return firetray.UIOptions.saveTreeAccountsOrServerTypes();">
|
||||
@ -94,17 +97,17 @@
|
||||
<treecol id="account_or_server_type_name" editable="false" flex="2"
|
||||
persist="width" primary="true" label="&account_or_server_type_name;"
|
||||
tooltiptext="&account_or_server_type_name.tooltip;"/>
|
||||
<splitter class="tree-splitter" resizeafter="grow"/>
|
||||
<splitter class="tree-splitter" resizeafter="grow" />
|
||||
<treecol id="account_or_server_type_excluded" type="checkbox" editable="true"
|
||||
label="&account_or_server_type_excluded;" flex="1" persist="width"
|
||||
tooltiptext="&account_or_server_type_excluded.tooltip;"/>
|
||||
<splitter class="tree-splitter" resizeafter="grow"/>
|
||||
<splitter class="tree-splitter" resizeafter="grow" />
|
||||
<treecol id="account_or_server_type_order" editable="true"
|
||||
persist="width" flex="1" hidden= "true"
|
||||
label="&account_or_server_type_order;"
|
||||
tooltiptext="&account_or_server_type_order.tooltip;"/>
|
||||
</treecols>
|
||||
<treechildren id="ui_mail_accounts" flex="1" />
|
||||
<treechildren id="ui_mail_accounts" flex="1"/>
|
||||
</tree>
|
||||
|
||||
</groupbox>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<!ENTITY mail_notification_newmail_icon.accesskey "N">
|
||||
<!ENTITY mail_notification_custom_mail_icon "display custom icon">
|
||||
<!ENTITY mail_notification_custom_mail_icon.accesskey "I">
|
||||
<!ENTITY icon_text_color "Icon text color">
|
||||
<!ENTITY icon_text_color "Text color">
|
||||
<!ENTITY icon_text_color.accesskey "T">
|
||||
<!ENTITY choose "Choose">
|
||||
<!ENTITY choose.accesskey "O">
|
||||
|
@ -116,13 +116,17 @@ firetray.Messaging = {
|
||||
let prefMailNotification = firetray.Utils.prefService.getIntPref("mail_notification");
|
||||
switch (prefMailNotification) {
|
||||
|
||||
case NOTIFICATION_NEWMAIL_ICON:
|
||||
firetray.Handler.setImage(firetray.Handler.FILENAME_NEWMAIL);
|
||||
break;
|
||||
case NOTIFICATION_UNREAD_MESSAGE_COUNT:
|
||||
let prefIconTextColor = firetray.Utils.prefService.getCharPref("icon_text_color");
|
||||
firetray.Handler.setText(this._unreadMsgCount.toString(), prefIconTextColor);
|
||||
break;
|
||||
case NOTIFICATION_NEWMAIL_ICON:
|
||||
firetray.Handler.setImage(firetray.Handler.FILENAME_NEWMAIL);
|
||||
break;
|
||||
case NOTIFICATION_CUSTOM_ICON:
|
||||
let prefCustomIconPath = firetray.Utils.prefService.getCharPref("custom_mail_icon");
|
||||
firetray.Handler.setImage(prefCustomIconPath);
|
||||
break;
|
||||
default:
|
||||
ERROR("Unknown notification mode");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user