diff options
author | Walther Neuper <neuper@neuper.(none)> | 2009-12-14 12:02:06 (GMT) |
---|---|---|
committer | Walther Neuper <neuper@neuper.(none)> | 2009-12-14 12:02:06 (GMT) |
commit | a2152dd5868abdfb4e54205a40d6bd341c960d66 (patch) | |
tree | cb79d64f0e81d50189f58abaeb2145b29e2f7a0f | |
parent | afcba29f89565e8811c82130f6c93a537ed778b9 (diff) |
review display, establish coding standards
-rwxr-xr-x | ReckonPrimer.activity/display.py | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py index 0ce6146..45abf05 100755 --- a/ReckonPrimer.activity/display.py +++ b/ReckonPrimer.activity/display.py @@ -17,7 +17,25 @@ class Display: Exception (redesign?): def define_buttons in classes derived from Exercise. """ print("in display, class definition") - + +# The display is partitioned into the following tables +# +# +----------------------------------+----------------------------------+ +# | | | +# | | | +# | | | +# | | | +# | | | +# | | settings_table | +# | | | +# | | | +# | | | +# | | | +# | | | +# | +----------------------------------+ +# | | table_with_start | +# +----------------------------------+----------------------------------+ + def __init__(self, window): self.errors = 0 self._sett = None # setting updated by callbacks during input @@ -55,35 +73,23 @@ class Display: # Create a log_view with the previously created log_buffer self.log_view = gtk.TextView(self.log_buffer) - # Set the font size for the log_view self.log_view.modify_font(pango.FontDescription('sans bold 14')) - - # Set the log_view to not editable self.log_view.set_editable(False) - - # Set the cursor to not visible self.log_view.set_cursor_visible(False) - - # Set the justification to center self.log_view.set_justification(gtk.JUSTIFY_CENTER) # Create a scrollable window for the log_view self.scrolled_window = gtk.ScrolledWindow() - # Set scrollable window policies - self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, + gtk.POLICY_AUTOMATIC) # Connect log_view and scrolled window self.scrolled_window.add(self.log_view) - # Insert the log_view into the upper half self.table.attach(self.scrolled_window, 0, 1, 0, 3) - - # Display the log_view self.log_view.show() - - # Display the scrolled_window self.scrolled_window.show() # Settings start here @@ -135,8 +141,6 @@ class Display: self.stopwatch_label.set_label(time) self.stopwatch_label.queue_draw() return True - - def draw_result_screen(self): """RENAME to draw_feedback_screen""" |