From 1a6f0f2ce7515b54bdaad7e0a8915c4f3048e5b5 Mon Sep 17 00:00:00 2001 From: Walther Neuper Date: Mon, 14 Dec 2009 12:38:56 +0000 Subject: 4th review display, establish coding standards --- diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py index 7a317bd..2b92c8a 100755 --- a/ReckonPrimer.activity/display.py +++ b/ReckonPrimer.activity/display.py @@ -18,24 +18,6 @@ class Display: """ print("in display, class definition") -# The display is partitioned into the following tables -# -# +----------------------------------+----------------------------------+ -# | | | -# | | | -# | | | -# | | | -# | | | -# | | settings_table | -# | | | -# | | | -# | | | -# | | | -# | | | -# | +----------------------------------+ -# | | table_with_start | -# +----------------------------------+----------------------------------+ - def __init__(self, window): self._permanent_gui_elements(window) self.errors = 0 @@ -50,6 +32,22 @@ class Display: self._learner = learner def _permanent_gui_elements(self, window): + # The display is partitioned as follows + # + # table: + # 0 1 2 + #0+-------------------------+------------------------+ + # | | | + #1| | OVERLAYS OF | + # | scrolled_window | topic_table | + #2| | OR | + # | | settings_table | + #3+-------------------------+ OR | + # | | table_with_start | + #4| empty for calcs etc | | + # | | | + #5+-------------------------+------------------------+ + self.main_window = window # Save the sugar main window # whole window with 5 lines and 2 columns @@ -95,11 +93,11 @@ class Display: self.table.attach(self.topic_table, 1, 2, 0, 5) self.table.attach(self.table_with_start,1, 2, 0, 5) - # show all tables + # show all tables, scrolled_window already shown above self.settings_table.show() self.topic_table.show() self.table_with_start.show() - self.table.show() # since all other tables have benn inserted + self.table.show() # since all other tables have been inserted def update_time(self): minutes, seconds = divmod(self.stopwatch.elapsed, 60) -- cgit v0.9.1