[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbirdy/master] Added support for Thunderbird 24



commit 6c18ff256b723b98c90fbac67e5db22b0d09e72b
Author: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
Date:   Thu Sep 19 20:17:54 2013 -0400

    Added support for Thunderbird 24
---
 chrome/content/accountpref.xul |    1 -
 chrome/content/preferences.js  |   22 +++++++++++++++++-----
 chrome/content/preferences.xul |   15 +++++++++------
 chrome/locale/en/torbirdy.dtd  |    8 ++++----
 components/torbirdy.js         |   20 ++++++++++++++++----
 install.rdf                    |    2 +-
 6 files changed, 47 insertions(+), 21 deletions(-)

diff --git a/chrome/content/accountpref.xul b/chrome/content/accountpref.xul
index 6561188..baf419e 100644
--- a/chrome/content/accountpref.xul
+++ b/chrome/content/accountpref.xul
@@ -9,7 +9,6 @@
         title="&torbirdy.accountprefs.title;"
         persist="screenX screenY width height"
         buttonlabelaccept="&torbirdy.accountprefs.save.button;"
-
         buttonaccesskeyaccept="&torbirdy.accountprefs.save.key;"
 
         onload="return org.torbirdy.accountprefs.onLoad();"
diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index 3461aa4..80a192b 100644
--- a/chrome/content/preferences.js
+++ b/chrome/content/preferences.js
@@ -143,11 +143,23 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
   pub.getAccount = function() {
     var mailAccounts = [];
     var accounts = pub.acctMgr.accounts;
-    for (var i = 0; i < accounts.Count(); i++) {
-      var account = accounts.QueryElementAt(i, Components.interfaces.nsIMsgAccount).incomingServer;
-      var name = account.prettyName;
-      if (!(name === "Local Folders")) {
-        mailAccounts.push(account);
+
+    // Maintain Gecko 17+ and Gecko < 17 compatibility.
+    if (accounts.queryElementAt) {
+      for (var i = 0; i < accounts.length; i++) {
+        var account = accounts.queryElementAt(i, Components.interfaces.nsIMsgAccount).incomingServer;
+        var name = account.prettyName;
+        if (!(name === "Local Folders")) {
+          mailAccounts.push(account);
+        }
+      }
+    } else {
+      for (var i = 0; i < accounts.Count(); i++) {
+        var account = accounts.QueryElementAt(i, Components.interfaces.nsIMsgAccount).incomingServer;
+        var name = account.prettyName;
+        if (!(name === "Local Folders")) {
+          mailAccounts.push(account);
+        }
       }
     }
     return mailAccounts;
diff --git a/chrome/content/preferences.xul b/chrome/content/preferences.xul
index cd38163..10c0b59 100644
--- a/chrome/content/preferences.xul
+++ b/chrome/content/preferences.xul
@@ -8,17 +8,14 @@
         xmlns:html="http://www.w3.org/1999/xhtml";
         title="&torbirdy.prefs.title;"
         persist="screenX screenY width height"
-        buttons="accept,cancel,extra1,extra2"
+        buttons="accept,cancel,extra2"
         buttonlabelaccept="&torbirdy.prefs.save.button;"
         buttonaccesskeyaccept="&torbirdy.prefs.save.key;"
         buttonlabelcancel="&torbirdy.prefs.cancel.button;"
-        buttonlabelextra1="&torbirdy.prefs.extra1.button;"
         buttonlabelextra2="&torbirdy.prefs.extra2.button;"
-        buttonaccesskeyextra1="&torbirdy.prefs.extra1.key;"
         buttonaccesskeyextra2="&torbirdy.prefs.extra2.key;"
         
-        ondialogextra1="return org.torbirdy.prefs.restoreDefaults();"
-        ondialogextra2="return org.torbirdy.prefs.testSettings();"
+        ondialogextra2="return org.torbirdy.prefs.restoreDefaults();"
         ondialogaccept="return org.torbirdy.prefs.onAccept();"
         onload="return org.torbirdy.prefs.onLoad();">
         
@@ -38,7 +35,7 @@
 
       <!-- Proxy Settings -->
       <tabpanel>
-        <vbox>
+        <vbox flex="1">
 
           <radiogroup id="torbirdy-proxy-settings" oncommand="org.torbirdy.prefs.checkSetting();">
             <radio accesskey="&torbirdy.prefs.recommended.key;" id="torbirdy-default-settings" label="&torbirdy.prefs.recommended.text;" selected="true"/>
@@ -84,6 +81,12 @@
 
           </radiogroup>
 
+        <separator orient="horizontal"/>
+
+        <hbox align="right">
+          <button label="&torbirdy.prefs.testproxy.button;" accesskey="&torbirdy.prefs.testproxy.key;" oncommand="org.torbirdy.prefs.testSettings();" />
+        </hbox>
+
         </vbox>
       </tabpanel>
 
diff --git a/chrome/locale/en/torbirdy.dtd b/chrome/locale/en/torbirdy.dtd
index f1acf7e..de5ecf9 100644
--- a/chrome/locale/en/torbirdy.dtd
+++ b/chrome/locale/en/torbirdy.dtd
@@ -12,10 +12,10 @@
 <!ENTITY torbirdy.prefs.save.button "Save">
 <!ENTITY torbirdy.prefs.save.key "s">
 <!ENTITY torbirdy.prefs.cancel.button "Cancel">
-<!ENTITY torbirdy.prefs.extra1.button "Restore Defaults">
-<!ENTITY torbirdy.prefs.extra1.key "d">
-<!ENTITY torbirdy.prefs.extra2.button "Test Proxy Settings">
-<!ENTITY torbirdy.prefs.extra2.key "n">
+<!ENTITY torbirdy.prefs.extra2.button "Restore Defaults">
+<!ENTITY torbirdy.prefs.extra2.key "d">
+<!ENTITY torbirdy.prefs.testproxy.button "Test Proxy Settings">
+<!ENTITY torbirdy.prefs.testproxy.key "n">
 <!ENTITY torbirdy.prefs.proxy.label "Proxy">
 <!ENTITY torbirdy.prefs.privacy.label "Privacy">
 <!ENTITY torbirdy.prefs.enigmail.label "Enigmail">
diff --git a/components/torbirdy.js b/components/torbirdy.js
index bff74d1..5b976f6 100644
--- a/components/torbirdy.js
+++ b/components/torbirdy.js
@@ -227,8 +227,6 @@ const TorBirdyPrefs = {
 
   // Disable Telemetry completely.
   "toolkit.telemetry.enabled": false,
-  // And don't prompt for it. Yes, it should be set to true!
-  "toolkit.telemetry.prompted": true,
 
   // Disable Geolocation.
   "geo.enabled": false,
@@ -468,10 +466,24 @@ TorBirdy.prototype = {
       // For only the first run (after that the user can configure the account if need be):
       //    Iterate through all accounts and disable automatic checking of emails.
       var accounts = this.acctMgr.accounts;
-      for (var i = 0; i < accounts.Count(); i++) {
-        var account = accounts.QueryElementAt(i, Ci.nsIMsgAccount).incomingServer;
 
+      // To maintain compatibility between Gecko 17+ and Gecko < 17.
+      var allAccounts = [];
+      if (accounts.queryElementAt) {
+        for (var i = 0; i < accounts.length; i++) {
+          var account = accounts.queryElementAt(i, Ci.nsIMsgAccount).incomingServer;
+          allAccounts.push(account);
+        }
+      } else {
+        for (var i = 0; i < accounts.Count(); i++) {
+          var account = accounts.QueryElementAt(i, Ci.nsIMsgAccount).incomingServer;
+          allAccounts.push(account);
+        }
+      }
+
+      for (var i = 0; i < allAccounts.length; i++) {
         // Save account settings for restoring later.
+        var account = allAccounts[i];
         var key = account.key;
         var restorePrefs = ["check_new_mail", "login_at_startup",
                             "check_time", "download_on_biff",
diff --git a/install.rdf b/install.rdf
index 150458f..0a6f6fc 100644
--- a/install.rdf
+++ b/install.rdf
@@ -13,7 +13,7 @@
     <Description>
       <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
       <em:minVersion>10.0</em:minVersion>
-      <em:maxVersion>23.*</em:maxVersion>
+      <em:maxVersion>24.*</em:maxVersion>
     </Description>
     </em:targetApplication>
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits