[Pkg-mozext-commits] [firetray] 105/399: * rename NOTIFICATION_* to FT_NOTIFICATION_* for disambiguation * declare Cc, Ci, Cu locally instead of exporting them from common.js THIS BREAKS THE JS CONSOLE ! (among other things) as of Gecko-8 at least
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:23:22 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 cced2289f6cf444541e2111980af01775697525b
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Sun Dec 11 05:17:18 2011 +0100
* rename NOTIFICATION_* to FT_NOTIFICATION_* for disambiguation
* declare Cc,Ci,Cu locally instead of exporting them from common.js
THIS BREAKS THE JS CONSOLE ! (among other things) as of Gecko-8 at least
---
src/chrome/content/options.js | 6 +++---
src/chrome/content/overlay.js | 4 ++++
src/modules/FiretrayHandler.jsm | 2 +-
src/modules/FiretrayMessaging.jsm | 8 ++++----
src/modules/commons.js | 16 ++++++++--------
5 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/chrome/content/options.js b/src/chrome/content/options.js
index d37e90c..c346804 100644
--- a/src/chrome/content/options.js
+++ b/src/chrome/content/options.js
@@ -92,13 +92,13 @@ firetray.UIOptions = {
_disableNotificationMaybe: function(notificationSetting) {
let iconTextColor = document.getElementById("icon_text_color");
this.disableGroup(iconTextColor,
- (notificationSetting !== NOTIFICATION_UNREAD_MESSAGE_COUNT));
+ (notificationSetting !== FT_NOTIFICATION_UNREAD_MESSAGE_COUNT));
let customIconGroup = document.getElementById("custom_mail_icon");
this.disableGroup(customIconGroup,
- (notificationSetting !== NOTIFICATION_CUSTOM_ICON));
+ (notificationSetting !== FT_NOTIFICATION_CUSTOM_ICON));
- let isNotificationDisabled = (notificationSetting === NOTIFICATION_DISABLED);
+ let isNotificationDisabled = (notificationSetting === FT_NOTIFICATION_DISABLED);
if (isNotificationDisabled) {
document.getElementById("broadcaster-notification-disabled")
diff --git a/src/chrome/content/overlay.js b/src/chrome/content/overlay.js
index 348bf6b..a095d56 100644
--- a/src/chrome/content/overlay.js
+++ b/src/chrome/content/overlay.js
@@ -3,6 +3,10 @@
Components.utils.import("resource://firetray/commons.js");
Components.utils.import("resource://firetray/FiretrayHandler.jsm");
+if ("undefined" == typeof(Cc)) var Cc = Components.classes;
+if ("undefined" == typeof(Ci)) var Ci = Components.interfaces;
+if ("undefined" == typeof(Cu)) var Cu = Components.utils;
+
/**
* firetray namespace.
*/
diff --git a/src/modules/FiretrayHandler.jsm b/src/modules/FiretrayHandler.jsm
index 6566c98..7968fa2 100644
--- a/src/modules/FiretrayHandler.jsm
+++ b/src/modules/FiretrayHandler.jsm
@@ -79,7 +79,7 @@ firetray.Handler = {
try {
Cu.import("resource://firetray/FiretrayMessaging.jsm");
let prefMailNotification = firetray.Utils.prefService.getIntPref("mail_notification");
- if (prefMailNotification !== NOTIFICATION_DISABLED) {
+ if (prefMailNotification !== FT_NOTIFICATION_DISABLED) {
firetray.Messaging.init();
firetray.Messaging.updateUnreadMsgCount();
}
diff --git a/src/modules/FiretrayMessaging.jsm b/src/modules/FiretrayMessaging.jsm
index aa4cff2..d293044 100644
--- a/src/modules/FiretrayMessaging.jsm
+++ b/src/modules/FiretrayMessaging.jsm
@@ -83,7 +83,7 @@ firetray.Messaging = {
updateUnreadMsgCount: function() {
LOG("unreadMsgCount");
let prefMailNotification = firetray.Utils.prefService.getIntPref("mail_notification");
- if (prefMailNotification === NOTIFICATION_DISABLED)
+ if (prefMailNotification === FT_NOTIFICATION_DISABLED)
return;
let mailAccounts = firetray.Utils.getObjPref('mail_accounts');
@@ -127,14 +127,14 @@ firetray.Messaging = {
} else if (this._unreadMsgCount > 0) {
switch (prefMailNotification) {
- case NOTIFICATION_UNREAD_MESSAGE_COUNT:
+ case FT_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:
+ case FT_NOTIFICATION_NEWMAIL_ICON:
firetray.Handler.setImage(firetray.Handler.FILENAME_NEWMAIL);
break;
- case NOTIFICATION_CUSTOM_ICON:
+ case FT_NOTIFICATION_CUSTOM_ICON:
let prefCustomIconPath = firetray.Utils.prefService.getCharPref("custom_mail_icon");
firetray.Handler.setImage(prefCustomIconPath);
break;
diff --git a/src/modules/commons.js b/src/modules/commons.js
index 4150e64..60bb8d6 100644
--- a/src/modules/commons.js
+++ b/src/modules/commons.js
@@ -1,10 +1,10 @@
/* -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
var EXPORTED_SYMBOLS =
- [ "firetray", "Cc", "Ci", "Cu", "LOG", "WARN", "ERROR", "FIREFOX_ID",
- "THUNDERBIRD_ID", "SEAMONKEY_ID", "XPath", "isArray", "isEmpty",
- "NOTIFICATION_DISABLED", "NOTIFICATION_UNREAD_MESSAGE_COUNT",
- "NOTIFICATION_NEWMAIL_ICON", "NOTIFICATION_CUSTOM_ICON" ];
+ [ "firetray", "LOG", "WARN", "ERROR", "FIREFOX_ID",
+ "THUNDERBIRD_ID", "SEAMONKEY_ID", "isArray", "isEmpty",
+ "FT_NOTIFICATION_DISABLED", "FT_NOTIFICATION_UNREAD_MESSAGE_COUNT",
+ "FT_NOTIFICATION_NEWMAIL_ICON", "FT_NOTIFICATION_CUSTOM_ICON" ];
const Cc = Components.classes;
const Ci = Components.interfaces;
@@ -19,10 +19,10 @@ const SUNBIRD_ID = "{718e30fb-e89b-41dd-9da7-e25a45638b28}";
const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
const CHATZILLA_ID = "{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}";
-const NOTIFICATION_DISABLED = 0;
-const NOTIFICATION_UNREAD_MESSAGE_COUNT = 1;
-const NOTIFICATION_NEWMAIL_ICON = 2;
-const NOTIFICATION_CUSTOM_ICON = 3;
+const FT_NOTIFICATION_DISABLED = 0;
+const FT_NOTIFICATION_UNREAD_MESSAGE_COUNT = 1;
+const FT_NOTIFICATION_NEWMAIL_ICON = 2;
+const FT_NOTIFICATION_CUSTOM_ICON = 3;
/**
* firetray namespace.
--
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