SBrickFunctionsBox.py 文件源码

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

项目:sbrick-controller 作者: wintersandroid 项目源码 文件源码
def do_settings(self):
        dialog = FunctionConfigureDialog(self.get_toplevel(), self.configuration, self.channels)
        response = dialog.run()
        if response == Gtk.ResponseType.OK:
            ch = self.hbox.get_children()
            for c in ch:
                self.hbox.remove(c)
                c.destroy()
            for func in self.configuration["functions"]:
                button = Gtk.Button(func["label"])
                button.connect("clicked", self.on_button_clicked)
                button.brick_function = func
                self.hbox.pack_start(button, True, True, 0)
            self.label.set_text(self.configuration["group"])
            self.show_all()
            dialog.destroy()
            return True
        else:
            dialog.destroy()
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号