예제 #1
0
파일: filecommand.py 프로젝트: smorin/kaa
        def choice(c):
            if c == 'y':
                self.file_save(wnd, saved=callback, document=document)
            elif c == 'n':
                callback(canceled=False)
            elif c == 'd':
                def cb():
                    return self.ask_doc_close(
                        wnd, document, callback, msg)

                if document.fileinfo and document.fileinfo.fullpathname:
                    from kaa.ui.viewdiff import viewdiffmode
                    viewdiffmode.view_diff(document, callback=cb)
                else:
                    cb()
예제 #2
0
파일: filecommand.py 프로젝트: smorin/kaa
        def choice(c):
            if c == 'y':
                self.reload_file(document)
            elif c == 'n':
                return
            elif c == 'd':
                def cb():
                    return self.notify_fileupdated(document)

                if document.fileinfo and document.fileinfo.fullpathname:
                    from kaa.ui.viewdiff import viewdiffmode
                    viewdiffmode.view_diff(
                        document, callback=cb)
                else:
                    cb()
            else:
                self.notify_fileupdated(document)
예제 #3
0
파일: filecommand.py 프로젝트: smorin/kaa
 def file_viewdiff(self, wnd, callback=None):
     if wnd.document.fileinfo and wnd.document.fileinfo.fullpathname:
         from kaa.ui.viewdiff import viewdiffmode
         viewdiffmode.view_diff(wnd.document, callback=None)