1
0
mirror of https://github.com/moparisthebest/FireTray synced 2025-01-07 19:48:03 -05:00

* Renamed custom icons filename preferences for consistency.

* bump version to v0.5.0b1
This commit is contained in:
foudfou 2014-04-02 22:16:51 +02:00
parent 8a3de9e343
commit ad5a1a5941
16 changed files with 52 additions and 52 deletions

View File

@ -228,7 +228,7 @@ var firetrayUIOptions = {
FIRETRAY_NOTIFICATION_MESSAGE_COUNT;
document.getElementById("ui_radio_mail_notification_newmail_icon").value =
FIRETRAY_NOTIFICATION_NEWMAIL_ICON;
document.getElementById("ui_radio_mail_notification_custom_mail_icon").value =
document.getElementById("ui_radio_mail_notification_mail_icon_custom").value =
FIRETRAY_NOTIFICATION_CUSTOM_ICON;
document.getElementById("ui_mail_notification_enabled").checked =
@ -307,7 +307,7 @@ var firetrayUIOptions = {
(notificationSetting !== FIRETRAY_NOTIFICATION_NEWMAIL_ICON));
}
let customIconGroup = document.getElementById("custom_mail_icon");
let customIconGroup = document.getElementById("mail_icon_custom");
this.disableChildren(customIconGroup,
(notificationSetting !== FIRETRAY_NOTIFICATION_CUSTOM_ICON));
},
@ -373,7 +373,7 @@ var firetrayUIOptions = {
chooseMailIconFile: function() {
let updateIcon = firetray.Messaging.updateIcon.bind(firetray.Messaging);
this._chooseIconFile("custom_mail_icon_filename", updateIcon);
this._chooseIconFile("mail_icon_custom_filename", updateIcon);
},
_chooseIconFile: function(elementId, callback) {

View File

@ -67,7 +67,7 @@
<preferences>
<preference id="pref_app_icon_type" name="extensions.firetray.app_icon_type" type="int"/>
<preference id="pref_app_icon_filename" name="extensions.firetray.app_icon_filename" type="string"/>
<preference id="pref_app_icon_custom" name="extensions.firetray.app_icon_custom" type="string"/>
<preference id="pref_show_icon_on_hide" name="extensions.firetray.show_icon_on_hide" type="bool"/>
<preference id="pref_scroll_hides" name="extensions.firetray.scroll_hides" type="bool" />
<preference id="pref_scroll_mode" name="extensions.firetray.scroll_mode" type="string" />
@ -97,7 +97,7 @@
<radio id="ui_app_icon_type_custom" label="&app_icon_custom.label;"
accesskey="&app_icon_custom.accesskey;" />
<hbox id="app_icon_custom" align="center" flex="1" >
<textbox id="app_icon_custom_filename" preference="pref_app_icon_filename" flex="1" />
<textbox id="app_icon_custom_filename" preference="pref_app_icon_custom" flex="1" />
<button id="app_icon_custom_select" label="&choose;"
accesskey="&choose.accesskey;"
oncommand="firetrayUIOptions.chooseAppIconFile()" />
@ -132,7 +132,7 @@
<preference id="pref_mail_notification_type" name="extensions.firetray.mail_notification_type" type="int" />
<preference id="pref_message_count_type" name="extensions.firetray.message_count_type" type="int" />
<preference id="pref_icon_text_color" name="extensions.firetray.icon_text_color" type="string" />
<preference id="pref_custom_mail_icon" name="extensions.firetray.custom_mail_icon" type="string" />
<preference id="pref_mail_icon_custom" name="extensions.firetray.mail_icon_custom" type="string" />
<preference id="pref_excluded_folders_flags" name="extensions.firetray.excluded_folders_flags" type="int" />
<preference id="pref_mail_change_trigger" name="extensions.firetray.mail_change_trigger" type="string"/>
<preference id="pref_mail_accounts" name="extensions.firetray.mail_accounts" type="string"/>
@ -210,14 +210,14 @@
</hbox>
</hbox>
<hbox>
<radio id="ui_radio_mail_notification_custom_mail_icon" label="&mail_notification_custom_mail_icon.label;"
accesskey="&mail_notification_custom_mail_icon.accesskey;"
<radio id="ui_radio_mail_notification_mail_icon_custom" label="&mail_notification_mail_icon_custom.label;"
accesskey="&mail_notification_mail_icon_custom.accesskey;"
oncommand="firetrayUIOptions.updateNotificationSettings()"
observes="broadcaster-notification-disabled" />
<hbox id="custom_mail_icon" align="center" flex="1" >
<textbox id="custom_mail_icon_filename" preference="pref_custom_mail_icon"
<hbox id="mail_icon_custom" align="center" flex="1" >
<textbox id="mail_icon_custom_filename" preference="pref_mail_icon_custom"
observes="broadcaster-notification-disabled" flex="1" />
<button id="custom_mail_icon_select" label="&choose;"
<button id="mail_icon_custom_select" label="&choose;"
accesskey="&choose.accesskey;"
observes="broadcaster-notification-disabled"
oncommand="firetrayUIOptions.chooseMailIconFile()" />

View File

@ -57,8 +57,8 @@
<!ENTITY mail_notification_unread_count.accesskey "U">
<!ENTITY mail_notification_newmail_icon.label "display newmail icon">
<!ENTITY mail_notification_newmail_icon.accesskey "N">
<!ENTITY mail_notification_custom_mail_icon.label "display custom icon">
<!ENTITY mail_notification_custom_mail_icon.accesskey "I">
<!ENTITY mail_notification_mail_icon_custom.label "display custom icon">
<!ENTITY mail_notification_mail_icon_custom.accesskey "I">
<!ENTITY icon_text_color "Text color">
<!ENTITY icon_text_color.accesskey "T">
<!ENTITY choose "Choose">

View File

@ -51,8 +51,8 @@
<!ENTITY mail_notification_unread_count.accesskey "U">
<!ENTITY mail_notification_newmail_icon.label "visualizar ícono de correo nuevo">
<!ENTITY mail_notification_newmail_icon.accesskey "n">
<!ENTITY mail_notification_custom_mail_icon.label "visualizar ícono personalizado">
<!ENTITY mail_notification_custom_mail_icon.accesskey "p">
<!ENTITY mail_notification_mail_icon_custom.label "visualizar ícono personalizado">
<!ENTITY mail_notification_mail_icon_custom.accesskey "p">
<!ENTITY icon_text_color "Color de texto">
<!ENTITY icon_text_color.accesskey "C">
<!ENTITY choose "Seleccionar">

View File

@ -51,8 +51,8 @@
<!ENTITY mail_notification_unread_count.accesskey "N">
<!ENTITY mail_notification_newmail_icon.label "afficher l'icône de nouveau message">
<!ENTITY mail_notification_newmail_icon.accesskey "f">
<!ENTITY mail_notification_custom_mail_icon.label "afficher l'icône personnalisée">
<!ENTITY mail_notification_custom_mail_icon.accesskey "i">
<!ENTITY mail_notification_mail_icon_custom.label "afficher l'icône personnalisée">
<!ENTITY mail_notification_mail_icon_custom.accesskey "i">
<!ENTITY icon_text_color "Couleur du texte">
<!ENTITY icon_text_color.accesskey "T">
<!ENTITY choose "Choisir">

View File

@ -51,8 +51,8 @@
<!ENTITY mail_notification_unread_count.accesskey "U">
<!ENTITY mail_notification_newmail_icon.label "Visualizza l'icona per i nuovi messaggi">
<!ENTITY mail_notification_newmail_icon.accesskey "N">
<!ENTITY mail_notification_custom_mail_icon.label "Visualizza icona personalizzata">
<!ENTITY mail_notification_custom_mail_icon.accesskey "I">
<!ENTITY mail_notification_mail_icon_custom.label "Visualizza icona personalizzata">
<!ENTITY mail_notification_mail_icon_custom.accesskey "I">
<!ENTITY icon_text_color "Colore del testo">
<!ENTITY icon_text_color.accesskey "T">
<!ENTITY choose "Scegli">

View File

@ -51,8 +51,8 @@
<!ENTITY mail_notification_unread_count.accesskey "O">
<!ENTITY mail_notification_newmail_icon.label "pictogram nieuw bericht weergeven">
<!ENTITY mail_notification_newmail_icon.accesskey "N">
<!ENTITY mail_notification_custom_mail_icon.label "aangepast pictogram weergeven">
<!ENTITY mail_notification_custom_mail_icon.accesskey "i">
<!ENTITY mail_notification_mail_icon_custom.label "aangepast pictogram weergeven">
<!ENTITY mail_notification_mail_icon_custom.accesskey "i">
<!ENTITY icon_text_color "Tekstkleur">
<!ENTITY icon_text_color.accesskey "T">
<!ENTITY choose "Kiezen">

View File

@ -57,8 +57,8 @@
<!ENTITY mail_notification_unread_count.accesskey "P">
<!ENTITY mail_notification_newmail_icon.label "zobraziť ikonu novej pošty">
<!ENTITY mail_notification_newmail_icon.accesskey "N">
<!ENTITY mail_notification_custom_mail_icon.label "zobraziť vlastnú ikonu">
<!ENTITY mail_notification_custom_mail_icon.accesskey "V">
<!ENTITY mail_notification_mail_icon_custom.label "zobraziť vlastnú ikonu">
<!ENTITY mail_notification_mail_icon_custom.accesskey "V">
<!ENTITY icon_text_color "Farba textu">
<!ENTITY icon_text_color.accesskey "T">
<!ENTITY choose "Vyberte">

View File

@ -51,8 +51,8 @@
<!ENTITY mail_notification_unread_count.accesskey "U">
<!ENTITY mail_notification_newmail_icon.label "顯示新郵件圖示">
<!ENTITY mail_notification_newmail_icon.accesskey "N">
<!ENTITY mail_notification_custom_mail_icon.label "顯示自訂圖示">
<!ENTITY mail_notification_custom_mail_icon.accesskey "I">
<!ENTITY mail_notification_mail_icon_custom.label "顯示自訂圖示">
<!ENTITY mail_notification_mail_icon_custom.accesskey "I">
<!ENTITY icon_text_color "文字色彩">
<!ENTITY icon_text_color.accesskey "T">
<!ENTITY choose "選擇">

View File

@ -16,7 +16,7 @@ pref("extensions.firetray.app_icon_type", 0);
pref("extensions.firetray.app_browser_icon_names", '["web-browser", "internet-web-browser"]');
pref("extensions.firetray.app_mail_icon_names", '["indicator-messages", "applications-email-panel"]');
pref("extensions.firetray.app_default_icon_names", '[]');
pref("extensions.firetray.app_icon_filename", "");
pref("extensions.firetray.app_icon_custom", "");
pref("extensions.firetray.new_mail_icon_names", '["indicator-messages-new", "mail-message-new"]');
pref("extensions.firetray.show_icon_on_hide", false);
pref("extensions.firetray.scroll_hides", true);
@ -30,7 +30,7 @@ pref("extensions.firetray.message_count_type", 0);
pref("extensions.firetray.mail_notification_enabled", true);
pref("extensions.firetray.mail_notification_type", 0);
pref("extensions.firetray.icon_text_color", "#000000");
pref("extensions.firetray.custom_mail_icon", "");
pref("extensions.firetray.mail_icon_custom", "");
pref("extensions.firetray.mail_change_trigger", "");
pref("extensions.firetray.folder_count_recursive", true);
// Ci.nsMsgFolderFlags.Archive|Drafts|Junk|Queue|SentMail|Trash|Virtual

View File

@ -6,7 +6,7 @@
<em:unpack>true</em:unpack> <!-- needed for embedded icons -->
<em:type>2</em:type>
<em:name>FireTray</em:name>
<em:version>0.4.99</em:version> <!-- change FIRETRAY_VERSION accordingly ! -->
<em:version>0.5.0b1</em:version> <!-- change FIRETRAY_VERSION accordingly ! -->
<em:creator>Hua Luo, Francesco Solero, Foudil BRÉTEL</em:creator>
<em:contributor>Hua Luo, Francesco Solero (Firetray original authors)</em:contributor>
<em:homepageURL>https://github.com/foudfou/firetray</em:homepageURL>
@ -20,7 +20,7 @@
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- Firefox -->
<em:minVersion>7.0</em:minVersion>
<em:minVersion>27.0</em:minVersion>
<em:maxVersion>30.0</em:maxVersion>
</Description>
</em:targetApplication>
@ -28,7 +28,7 @@
<em:targetApplication> <!-- Thunderbird -->
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>24.0</em:minVersion>
<em:minVersion>27.0</em:minVersion>
<em:maxVersion>30.0</em:maxVersion>
</Description>
</em:targetApplication>

View File

@ -549,8 +549,8 @@ firetray.PrefListener = new PrefListener(
case 'app_browser_icon_names':
case 'app_default_icon_names':
firetray.StatusIcon.loadThemedIcons(); // linux
case 'app_icon_filename':
case 'custom_mail_icon':
case 'app_icon_custom':
case 'mail_icon_custom':
firetray.StatusIcon.loadImageCustom(name);
case 'app_icon_type':
firetray.Handler.setIconImageDefault();
@ -695,7 +695,7 @@ firetray.VersionChangeHandler = {
},
tryEraseOldOptions: function() {
let v03Options = [
let v0_3_Opts = [
"close_to_tray", "minimize_to_tray", "start_minimized", "confirm_exit",
"restore_to_next_unread", "mail_count_type", "show_mail_count",
"dont_count_spam", "dont_count_archive", "dont_count_drafts",
@ -704,13 +704,13 @@ firetray.VersionChangeHandler = {
"use_custom_special_icon", "custom_normal_icon", "custom_special_icon",
"text_color", "scroll_to_hide", "scroll_action", "grab_multimedia_keys",
"hide_show_mm_key", "accounts_to_exclude" ];
let v040b2Options = [ 'mail_notification' ];
let v050Options = [ 'mail_urgency_hint' ];
let oldOptions = v03Options.concat(v040b2Options).concat(v050Options);
let v0_4_0b2_Opts = [ 'mail_notification' ];
let v0_5_0b1_Opts = [ 'mail_urgency_hint', 'app_icon_filename', 'custom_mail_icon' ];
let oldOpt = v0_3_Opts.concat(v0_4_0b2_Opts).concat(v0_5_0b1_Opts);
for (let i = 0, length = oldOptions.length; i<length; ++i) {
for (let i = 0, length = oldOpts.length; i<length; ++i) {
try {
let option = oldOptions[i];
let option = oldOpts[i];
firetray.Utils.prefService.clearUserPref(option);
} catch (x) {}
}

View File

@ -73,8 +73,7 @@ firetray.Messaging = {
/* could also use a PrefListener, but let's keep it simple for now */
observe: function(subject, topic, data) {
if (topic === "nsPref:changed" &&
data === ACCOUNTS_PREF_BRANCH) {
if (topic === "nsPref:changed" && data === ACCOUNTS_PREF_BRANCH) {
log.debug(ACCOUNTS_PREF_BRANCH+"="+subject.QueryInterface(Ci.nsIPrefBranch).getCharPref(ACCOUNTS_PREF_BRANCH));
this.cleanExcludedAccounts();
}
@ -238,7 +237,7 @@ firetray.Messaging = {
firetray.Handler.setIconImageNewMail();
break;
case FIRETRAY_NOTIFICATION_CUSTOM_ICON:
firetray.Handler.setIconImageCustom('custom_mail_icon');
firetray.Handler.setIconImageCustom('mail_icon_custom');
break;
default:
log.error("Unknown notification mode: "+prefMailNotification);

View File

@ -25,7 +25,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://firetray/logging.jsm");
const FIRETRAY_VERSION = "0.4.99"; // needed for sync call of onVersionChange() :(
const FIRETRAY_VERSION = "0.5.0b1"; // needed for sync call of onVersionChange() :(
const FIRETRAY_SUPPORTED_OS = ['linux', 'winnt']; // install.rdf sync :(
const FIRETRAY_CHAT_SUPPORTED_OS = ['linux'];
const FIRETRAY_FULL_FEAT_SUPPORTED_OS = FIRETRAY_CHAT_SUPPORTED_OS;
@ -50,8 +50,8 @@ const FIRETRAY_IM_STATUS_OFFLINE = "user-offline";
const FIRETRAY_ACCOUNT_SERVER_TYPE_IM = "im";
const FIRETRAY_DELAY_STARTUP_MILLISECONDS = 500;
const FIRETRAY_DELAY_NOWAIT_MILLISECONDS = 0;
const FIRETRAY_DELAY_STARTUP_MILLISECONDS = 500;
const FIRETRAY_DELAY_NOWAIT_MILLISECONDS = 0;
const FIRETRAY_CHAT_ICON_BLINK_STYLE_NORMAL = 0;
const FIRETRAY_CHAT_ICON_BLINK_STYLE_FADE = 1;
@ -78,7 +78,7 @@ const FIRETRAY_APP_DB = {
},
sunbird: {
id: "718e30fb-e89b-41dd-9da7-e25a45638b28}",
id: "{718e30fb-e89b-41dd-9da7-e25a45638b28}",
},
chatzilla: {

View File

@ -209,7 +209,7 @@ firetray.Handler.setIconImageDefault = function() {
if (appIconType === FIRETRAY_APPLICATION_ICON_TYPE_THEMED)
firetray.StatusIcon.setIconImageFromGIcon(firetray.StatusIcon.themedIconApp);
else if (appIconType === FIRETRAY_APPLICATION_ICON_TYPE_CUSTOM)
firetray.Handler.setIconImageCustom("app_icon_filename");
firetray.Handler.setIconImageCustom("app_icon_custom");
};
firetray.Handler.setIconImageNewMail = function() {

View File

@ -53,8 +53,8 @@ firetray.StatusIcon = {
bmp: { win_t: win32.HBITMAP, load_const: user32.IMAGE_BITMAP, map: 'bitmaps' }
},
PREF_TO_ICON_NAME: {
app_icon_filename: 'app_custom',
custom_mail_icon: 'mail_custom' // FIXME: rename pref for consistency
app_icon_custom: 'app-custom',
mail_icon_custom: 'mail-custom'
},
init: function() {
@ -88,7 +88,7 @@ firetray.StatusIcon = {
let hwnd_hidden_moz = user32.FindWindowW("MozillaHiddenWindowClass", null);
log.debug("=== hwnd_hidden_moz="+hwnd_hidden_moz);
this.icons.insert('app', this.getIconFromWindow(hwnd_hidden_moz));
['app_icon_filename', 'custom_mail_icon'].forEach(function(elt) {
['app_icon_custom', 'mail_icon_custom'].forEach(function(elt) {
firetray.StatusIcon.loadImageCustom(elt);
});
@ -103,6 +103,7 @@ firetray.StatusIcon = {
},
loadImageCustom: function(prefname) {
log.debug("loadImageCustom pref="+prefname);
let filename = firetray.Utils.prefService.getCharPref(prefname);
if (!filename) return;
let img = this.loadImageFromFile(filename);
@ -413,7 +414,7 @@ firetray.StatusIcon = {
try {
hicon = firetray.StatusIcon.icons.get(name);
} catch(error) {
log.error("icon 'app_custom' not defined.");
log.error("icon '"+name+"' not defined.");
}
return hicon;
}
@ -427,7 +428,7 @@ firetray.Handler.setIconImageDefault = function() {
if (appIconType === FIRETRAY_APPLICATION_ICON_TYPE_THEMED)
firetray.StatusIcon.setIcon({hicon:firetray.StatusIcon.icons.get('app')});
else if (appIconType === FIRETRAY_APPLICATION_ICON_TYPE_CUSTOM) {
firetray.StatusIcon.setIcon({hicon:firetray.StatusIcon.getIconSafe('app_custom')});
firetray.StatusIcon.setIcon({hicon:firetray.StatusIcon.getIconSafe('app-custom')});
}
};
@ -437,7 +438,7 @@ firetray.Handler.setIconImageNewMail = function() {
};
firetray.Handler.setIconImageCustom = function(prefname) {
log.debug("setIconImageCustom");
log.debug("setIconImageCustom pref="+prefname);
let name = firetray.StatusIcon.PREF_TO_ICON_NAME[prefname];
firetray.StatusIcon.setIcon({hicon:firetray.StatusIcon.getIconSafe(name)});
};