[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/release] Use tuple instead of dict to init panel (for maintaining order).
commit aea32ec50157270b4e7f3835496dd2c358444931
Author: Kamran Riaz Khan <krkhan@xxxxxxxxxxxxxx>
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')
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits