[tor-commits] [arm/master] Use tuple instead of dict to init panel (for maintaining order).
atagar at torproject.org
atagar at torproject.org
Thu Aug 11 15:27:56 UTC 2011
commit aea32ec50157270b4e7f3835496dd2c358444931
Author: Kamran Riaz Khan <krkhan at inspirated.com>
Date: Sun Jul 17 16:11:01 2011 +0500
Use tuple instead of dict to init panel (for maintaining order).
---
src/gui/controller.py | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/gui/controller.py b/src/gui/controller.py
index 7172aa7..bf2e0f9 100644
--- a/src/gui/controller.py
+++ b/src/gui/controller.py
@@ -19,15 +19,15 @@ class GuiController:
self.builder.add_from_file(filename)
self.builder.connect_signals(self)
- self.panels = {
- logPanel.LogPanel : None,
- bandwidthStats.BandwidthStats : None,
- connPanel.ConnectionPanel : None,
- generalPanel.GeneralPanel : None }
-
- for panel in self.panels.keys():
- self.panels[panel] = panel(self.builder)
- self.panels[panel].pack_widgets()
+ panelClasses = (logPanel.LogPanel,
+ bandwidthStats.BandwidthStats,
+ connPanel.ConnectionPanel,
+ 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')
More information about the tor-commits
mailing list