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

[or-cvs] [torbutton/master 09/30] Add option to always update Torbutton via Tor.



Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Wed, 24 Mar 2010 03:50:56 -0700
Subject: Add option to always update Torbutton via Tor.
Commit: be7eaf6785c038cec0e4092d8eb8e57af2ba906f

Make it on by default.
---
 src/chrome/content/preferences.js  |    9 ++++++++-
 src/chrome/content/preferences.xul |    3 +++
 src/chrome/locale/en/torbutton.dtd |    1 +
 3 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/chrome/content/preferences.js b/src/chrome/content/preferences.js
index c52aaec..92f1742 100644
--- a/src/chrome/content/preferences.js
+++ b/src/chrome/content/preferences.js
@@ -271,7 +271,6 @@ function torbutton_prefs_init(doc) {
     doc.getElementById('torbutton_disableLivemarks').checked = o_torprefs.getBoolPref('disable_livemarks');
     doc.getElementById('torbutton_closeTor').checked = o_torprefs.getBoolPref('close_tor');
     doc.getElementById('torbutton_closeNonTor').checked = o_torprefs.getBoolPref('close_nontor');
-    doc.getElementById('torbutton_noUpdates').checked = o_torprefs.getBoolPref('no_updates');
     doc.getElementById('torbutton_setUagent').checked = o_torprefs.getBoolPref('set_uagent');
     doc.getElementById('torbutton_spoofRefresh').checked = o_torprefs.getBoolPref('fakerefresh');
     doc.getElementById('torbutton_spoofEnglish').checked = o_torprefs.getBoolPref('spoof_english');
@@ -286,6 +285,9 @@ function torbutton_prefs_init(doc) {
     doc.getElementById('torbutton_jarCACerts').checked = o_torprefs.getBoolPref('jar_ca_certs');
     */
 
+    doc.getElementById('torbutton_noUpdates').checked = o_torprefs.getBoolPref('no_updates');
+    doc.getElementById('torbutton_updateTorbuttonViaTor').checked = o_torprefs.getBoolPref('update_torbutton_via_tor');
+
     torbutton_prefs_set_field_attributes(doc);
 }
 
@@ -468,6 +470,11 @@ function torbutton_prefs_save(doc) {
             doc.getElementById('torbutton_jarCACerts').checked);
     */
 
+    o_torprefs.setBoolPref('no_updates',
+            doc.getElementById('torbutton_noUpdates').checked);
+    o_torprefs.setBoolPref('update_torbutton_via_tor',
+            doc.getElementById('torbutton_updateTorbuttonViaTor').checked);
+
     // if tor settings were initially active, update the active settings to reflect any changes
     if (tor_enabled) torbutton_activate_tor_settings();
 }
diff --git a/src/chrome/content/preferences.xul b/src/chrome/content/preferences.xul
index ba6bef8..f2f9ee2 100644
--- a/src/chrome/content/preferences.xul
+++ b/src/chrome/content/preferences.xul
@@ -184,6 +184,9 @@
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_blockNonTorFileNet" label="&torbutton.prefs.block_nontor_file_net;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
+        <checkbox id="torbutton_updateTorbuttonViaTor"
+                  label="&torbutton.prefs.update_torbutton_via_tor; &torbutton.prefs.dtd_recommended;"
+                  oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_noUpdates" label="&torbutton.prefs.no_updates;" 
                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
         <checkbox id="torbutton_closeTor" label="&torbutton.prefs.close_tor;" 
diff --git a/src/chrome/locale/en/torbutton.dtd b/src/chrome/locale/en/torbutton.dtd
index 217650a..fca6f09 100644
--- a/src/chrome/locale/en/torbutton.dtd
+++ b/src/chrome/locale/en/torbutton.dtd
@@ -123,3 +123,4 @@
 <!ENTITY torbutton.prefs.dtd_recommended "(recommended)">
 <!ENTITY torbutton.prefs.dtd_optional "(optional)">
 <!ENTITY torbutton.prefs.dtd_crucial "(crucial)">
+<!ENTITY torbutton.prefs.update_torbutton_via_tor "Redirect Torbutton updates through Tor">
-- 
1.6.5