commit b299743d664e8719c28abd6204deedf6ca189f50
Author: Mike Perry <[email protected]>
Date:   Wed May 30 18:15:19 2012 -0700

    Bug 3838: More agressively warn users that Torbutton is enabled.
    
    Thanks proper, for keeping us proper.
    
    Also, include some language improvements from nickm.
---
 src/chrome/content/torbutton.js           |   14 ++++++++++----
 src/chrome/locale/en/torbutton.properties |    4 +++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 57aaef8..f80b5a2 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -633,10 +633,9 @@ function torbutton_inform_about_tbb() {
   var prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"]
       .getService(Components.interfaces.nsIPromptService);
 
-  var flags = prompts.BUTTON_POS_0 * prompts.BUTTON_TITLE_OK;
-
   var strings = torbutton_get_stringbundle();
   var message = strings.GetStringFromName("torbutton.popup.prompt_torbrowser");
+  var title = strings.GetStringFromName("torbutton.title.prompt_torbrowser");
   var checkbox = {value: false};
 
   var sb = Components.classes["@mozilla.org/intl/stringbundle;1"]
@@ -645,8 +644,7 @@ function torbutton_inform_about_tbb() {
 
   var askagain = browserstrings.GetStringFromName("privateBrowsingNeverAsk");
 
-  var response = prompts.confirmEx(null, "", message, flags, null, null, null,
-                                   askagain, checkbox);
+  var response = prompts.alertCheck(null, title, message, askagain, checkbox);
 
   // Update preferences to reflect their response and to prevent the prompt 
from
   // being displayed again.
@@ -4056,6 +4054,14 @@ function torbutton_do_startup()
           m_tb_prefs.setCharPref('extensions.torbutton.socks_host', 
'127.0.0.1');
         }
 
+        if (!m_tb_tbb && 
m_tb_prefs.getBoolPref("extensions.torbutton.prompt_torbrowser")) {
+          var o_stringbundle = torbutton_get_stringbundle();
+          var warning = 
o_stringbundle.GetStringFromName("torbutton.popup.short_torbrowser");
+          var title = 
o_stringbundle.GetStringFromName("torbutton.title.prompt_torbrowser");
+          var prompts = 
Cc["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
+          prompts.alert(null, title, warning);
+        }
+
         m_tb_prefs.setBoolPref("extensions.torbutton.startup", false);
     }
 }
diff --git a/src/chrome/locale/en/torbutton.properties 
b/src/chrome/locale/en/torbutton.properties
index aa0167c..8679003 100644
--- a/src/chrome/locale/en/torbutton.properties
+++ b/src/chrome/locale/en/torbutton.properties
@@ -40,4 +40,6 @@ torbutton.popup.use_tbb = It appears that you are using 
Torbutton with Firefox,
 torbutton.popup.pref_error = Torbutton cannot update preferences in the Tor 
Browser profile directory.
 torbutton.popup.permission_denied = Please either reset the permissions of the 
Tor Browser directory or copy it to a new location.
 torbutton.popup.device_full = The disk appears to be full. Please free up 
space or move Tor Browser to a new device.
-torbutton.popup.prompt_torbrowser = Torbutton is no longer safe to use in a 
browser that is also used for non-Tor browsing. We have disabled the ability to 
toggle Torbutton as a result.\n\nIf you wish to keep using Firefox for non-Tor 
browsing, you should uninstall Torbutton and download Tor Browser. The privacy 
properties of Tor Browser are also superior to those of normal Firefox, even 
when Firefox is used with Torbutton.
+torbutton.title.prompt_torbrowser = Important Torbutton Information
+torbutton.popup.prompt_torbrowser = Torbutton works differently now: you can't 
turn it off any more.\n\nWe made this change because it isn't safe to use 
Torbutton in a browser that's also used for non-Tor browsing. There were too 
many bugs there that we couldn't fix any other way.\n\nIf you want to keep 
using Firefox normally, you should uninstall Torbutton and download Tor Browser 
Bundle. The privacy properties of Tor Browser are also superior to those of 
normal Firefox, even when Firefox is used with Torbutton.\n\nTo remove 
Torbutton, go to Tools->Addons->Extensions and then click the Remove button 
next to Torbutton.
+torbutton.popup.short_torbrowser = Important Torbutton 
Information!\n\nTorbutton is now always enabled.\n\nClick on the Torbutton for 
more information.



_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to