global_settings.py 文件源码

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

项目:sc-controller 作者: kozec 项目源码 文件源码
def load_autoswitch(self):
        """ Transfers autoswitch settings from config to UI """
        tvItems = self.builder.get_object("tvItems")
        cbShowOSD = self.builder.get_object("cbShowOSD")
        conditions = AutoSwitcher.parse_conditions(self.app.config)
        model = tvItems.get_model()
        model.clear()
        for cond in conditions.keys():
            o = GObject.GObject()
            o.condition = cond
            o.action = conditions[cond]
            a_str = o.action.describe(Action.AC_SWITCHER)
            model.append((o, o.condition.describe(), a_str))
        self._recursing = True
        self.on_tvItems_cursor_changed()
        cbShowOSD.set_active(bool(self.app.config['autoswitch_osd']))
        self._recursing = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号