/usr/share/arm/gui/controller.py is in tor-arm 1.4.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | import thread
import time
import gobject
import gtk
from connections import connPanel
from gui.graphing import bandwidthStats
from gui import configPanel, generalPanel, logPanel
from util import log, torTools
gobject.threads_init()
class GuiController:
  def __init__(self):
    self.builder = gtk.Builder()
    try:
      self.builder.add_from_file('src/gui/arm.xml')
    except:
      # when installed the above path doesn't work (the 'src' prefix doesn't
      # exist and whichever path it's working off of doens't seem to exist),
      # so using absolute path instead
      self.builder.add_from_file('/usr/share/arm/gui/arm.xml')
    self.builder.connect_signals(self)
    panelClasses = (logPanel.LogPanel,
              bandwidthStats.BandwidthStats,
              connPanel.ConnectionPanel,
              configPanel.ConfigPanel,
              generalPanel.GeneralPanel)
    self.panels = {}
    for panelClass in panelClasses:
      self.panels[panelClass] = panelClass(self.builder)
      self.panels[panelClass].pack_widgets()
  def run(self):
    window = self.builder.get_object('window_main')
    window.show_all()
    gtk.main()
  def on_action_about_activate(self, widget, data=None):
    dialog = self.builder.get_object('aboutdialog')
    dialog.run()
  def on_aboutdialog_response(self, widget, responseid, data=None):
    dialog = self.builder.get_object('aboutdialog')
    dialog.hide()
  def on_action_quit_activate(self, widget, data=None):
    gtk.main_quit()
  def on_window_main_delete_event(self, widget, data=None):
    gtk.main_quit()
def start_gui():
  controller = GuiController()
  controller.run()
 |