[tor-commits] [tor-launcher/master] Display "Copy Tor Log" button in wizard after bootstrap error.

brade at torproject.org brade at torproject.org
Tue Apr 30 14:05:56 UTC 2013


commit f3382b7fe609b1e10993eb626b00ad792dfc087d
Author: Kathy Brade <brade at torproject.org>
Date:   Tue Apr 30 10:04:14 2013 -0400

    Display "Copy Tor Log" button in wizard after bootstrap error.
---
 src/chrome/content/network-settings.js |    3 +++
 src/components/tl-process.js           |    9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js
index ce35a12..6123b15 100644
--- a/src/chrome/content/network-settings.js
+++ b/src/chrome/content/network-settings.js
@@ -112,6 +112,9 @@ function initDialog()
         cancelBtn.parentNode.insertBefore(copyLogBtn, cancelBtn.nextSibling);
     }
 
+    if (gTorProcessService.TorBootstrapErrorOccurred)
+      wizardShowCopyLogButton();
+
     // Use "Connect" as the finish button label (on the last wizard page)..
     var finishBtn = document.documentElement.getButton("finish");
     if (finishBtn)
diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index 3c6ed23..1ef4d8a 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -210,6 +210,12 @@ TorProcessService.prototype =
     return this.mIsBootstrapDone;
   },
 
+  get TorBootstrapErrorOccurred()
+  {
+    return this.mBootstrapErrorOccurred;
+  },
+
+
   TorClearBootstrapError: function()
   {
     this.mLastTorWarningPhase = null;
@@ -220,6 +226,7 @@ TorProcessService.prototype =
   // Private Member Variables ////////////////////////////////////////////////
   mIsTorProcessReady: false,
   mIsBootstrapDone: false,
+  mBootstrapErrorOccurred: false,
   mIsQuitting: false,
   mObsSvc: null,
   mProtocolSvc: null,
@@ -359,6 +366,7 @@ TorProcessService.prototype =
     if (100 == aStatusObj.PROGRESS)
     {
       this.mIsBootstrapDone = true;
+      this.mBootstrapErrorOccurred = false;
       TorLauncherUtil.setBoolPref(this.kPrefPromptAtStartup, false);
     }
     else
@@ -367,6 +375,7 @@ TorProcessService.prototype =
 
       if (aStatusObj._errorOccurred)
       {
+        this.mBootstrapErrorOccurred = true;
         TorLauncherUtil.setBoolPref(this.kPrefPromptAtStartup, true);
         TorLauncherLogger.log(5, "Tor bootstrap error: " + aStatusObj.WARNING);
 



More information about the tor-commits mailing list