def pngbutton(self, i):
"used by the constructor"
btn = Gtk.Button()
if i > len(const.RHYTHMS):
im = Gtk.Image()
im.set_from_stock("gtk-missing-image", Gtk.IconSize.LARGE_TOOLBAR)
im.show()
btn.add(im)
else:
btn.add(gu.create_rhythm_image(const.RHYTHMS[i]))
btn.show()
btn.connect('clicked', self.guess_element, i)
return btn
评论列表
文章目录