[or-cvs] r20117: {torbutton} Bump version and improve external app dialog based on patch (in torbutton/trunk/src: . components)

mikeperry at seul.org mikeperry at seul.org
Thu Jul 23 21:12:08 UTC 2009


Author: mikeperry
Date: 2009-07-23 17:12:07 -0400 (Thu, 23 Jul 2009)
New Revision: 20117

Modified:
   torbutton/trunk/src/components/external-app-blocker.js
   torbutton/trunk/src/install.rdf
Log:

Bump version and improve external app dialog based on patch
from optimist.



Modified: torbutton/trunk/src/components/external-app-blocker.js
===================================================================
--- torbutton/trunk/src/components/external-app-blocker.js	2009-07-23 02:27:54 UTC (rev 20116)
+++ torbutton/trunk/src/components/external-app-blocker.js	2009-07-23 21:12:07 UTC (rev 20117)
@@ -136,10 +136,16 @@
                               .getService(Components.interfaces.nsIPromptService);
       var check = {value: false};
       // XXX: Localize
-      var result = prompts.confirmCheck(chrome, "Load external content?",
-                                        "Do you want to launch an external app to handle"
-                                        +"\n"+aUri.spec+
-                                        "\n\nNote: External apps are NOT Tor safe by default and can unmask you!\n", 
+      var flags = prompts.BUTTON_POS_0 * prompts.BUTTON_TITLE_IS_STRING +
+                  prompts.BUTTON_POS_1 * prompts.BUTTON_TITLE_IS_STRING +
+                  prompts.BUTTON_DELAY_ENABLE +
+                  prompts.BUTTON_POS_1_DEFAULT;
+      var result = prompts.confirmEx(chrome, "Load external content?",
+                                        "An external application is needed to handle"
+                                        +"\n"+aUri.spec
+                                        +"\n\nNOTE: External applications are NOT Tor safe by default and can unmask you!\n ", 
+                                        flags,
+                                        "Launch application", "Cancel", "",
                                         "Do not ask me again", check);
 
       // do something check.value / result
@@ -147,7 +153,7 @@
         // XXX: Set a pref...
       }
 
-      if (!result) {
+      if (result != 0) {
         return null;
       }
  
@@ -168,17 +174,23 @@
                               .getService(Components.interfaces.nsIPromptService);
       var check = {value: false};
       // XXX: Localize
-      var result = prompts.confirmCheck(chrome, "Load external content?",
-                                        "Do you want to launch an external app to handle"
-                                        +"\n"+aRequest.name+
-                                        "\n\nNote: External apps are NOT Tor safe by default and can unmask you!\n", 
+      var flags = prompts.BUTTON_POS_0 * prompts.BUTTON_TITLE_IS_STRING +
+                  prompts.BUTTON_POS_1 * prompts.BUTTON_TITLE_IS_STRING +
+                  prompts.BUTTON_DELAY_ENABLE +
+                  prompts.BUTTON_POS_1_DEFAULT;
+      var result = prompts.confirmEx(chrome, "Load external content?",
+                                        "An external application is needed to handle"
+                                        +"\n"+aRequest.name
+                                        +"\n\nNOTE: External applications are NOT Tor safe by default and can unmask you!\n ", 
+                                        flags,
+                                        "Launch application", "Cancel", "",
                                         "Do not ask me again", check);
       // do something check.value / result
       if (check.value) {
         // XXX: Set a pref...
       }
 
-      if (!result) {
+      if (result != 0) {
         return null;
       }
     }

Modified: torbutton/trunk/src/install.rdf
===================================================================
--- torbutton/trunk/src/install.rdf	2009-07-23 02:27:54 UTC (rev 20116)
+++ torbutton/trunk/src/install.rdf	2009-07-23 21:12:07 UTC (rev 20117)
@@ -6,7 +6,7 @@
         <em:name>Torbutton</em:name>
         <em:creator>Mike Perry &amp; Scott Squires</em:creator>
         <em:id>{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}</em:id>
-        <em:version>1.2.1</em:version>
+        <em:version>1.2.1-dev</em:version>
         <em:homepageURL>https://torbutton.torproject.org/dev/</em:homepageURL>
         <em:optionsURL>chrome://torbutton/content/preferences.xul</em:optionsURL>
         <em:iconURL>chrome://torbutton/skin/tor.png</em:iconURL>



More information about the tor-commits mailing list