def __init__(self, name, count):
super(ResourceRow, self).__init__()
hbox = Gtk.Box(orientation = Gtk.Orientation.HORIZONTAL,
spacing = 5)
self.name = Gtk.Label(xalign = 0)
self.name.set_markup('<b>%s</b>'%name)
self.c = Gtk.SpinButton()
self.c.set_numeric(True)
self.c.set_increments(1, 1)
self.c.set_editable(False)
self.c.set_can_focus(False)
self.p = Gtk.SpinButton()
self.p.set_numeric(True)
self.p.set_increments(1, 1)
self.p.set_can_focus(False)
self.p.set_value(0)
hbox.pack_start(self.name, True, True, 5)
hbox.pack_start(self.c, False, True, 5)
hbox.pack_start(self.p, False, True, 5)
self.add(hbox)
self.set_can_focus(False)
self.update_count(count)
评论列表
文章目录