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()
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)
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)