abstract.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Solfege 作者: RannyeriDev 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号