def load_file(self, filename):
self.m_P = lessonfile.ChordLessonfile(filename)
self.m_P.m_changed = False
if self.m_P.m_questions:
self.m_P._idx = 0
self.set_navinfo()
else:
# Do a little trick to make an empty question
self.m_P.m_questions = [dataparser.Question()]
self.m_P.m_questions[-1].music = lessonfile.Music("", "chord")
self.m_P.m_questions[-1].name = ""
self.m_P._idx = 0
if self.m_P.header.module not in ('idbyname', 'chord', 'chordvoicing'):
dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.MODAL,
Gtk.MessageType.ERROR, Gtk.ButtonsType.CLOSE,
_("The exercise module '%s' is not supported yet. Cannot edit this file.") % c)
dialog.run()
dialog.destroy()
self.m_P = EditorLessonfile()
self.update_appwin()
评论列表
文章目录