[tor-commits] [tor-launcher/master] Incorporate UI feedback from tor-dev.

brade at torproject.org brade at torproject.org
Wed May 8 13:55:57 UTC 2013


commit 8c55331b3662c91dc468313f661cd9269c60fa72
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Tue May 7 17:37:07 2013 -0400

    Incorporate UI feedback from tor-dev.
---
 src/chrome/content/network-settings-overlay.xul |   34 ++++++++--------
 src/chrome/content/network-settings-wizard.xul  |   28 +++++++++++--
 src/chrome/content/network-settings.js          |   48 +++++++++++++++--------
 src/chrome/content/network-settings.xul         |    1 +
 src/chrome/content/progress.xul                 |    3 +-
 src/chrome/locale/en/network-settings.dtd       |   36 ++++++++++-------
 src/chrome/locale/en/progress.dtd               |    2 +-
 src/chrome/skin/network-settings.css            |   23 +++++++++--
 8 files changed, 118 insertions(+), 57 deletions(-)

diff --git a/src/chrome/content/network-settings-overlay.xul b/src/chrome/content/network-settings-overlay.xul
index a062d8f..efbc3c6 100644
--- a/src/chrome/content/network-settings-overlay.xul
+++ b/src/chrome/content/network-settings-overlay.xul
@@ -18,6 +18,23 @@
       </columns>
       <rows>
         <row align="center">
+          <label value="&torsettings.useProxy.type;" control="proxyType"
+                 style="text-align:right" />
+          <hbox align="center">
+            <menulist id="proxyType" oncommand="onProxyTypeChange()">
+              <menupopup id="proxyType_menuPopup">
+                <menuitem label="-" value="" selected="true" />
+                <menuitem label="&torsettings.useProxy.type.socks4;"
+                          value="SOCKS4"/>
+                <menuitem label="&torsettings.useProxy.type.socks5;"
+                          value="SOCKS5"/>
+                <menuitem label="&torsettings.useProxy.type.http;"
+                          value="HTTP"/>
+              </menupopup>
+            </menulist>
+          </hbox>
+        </row>
+        <row align="center">
           <label value="&torsettings.useProxy.address;" control="proxyAddr"
                  style="text-align:right" />
           <hbox align="center">
@@ -43,23 +60,6 @@
                      placeholder="&torsettings.optional;" />
           </hbox>
         </row>
-        <row align="center">
-          <label value="&torsettings.useProxy.type;" control="proxyType"
-                 style="text-align:right" />
-          <hbox align="center">
-            <menulist id="proxyType" oncommand="onProxyTypeChange()">
-              <menupopup id="proxyType_menuPopup">
-                <menuitem label="-" value="" selected="true" />
-                <menuitem label="&torsettings.useProxy.type.socks4;"
-                          value="SOCKS4"/>
-                <menuitem label="&torsettings.useProxy.type.socks5;"
-                          value="SOCKS5"/>
-                <menuitem label="&torsettings.useProxy.type.http;"
-                          value="HTTP"/>
-              </menupopup>
-            </menulist>
-          </hbox>
-        </row>
       </rows>
     </grid>
   </groupbox>
diff --git a/src/chrome/content/network-settings-wizard.xul b/src/chrome/content/network-settings-wizard.xul
index 1b163f3..72941bc 100644
--- a/src/chrome/content/network-settings-wizard.xul
+++ b/src/chrome/content/network-settings-wizard.xul
@@ -26,9 +26,8 @@
   <script type="application/x-javascript"
           src="chrome://torlauncher/content/network-settings.js"/>
 
-  <wizardpage label=" " pageid="proxy" next="firewall" onextra2="onCopyLog();"
-              onpageshow="showOrHideButton('next', true, true)"
-              onpageadvanced="return onWizardProxyNext(this);">
+  <wizardpage label=" " pageid="first" next="proxy" onextra2="onCopyLog();"
+              onpageshow="setTimeout(function() { showWizardNavButtons(false); }, 0);">
     <hbox class="tbb-header">
       <vbox class="tbb-logo-box" align="start">
         <image class="tbb-logo" />
@@ -39,6 +38,26 @@
       </groupbox>
     </hbox>
     <separator />
+    <vbox class="firstResponses" align="start">
+      <label class="question">&torSettings.firstQuestion;</label>
+      <separator/>
+      <label>&torSettings.configurePrompt1;</label>
+      <label>&torSettings.configurePrompt2;</label>
+      <button label="&torSettings.configure;" oncommand="onWizardConfigure();"/>
+      <separator class="tall"/>
+      <label>&torSettings.connectPrompt1;</label>
+      <label>&torSettings.connectPrompt2;</label>
+      <button label="&torSettings.connect;" oncommand="useSettings();"/>
+    </vbox>
+  </wizardpage>
+
+  <wizardpage label=" " pageid="proxy" next="firewall" onextra2="onCopyLog();"
+              onpageshow="showWizardNavButtons(true);"
+              onpageadvanced="return onWizardProxyNext(this);">
+    <vbox class="tbb-logo-box" align="start">
+      <image class="tbb-logo" />
+    </vbox>
+    <separator />
     <hbox>
       <vbox flex="1">
         <label class="question">&torSettings.proxyQuestion;</label>
@@ -106,7 +125,7 @@
     </vbox>
   </wizardpage>
 
-  <wizardpage label=" " pageid="startingTor" next="proxy">
+  <wizardpage label=" " pageid="startingTor" next="first">
     <spring flex="1" />
     <hbox>
       <spring flex="1" />
@@ -126,6 +145,7 @@
     <description>&torsettings.bridgeHelp1;</description>
     <description>&torsettings.bridgeHelp2;</description>
     <description>&torsettings.bridgeHelp3;</description>
+    <description class="endOfHelp">&torsettings.bridgeHelp4;</description>
   </wizardpage>
 
   <hbox pack="start">
diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js
index b3f4fb0..48e9289 100644
--- a/src/chrome/content/network-settings.js
+++ b/src/chrome/content/network-settings.js
@@ -167,6 +167,12 @@ function getWizard()
 }
 
 
+function onWizardConfigure()
+{
+  getWizard().advance("proxy");
+}
+
+
 function onWizardProxyNext(aWizPage)
 {
   if (aWizPage)
@@ -191,6 +197,13 @@ function onWizardFirewallNext(aWizPage)
 }
 
 
+function showWizardNavButtons(aShow)
+{
+  showOrHideButton("back", aShow, false);
+  showOrHideButton("next", aShow, false);
+}
+
+
 var gObserver = {
   observe: function(aSubject, aTopic, aData)
   {
@@ -208,7 +221,7 @@ var gObserver = {
     if (kTorProcessReadyTopic == aTopic)
     {
       var haveWizard = (getWizard() != null);
-      showPanel(haveWizard ? "proxy" : "settings");
+      showPanel(haveWizard ? "first" : "settings");
       if (haveWizard)
       {
         showOrHideButton("back", true, false);
@@ -616,21 +629,7 @@ function applySettings()
   catch (e) { TorLauncherLogger.safelog(4, "Error in applySettings: ", e); }
 
   if (didSucceed)
-  {
-    var settings = {};
-    settings[kTorConfKeyDisableNetwork] = "0";
-    this.setConfAndReportErrors(settings, null);
-
-    gProtocolSvc.TorSendCommand("SAVECONF");
-    gTorProcessService.TorClearBootstrapError();
-
-    gIsBootstrapComplete = gTorProcessService.TorIsBootstrapDone;
-    if (!gIsBootstrapComplete)
-      openProgressDialog();
-
-    if (gIsBootstrapComplete)
-      close();
-  }
+    useSettings();
 
   TorLauncherLogger.log(2, "applySettings done");
 
@@ -638,6 +637,23 @@ function applySettings()
 }
 
 
+function useSettings()
+{
+  var settings = {};
+  settings[kTorConfKeyDisableNetwork] = "0";
+  this.setConfAndReportErrors(settings, null);
+
+  gProtocolSvc.TorSendCommand("SAVECONF");
+  gTorProcessService.TorClearBootstrapError();
+
+  gIsBootstrapComplete = gTorProcessService.TorIsBootstrapDone;
+  if (!gIsBootstrapComplete)
+    openProgressDialog();
+
+  if (gIsBootstrapComplete)
+    close();
+}
+
 function openProgressDialog()
 {
   var chromeURL = "chrome://torlauncher/content/progress.xul";
diff --git a/src/chrome/content/network-settings.xul b/src/chrome/content/network-settings.xul
index d05f4e8..f50e4f6 100644
--- a/src/chrome/content/network-settings.xul
+++ b/src/chrome/content/network-settings.xul
@@ -68,6 +68,7 @@
       <description>&torsettings.bridgeHelp1;</description>
       <description>&torsettings.bridgeHelp2;</description>
       <description>&torsettings.bridgeHelp3;</description>
+      <description class="endOfHelp">&torsettings.bridgeHelp4;</description>
     </vbox>
   </deck>
   <spring flex="1" />
diff --git a/src/chrome/content/progress.xul b/src/chrome/content/progress.xul
index d322c1d..fe85e39 100644
--- a/src/chrome/content/progress.xul
+++ b/src/chrome/content/progress.xul
@@ -38,6 +38,7 @@
       </vbox>
     </hbox>
     <progressmeter id="progressMeter" mode="determined" value="0" />
-    <label id="progressPleaseWait" value="&torprogress.pleaseWait;" hidden="true" />
+    <description id="progressPleaseWait"
+                 hidden="true">&torprogress.pleaseWait;</description>
   </vbox>
 </dialog>
diff --git a/src/chrome/locale/en/network-settings.dtd b/src/chrome/locale/en/network-settings.dtd
index 443f6ff..2207dd2 100644
--- a/src/chrome/locale/en/network-settings.dtd
+++ b/src/chrome/locale/en/network-settings.dtd
@@ -2,19 +2,27 @@
 
 <!-- For "first run" wizard: -->
 
-<!ENTITY torsettings.prompt "Before the Tor Browser attempts to connect to the Internet, we need you to provide some information about your Internet connection.">
+<!ENTITY torsettings.prompt "Before the Tor Browser Bundle tries to connect to the Tor network, you need to provide information about this computer's Internet connection.">
 
 <!ENTITY torSettings.yes "Yes">
 <!ENTITY torSettings.no "No">
 
-<!ENTITY torSettings.proxyQuestion "Do you use a proxy to access the Internet?">
+<!ENTITY torSettings.firstQuestion "Which of the following best describes your situation?">
+<!ENTITY torSettings.configurePrompt1 "This computer's Internet connection is censored, proxied, or filtered.">
+<!ENTITY torSettings.configurePrompt2 "I need to configure network settings.">
+<!ENTITY torSettings.configure "Configure">
+<!ENTITY torSettings.connectPrompt1 "This computer's Internet connection is clear of obstacles.">
+<!ENTITY torSettings.connectPrompt2 "I would like to connect directly to the Tor network.">
+<!ENTITY torSettings.connect "Connect">
+
+<!ENTITY torSettings.proxyQuestion "Does this computer need to use a proxy to access the Internet?">
 <!-- see https://www.torproject.org/docs/proxychain.html.en -->
-<!ENTITY torSettings.proxyHelp "If you are not sure how to answer this question, look at the Internet settings in another browser to see whether you are using a proxy.">
-<!ENTITY torSettings.enterProxy "Enter your proxy settings.">
-<!ENTITY torSettings.firewallQuestion "Does your Internet connection go through a firewall that only allows you to connect to certain ports?">
-<!ENTITY torSettings.firewallHelp "If you are not sure how to answer this question, choose No. If you encounter problems, change this setting.">
-<!ENTITY torSettings.enterFirewall "Enter a comma-separated list of ports that are allowed by your firewall.">
-<!ENTITY torSettings.bridgeQuestion "If your Internet Service Provider (ISP) blocks connections to the Tor network, you will need to use bridge relays.">
+<!ENTITY torSettings.proxyHelp "If you are not sure how to answer this question, look at the Internet settings in another browser to see whether it is configured to use a proxy.">
+<!ENTITY torSettings.enterProxy "Enter the proxy settings.">
+<!ENTITY torSettings.firewallQuestion "Does this computer's Internet connection go through a firewall that only allows connections to certain ports?">
+<!ENTITY torSettings.firewallHelp "If you are not sure how to answer this question, choose No. If you encounter problems connecting to the Tor network, change this setting.">
+<!ENTITY torSettings.enterFirewall "Enter a comma-separated list of ports that are allowed by the firewall.">
+<!ENTITY torSettings.bridgeQuestion "If this computer's Internet connection is censored, you will need to obtain and use bridge relays.  If not, just click Connect.">
 
 <!-- Other: -->
 
@@ -22,17 +30,17 @@
 
 <!ENTITY torsettings.optional "Optional">
 
-<!ENTITY torsettings.useProxy.checkbox "I use a proxy to access the Internet">
+<!ENTITY torsettings.useProxy.checkbox "This computer needs to use a proxy to access the Internet">
+<!ENTITY torsettings.useProxy.type "Proxy Type:">
 <!ENTITY torsettings.useProxy.address "Address:">
 <!ENTITY torsettings.useProxy.address.placeholder "IP address or hostname">
 <!ENTITY torsettings.useProxy.port "Port:">
 <!ENTITY torsettings.useProxy.username "Username:">
 <!ENTITY torsettings.useProxy.password "Password:">
-<!ENTITY torsettings.useProxy.type "Type:">
 <!ENTITY torsettings.useProxy.type.socks4 "SOCKS 4">
 <!ENTITY torsettings.useProxy.type.socks5 "SOCKS 5">
 <!ENTITY torsettings.useProxy.type.http "HTTP / HTTPS">
-<!ENTITY torsettings.firewall.checkbox "My firewall only lets me connect to certain ports">
+<!ENTITY torsettings.firewall.checkbox "This computer goes through a firewall that only allows connections to certain ports">
 <!ENTITY torsettings.firewall.allowedPorts "Allowed Ports:">
 <!ENTITY torsettings.useBridges.checkbox "My Internet Service Provider (ISP) blocks connections to the Tor network">
 <!ENTITY torsettings.useBridges.label "Enter one or more bridge relays in the form address:port.">
@@ -40,7 +48,7 @@
 
 <!ENTITY torsettings.copyLog "Copy Tor Log To Clipboard">
 <!ENTITY torsettings.bridgeHelpTitle "Bridge Relay Help">
-<!ENTITY torsettings.bridgeHelp1 "If you are unable to connect to the Tor network, it could be that your Internet Service Provider (ISP) is blocking Tor.  Often, you can work around this problem by using Tor Bridges which are hidden relays that are more difficult to block.">
+<!ENTITY torsettings.bridgeHelp1 "If you are unable to connect to the Tor network, it could be that your Internet Service Provider (ISP) or another agency is blocking Tor.  Often, you can work around this problem by using Tor Bridges which are hidden relays that are more difficult to block.">
 <!ENTITY torsettings.bridgeHelp2 "To obtain some bridge relays, use a web browser to visit the following page:  https://bridges.torproject.org">
-
-<!ENTITY torsettings.bridgeHelp3 "Another way to find public bridge addresses is to send mail to bridges at torproject.org with the line 'get bridges' by itself in the body of the message. However, so we can make it harder for an attacker to learn lots of bridge addresses, you must send this request from an email address at one of the following domains: gmail.com or yahoo.com.">
+<!ENTITY torsettings.bridgeHelp3 "Another way to find public bridge addresses is to send mail to bridges at torproject.org with the line 'get bridges' by itself in the body of the message.  However, to make it harder for an attacker to learn a lot of bridge addresses, you must send this request from an email address at one of the following domains: gmail.com or yahoo.com.">
+<!ENTITY torsettings.bridgeHelp4 "You can also request bridge relays by sending mail to help at rt.torproject.org.">
diff --git a/src/chrome/locale/en/progress.dtd b/src/chrome/locale/en/progress.dtd
index f390a2b..16491f9 100644
--- a/src/chrome/locale/en/progress.dtd
+++ b/src/chrome/locale/en/progress.dtd
@@ -1,4 +1,4 @@
 <!ENTITY torprogress.dialog.title "Tor Status">
 <!ENTITY torprogress.openSettings "Open Settings">
 <!ENTITY torprogress.heading "Connecting to the Tor network">
-<!ENTITY torprogress.pleaseWait "Your browser will open after you are connected.">
+<!ENTITY torprogress.pleaseWait "The Tor Browser will open after a Tor network connection is established.">
diff --git a/src/chrome/skin/network-settings.css b/src/chrome/skin/network-settings.css
index f45bd04..995c66a 100644
--- a/src/chrome/skin/network-settings.css
+++ b/src/chrome/skin/network-settings.css
@@ -6,14 +6,14 @@
  */
 
 dialog {
-  width: 545px;
+  width: 580px;
   height: 464px;
   font: -moz-dialog;
 }
 
 wizard {
   width: 540px;
-  height: 400px;
+  height: 440px;
   font: -moz-dialog;
   padding-top: 0px;
 }
@@ -47,6 +47,15 @@ wizard radiogroup {
   margin-bottom: 0px;
 }
 
+.firstResponses button {
+  min-width: 85px;
+  margin-top: 9px;
+}
+
+separator.tall {
+  height: 2.1em;
+}
+
 .question {
   font-weight: bold;
 }
@@ -92,7 +101,13 @@ dialog .help {
   margin: 0px 0px 20px 0px;
 }
 
-.help description,
-#bridgeHelp description {
+.help description {
   margin-bottom: 15px;
+  -moz-user-select: text;
+  -moz-user-focus: normal;
+  cursor: text;
+}
+
+.help description.endOfHelp {
+  margin-bottom: 0px;
 }





More information about the tor-commits mailing list