def __init__(self, lf, v):
"""
lf is the lesson file (aka m_P of the teacher object)
v is a list of element names defind in the lesson file lf,
for example:
['I', 'IV', 'V', 'I']
Return a HBox that presents a label with the label names
separated by "-".
"""
gu.AlignedHBox.__init__(self)
self.setup_pre()
for i, k in enumerate(v):
if k in lf.m_elements:
l = new_labelobject(lf.m_elements[k]['label'])
else:
l = Gtk.Label(label=k)
self.pack_start(l, False, False)
if i != len(v) - 1:
l = Gtk.Label(label="-")
self.pack_start(l, False, False)
self.setup_post()
self.show_all()
评论列表
文章目录