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

[or-cvs] [torbutton/master 28/30] Clarify the search option a bit.



Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Wed, 7 Apr 2010 15:23:13 -0700
Subject: Clarify the search option a bit.
Commit: 1d1498125b6192bceea5318e1086f4f64fddaf1c

Also add Yahoo. Despite the fact that they like to surrender their users
over to their deaths, they are the 3rd most popular search engine, and
they don't ban Tor.
---
 src/chrome/content/preferences.js       |   10 +++++++++-
 src/chrome/content/preferences.xul      |    3 ++-
 src/chrome/locale/en/torbutton.dtd      |    6 +++---
 src/defaults/preferences/preferences.js |    3 ++-
 4 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/chrome/content/preferences.js b/src/chrome/content/preferences.js
index 9996ecc..4520950 100644
--- a/src/chrome/content/preferences.js
+++ b/src/chrome/content/preferences.js
@@ -297,6 +297,11 @@ function torbutton_prefs_init(doc) {
             doc.getElementById("torbutton_searchEngine").selectedItem =
                 doc.getElementById('torbutton_engine3');
             break;
+        case 4:
+            doc.getElementById("torbutton_searchEngine").selectedItem =
+                doc.getElementById('torbutton_engine4');
+            break;
+
     }
     doc.getElementById('torbutton_noCaptcha').checked = o_torprefs.getBoolPref('dodge_google_captcha');
     doc.getElementById('torbutton_searchEngine').disabled = !o_torprefs.getBoolPref('dodge_google_captcha');
@@ -506,8 +511,11 @@ function torbutton_prefs_save(doc) {
     } else if(doc.getElementById('torbutton_searchEngine').selectedItem ==
             doc.getElementById('torbutton_engine2')) {
         o_torprefs.setIntPref('google_redir_url', 2);
-    } else {
+    } else if(doc.getElementById('torbutton_searchEngine').selectedItem ==
+            doc.getElementById('torbutton_engine3')) {
         o_torprefs.setIntPref('google_redir_url', 3);
+    } else {
+        o_torprefs.setIntPref('google_redir_url', 4);
     }
 
     /*
diff --git a/src/chrome/content/preferences.xul b/src/chrome/content/preferences.xul
index 381ce2b..e4c010f 100644
--- a/src/chrome/content/preferences.xul
+++ b/src/chrome/content/preferences.xul
@@ -356,7 +356,6 @@
           <checkbox id="torbutton_noCaptcha" label="&torbutton.prefs.dodge_google_captcha;"
                    oncommand="torbutton_prefs_set_field_attributes(document)"/>
           <hbox class="indent" align="center">
-             <label value="&torbutton.prefs.search_engine;" control="torbutton_searchEngine"/>
              <radiogroup align="center" orient="horizontal" id="torbutton_searchEngine">
               <radio id="torbutton_engine1" label="&torbutton.prefs.engine1;"
                    oncommand="torbutton_prefs_set_field_attributes(document)"/>
@@ -364,6 +363,8 @@
                    oncommand="torbutton_prefs_set_field_attributes(document)"/>
               <radio id="torbutton_engine3" label="&torbutton.prefs.engine3;"
                    oncommand="torbutton_prefs_set_field_attributes(document)"/>
+              <radio id="torbutton_engine4" label="&torbutton.prefs.engine4;"
+                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
              </radiogroup>
             </hbox>
 
diff --git a/src/chrome/locale/en/torbutton.dtd b/src/chrome/locale/en/torbutton.dtd
index 3f0b52e..2d76094 100644
--- a/src/chrome/locale/en/torbutton.dtd
+++ b/src/chrome/locale/en/torbutton.dtd
@@ -124,9 +124,9 @@
 <!ENTITY torbutton.prefs.dtd_optional "(optional)">
 <!ENTITY torbutton.prefs.dtd_crucial "(crucial)">
 <!ENTITY torbutton.prefs.update_torbutton_via_tor "Redirect Torbutton updates through Tor">
-<!ENTITY torbutton.prefs.dodge_google_captcha "Automatically use an alternate search engine when presented with a Google Captcha">
-<!ENTITY torbutton.prefs.search_engine "Search engine:">
+<!ENTITY torbutton.prefs.dodge_google_captcha "Automatically use an alternate search engine when presented with a Google Captcha:">
 <!ENTITY torbutton.prefs.engine1 "ixquick.com">
 <!ENTITY torbutton.prefs.engine2 "Bing.com">
-<!ENTITY torbutton.prefs.engine3 "scroogle.org">
+<!ENTITY torbutton.prefs.engine3 "Yahoo.com">
+<!ENTITY torbutton.prefs.engine4 "scroogle.org">
 <!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
diff --git a/src/defaults/preferences/preferences.js b/src/defaults/preferences/preferences.js
index 561d6c7..8995f0d 100644
--- a/src/defaults/preferences/preferences.js
+++ b/src/defaults/preferences/preferences.js
@@ -184,7 +184,8 @@ pref("extensions.torbutton.dodge_google_captcha", true);
 pref("extensions.torbutton.asked_google_captcha", false);
 pref("extensions.torbutton.redir_url.1", "https://www.ixquick.com/do/metasearch.pl?query=";);
 pref("extensions.torbutton.redir_url.2", "http://www.bing.com/search?q=";);
-pref("extensions.torbutton.redir_url.3", "https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi?Gw=";);
+pref("extensions.torbutton.redir_url.3", "http://search.yahoo.com/search?p=";);
+pref("extensions.torbutton.redir_url.4", "https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi?Gw=";);
 pref("extensions.torbutton.fix_google_srch", true);
 
 // User agent prefs:
-- 
1.6.5