def __init__(self, teacher, no_notebook=False):
Gtk.VBox.__init__(self)
cfg.ConfigUtils.__init__(self, teacher.m_exname)
assert type(no_notebook) == bool
self._std_buttons = []
self.m_key_bindings = {}
self.m_t = teacher
vbox = Gtk.VBox()
vbox.set_spacing(gu.PAD)
vbox.set_border_width(gu.PAD)
vbox.show()
self.practise_box = Gtk.VBox()
self.practise_box.show()
vbox.pack_start(self.practise_box, True, True, 0)
box = Gtk.VBox()
self.practise_box.pack_start(box, False, False, padding=gu.hig.SPACE_LARGE)
box.show()
self.g_lesson_heading = Gtk.Label()
box.pack_start(self.g_lesson_heading, True, True, 0)
self.g_lesson_description = Gtk.Label()
self.g_lesson_description.set_line_wrap(True)
box.pack_start(self.g_lesson_description, True, True, 0)
self.action_area = Gtk.HBox()
self.action_area.show()
vbox.pack_start(self.action_area, False, False, 0)
self.config_box = Gtk.VBox()
self.config_box.set_border_width(gu.PAD)
self.config_box.show()
self.config_box_sizegroup = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
if no_notebook:
self.pack_start(vbox, True, True, 0)
self.pack_start(self.config_box, False, False, 0)
self.g_notebook = None
else:
self.g_notebook = Gtk.Notebook()
self.pack_start(self.g_notebook, True, True, 0)
self.g_notebook.append_page(vbox, Gtk.Label(label=_("Practise")))
self.g_notebook.append_page(self.config_box, Gtk.Label(label=_("Config")))
self.g_notebook.show()
self.g_cancel_test = Gtk.Button(_("_Cancel test"))
self.g_cancel_test.connect('clicked', self.on_cancel_test)
self.action_area.pack_end(self.g_cancel_test, False, False, 0)
评论列表
文章目录