[tor-commits] [torbirdy/master] Allow changing the default protocol (#15879)

sukhbir at torproject.org sukhbir at torproject.org
Mon May 2 18:50:07 UTC 2016


commit 04fd3d875491a0fdcc598c43c53edc0eb384e4cf
Author: Sukhbir Singh <sukhbir at torproject.org>
Date:   Mon May 2 14:49:52 2016 -0400

    Allow changing the default protocol (#15879)
---
 chrome/content/emailwizard.js | 3 +++
 defaults/preferences/prefs.js | 1 +
 2 files changed, 4 insertions(+)

diff --git a/chrome/content/emailwizard.js b/chrome/content/emailwizard.js
index 2f2a6a7..123753b 100644
--- a/chrome/content/emailwizard.js
+++ b/chrome/content/emailwizard.js
@@ -144,6 +144,9 @@ if(!org.torbirdy.emailwizard) org.torbirdy.emailwizard = new function() {
       document.getElementById("provisioner_button").disabled = true;
       document.getElementById("provisioner_button").hidden = true;
     }
+    // 0 is for POP3 (default), 1 is for IMAP. See emailwizard.xul and prefs.js.
+    var selectProtocol = prefs.getIntPref("extensions.torbirdy.defaultprotocol")
+    document.getElementById("torbirdy-protocol").selectedIndex = selectProtocol;
   };
 
   return pub;
diff --git a/defaults/preferences/prefs.js b/defaults/preferences/prefs.js
index eec4539..8b43562 100644
--- a/defaults/preferences/prefs.js
+++ b/defaults/preferences/prefs.js
@@ -10,3 +10,4 @@ pref("extensions.torbirdy.whonix_run", true);
 pref("extensions.torbirdy.info_run", false);
 pref("extensions.torbirdy.emailwizard", false);
 pref("extensions.torbirdy.fetchall", false);
+pref("extensions.torbirdy.defaultprotocol", 0); // 0 - POP3, 1 - IMAP



More information about the tor-commits mailing list