import_vdf.py 文件源码

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

项目:sc-controller 作者: kozec 项目源码 文件源码
def vdf_import_confirmed(self, *a):
        name = self.builder.get_object("txName").get_text().strip()

        if len(self._profile.action_sets) > 1:
            # Update ChangeProfileActions with correct profile names
            for x in self._profile.action_set_switches:
                id = int(x._profile.split(":")[-1])
                target_set = self._profile.action_set_by_id(id)
                x._profile = self.gen_aset_name(name, target_set)

            # Save action set profiles
            for k in self._profile.action_sets:
                if k != 'default':
                    filename = self.gen_aset_name(name, k) + ".sccprofile"
                    path = os.path.join(get_profiles_path(), filename)
                    self._profile.action_sets[k].save(path)

        self.app.new_profile(self._profile, name)
        GLib.idle_add(self.window.destroy)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号