document.py 文件源码

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

项目:CodeReader 作者: jasonrbr 项目源码 文件源码
def _UpdateUIForState(self):
        """Change the title to reflect the state of the document - 
        eg ReadOnly, Dirty, etc
        """
        filename = self.GetPathName()
        if not filename: return # New file - nothing to do
        try:
            # This seems necessary so the internal state of the window becomes
            # "visible".  without it, it is still shown, but certain functions
            # (such as updating the title) dont immediately work?
            self.GetFirstView().ShowWindow(win32con.SW_SHOW)
            title = win32ui.GetFileTitle(filename)
        except win32ui.error:
            title = filename
        if self._IsReadOnly():
            title = title + " (read-only)"
        self.SetTitle(title)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号