[Pkg-mozext-commits] [firetray] 81/399: options: cleaning more precise

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:18 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 96776fe9e519c2678a29654184360f5c895734f5
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Thu Nov 3 21:55:07 2011 +0100

    options: cleaning more precise
---
 src/chrome/content/options.js       |   28 ++++++++++++++--------------
 src/chrome/locale/en-US/options.dtd |    2 +-
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/chrome/content/options.js b/src/chrome/content/options.js
index 0f46a3c..237b35a 100644
--- a/src/chrome/content/options.js
+++ b/src/chrome/content/options.js
@@ -27,22 +27,22 @@ firetray.UIOptions = {
   },
 
   onQuit: function() {
-    let that = this;
-
     // cleaning: removeEventListener on cells
     // NOTE: not sure this is necessary on window close
-    let items = document.getElementById("ui_mail_accounts").childNodes;
-    for (let i=0; i < items.length; i++) {
-      let cells = items[i].getElementsByTagName("treecell");
-      // col 2 and 3: account_or_server_type_excluded, account_or_server_type_order
-      [cells[1], cells[2]].map(
-        function(c) {
-          LOG("i: "+i+", cell:"+c);
-          c.removeEventListener(
-            'DOMAttrModified', that._userChangeValueTreeServerTypes, true); // FIXME
-          c.removeEventListener(
-            'DOMAttrModified', that._userChangeValueTreeAccounts, true); // FIXME
-        });
+    let tree = document.getElementById("ui_mail_accounts");
+    for (let i=0; i < tree.view.rowCount; i++) {
+      let cells = tree.view.getItemAtIndex(i).getElementsByTagName("treecell");
+      if (tree.view.getLevel(i) === 0) { // serverTypes
+        // account_or_server_type_excluded, account_or_server_type_order
+        [cells[1], cells[2]].map(
+          function(c) {
+            c.removeEventListener(
+              'DOMAttrModified', that._userChangeValueTreeServerTypes, true);
+          });
+      } else if (tree.view.getLevel(i) === 1) { // excludedAccounts
+        cells[1].removeEventListener(
+          'DOMAttrModified', that._userChangeValueTreeAccounts, true);
+      }
     }
   },
 
diff --git a/src/chrome/locale/en-US/options.dtd b/src/chrome/locale/en-US/options.dtd
index 5054526..2029acb 100644
--- a/src/chrome/locale/en-US/options.dtd
+++ b/src/chrome/locale/en-US/options.dtd
@@ -13,7 +13,7 @@
 
 <!ENTITY account_or_server_type_name "Account">
 <!ENTITY account_or_server_type_name.tooltip "Account name or type">
-<!ENTITY account_or_server_type_excluded "Excluded">
+<!ENTITY account_or_server_type_excluded "Included">
 <!ENTITY account_or_server_type_excluded.tooltip "Includes accounts or types into unread messages count">
 <!ENTITY account_or_server_type_order "Order">
 <!ENTITY account_or_server_type_order.tooltip "Order in which mail server types are displayed. Double-clic to edit.">

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