SideBar.py 文件源码

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

项目:.sublime 作者: cxdongjack 项目源码 文件源码
def confirm(self, paths, display_paths):
        import functools
        window = sublime.active_window()
        window.show_input_panel("BUG!", '', '', None, None)
        window.run_command('hide_panel');

        yes = []
        yes.append('Yes, delete the selected items.');
        for item in display_paths:
            yes.append(item);

        no = []
        no.append('No');
        no.append('Cancel the operation.');

        while len(no) != len(yes):
            no.append('');

        if sublime.platform() == 'osx':
            sublime.set_timeout(lambda:window.show_quick_panel([yes, no], functools.partial(self.on_confirm, paths)), 200);
        else:
            window.show_quick_panel([yes, no], functools.partial(self.on_confirm, paths))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号