def _add_auto_new_question_gui(self, box):
hbox = gu.bHBox(box, False)
hbox.set_spacing(gu.PAD_SMALL)
adj = Gtk.Adjustment(0, 0, 10, 0.1, 1)
spin = gu.nSpinButton(self.m_exname, 'seconds_before_new_question',
adj)
spin.set_digits(1)
label = Gtk.Label(label=_("Delay (seconds):"))
label.show()
def f(button, spin=spin, label=label):
spin.set_sensitive(button.get_active())
label.set_sensitive(button.get_active())
b = gu.nCheckButton(self.m_exname, 'new_question_automatically',
_("_New question automatically."), callback=f)
hbox.pack_start(b, False, False, 0)
label.set_sensitive(b.get_active())
hbox.pack_start(label, False, False, 0)
spin.set_sensitive(b.get_active())
hbox.pack_start(spin, False, False, 0)
评论列表
文章目录