def __init__(self, teacher):
abstract.IntervalGui.__init__(self, teacher)
self.g_test_stat_dlg = None
################
# practice_box #
################
self.std_buttons_add(
('repeat_melodic', self.repeat_melodic),
('give_up', self.give_up),
)
##############
# config_box #
##############
self.g_ask_for_frame = frame = Gtk.Frame(label=_("Ask for these intervals"))
self.config_box.pack_start(frame, False, False, 0)
self.g_interval_selector = nIntervalCheckBox(self.m_exname, 'intervals')
def _ff(var):
if self.m_t.m_custom_mode:
# If we are running in custom mode, then the user can
# select himself what intervals to practise. And then
# we have to reset the exercise.
self.on_end_practise()
self.on_start_practise()
self.add_watch('intervals', _ff)
self.g_interval_selector.set_border_width(gu.PAD)
frame.add(self.g_interval_selector)
self.add_lock_to_key_gui()
#------we need some space
self.config_box.pack_start(Gtk.HBox(), False, False,
padding=gu.PAD_SMALL)
# ------------------------------------------
self._add_auto_new_question_gui(self.config_box)
# ----------------------------------------------
self._create_select_inputwidget_gui()
# ------------ frame -------------------
self.config_box.set_spacing(0)
self.config_box.show_all()
##############
# statistics #
##############
self.setup_statisticsviewer(statisticsviewer.StatisticsViewer,
_("Harmonic interval"))
self.select_inputwidget()
评论列表
文章目录