commit c63b7426b89a3be97ba28dff345ef4d60ba78d52 Merge: 82d89ad e9a02dd Author: Kamran Riaz Khan krkhan@inspirated.com Date: Sun Jul 17 17:15:38 2011 +0500
Merge branch 'master' of git://git.torproject.org/arm
ChangeLog | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ install | 2 +- setup.py | 3 +- src/gui/__init__.py | 2 +- src/gui/controller.py | 13 +++++++++-- src/prereq.py | 6 +++- src/util/__init__.py | 2 +- src/util/panel.py | 1 - src/util/torConfig.py | 2 +- src/version.py | 4 +- 10 files changed, 75 insertions(+), 13 deletions(-)
diff --cc src/gui/controller.py index bf2e0f9,4979ea1..19b9513 --- a/src/gui/controller.py +++ b/src/gui/controller.py @@@ -13,21 -13,31 +13,28 @@@ gobject.threads_init(
class GuiController: def __init__(self): - filename = 'src/gui/arm.xml' - self.builder = gtk.Builder() - self.builder.add_from_file(filename) + + 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)
- self.logPanel = logPanel.LogPanel(self.builder) - self.logPanel.pack_widgets() - - self.bwStats = bandwidthStats.BandwidthStats(self.builder) - self.bwStats.pack_widgets() - - self.connPanel = connPanel.ConnectionPanel(self.builder) - self.connPanel.pack_widgets() - self.connPanel.start() + panelClasses = (logPanel.LogPanel, + bandwidthStats.BandwidthStats, + connPanel.ConnectionPanel, + generalPanel.GeneralPanel) + self.panels = {}
- self.generalPanel = generalPanel.GeneralPanel(self.builder) - self.generalPanel.pack_widgets() + 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')
tor-commits@lists.torproject.org