main.py 文件源码

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

项目:PyIDE 作者: raggesilver 项目源码 文件源码
def _quit(self, *args):
        if len(self.filesObject) > 0:
            unsaved = False
            unsavedFile = ''
            for i,f in enumerate(self.filesObject):
                if not f['curText'] == f['originalText']:
                    unsaved = True
                    unsavedFile = os.path.basename(f['path'])
                    break

            if unsaved:
                res = self.confirm('{} is not saved, are you sure you want to exit without saving?'.format(os.path.basename(f['path'])))
                if res:
                    self.linter.do_deactivate()
                    Gtk.main_quit()
                else:
                    return True
            else:
                self.linter.do_deactivate()
                Gtk.main_quit()

        else:
            self.linter.do_deactivate()
            Gtk.main_quit()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号