[tor-commits] [arm/master] Adding menu option to start managed instance

atagar at torproject.org atagar at torproject.org
Sun Jul 10 01:05:31 UTC 2011


commit 30ab0618ff30c754b9a07dc25b80da4fa269e578
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Jul 9 17:04:22 2011 -0700

    Adding menu option to start managed instance
    
    If we've already made a custom torrc then providing a menu option to use it.
---
 src/cli/menu/actions.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/cli/menu/actions.py b/src/cli/menu/actions.py
index db9d178..7f63b1b 100644
--- a/src/cli/menu/actions.py
+++ b/src/cli/menu/actions.py
@@ -50,6 +50,7 @@ def makeActionsMenu():
   """
   
   control = cli.controller.getController()
+  manager = control.getTorManager()
   conn = torTools.getConn()
   headerPanel = control.getPanel("header")
   actionsMenu = cli.menu.item.Submenu("Actions")
@@ -58,6 +59,8 @@ def makeActionsMenu():
   
   if conn.isAlive():
     actionsMenu.add(cli.menu.item.MenuItem("Stop Tor", conn.shutdown))
+  elif manager.isTorrcAvailable():
+    actionsMenu.add(cli.menu.item.MenuItem("Start Tor", manager.startManagedInstance))
   
   actionsMenu.add(cli.menu.item.MenuItem("Reset Tor", conn.reload))
   actionsMenu.add(cli.menu.item.MenuItem("Setup Wizard", cli.wizard.showWizard))





More information about the tor-commits mailing list