window.py 文件源码

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

项目:nvim-pygtk3 作者: rliang 项目源码 文件源码
def update(self, tablist: list, tabcurr: int):
        """Updates the widget's tabs.

        :tablist: list of tab names.
        :tabcurr: the active buffer's number.

        """
        self.props.updating = True
        for _ in range(self.get_n_pages()):
            self.remove_page(-1)
        for name in tablist:
            page = Gtk.Box()
            self.append_page(page, Gtk.Label(name))
            self.child_set_property(page, 'tab-expand', True)
        self.show_all()
        self.set_current_page(tabcurr - 1)
        self.set_show_tabs(self.get_n_pages() > 1)
        self.props.updating = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号