games_nebula.py 文件源码

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

项目:games_nebula 作者: yancharkin 项目源码 文件源码
def timer(self):

        if len(self.additional_windows_list) != 0:
            for window in self.additional_windows_list:
                window_notebook = window.get_child()
                if window_notebook != None:
                    window_notebook_n_pages = window_notebook.get_n_pages()
                    for i in range(window_notebook_n_pages):
                        page_name = window_notebook.get_nth_page(i).get_name()
                        if page_name not in self.detached_tabs_names:
                            self.detached_tabs_names.append(page_name)

        if (len(self.detached_tabs_names) + self.notebook.get_n_pages()) == 5:
            self.button_add_tab.set_visible(False)
        else:
            self.button_add_tab.set_visible(True)

        GObject.timeout_add(1000, self.timer)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号