示例#1
0
        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_doc_diff(document, callback=cb)
                else:
                    cb()
示例#2
0
        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_doc_diff(document, callback=cb)
                else:
                    cb()
示例#3
0
        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_doc_diff(document, callback=cb)
                else:
                    cb()
            else:
                self.notify_fileupdated(document)
示例#4
0
        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_doc_diff(
                        document, callback=cb)
                else:
                    cb()
            else:
                self.notify_fileupdated(document)
示例#5
0
 def file_viewdiff(self, wnd, callback=None):
     if wnd.document.fileinfo and wnd.document.fileinfo.fullpathname:
         from kaa.ui.viewdiff import viewdiffmode
         viewdiffmode.view_doc_diff(wnd.document, callback=None)
示例#6
0
 def file_viewdiff(self, wnd, callback=None):
     if wnd.document.fileinfo and wnd.document.fileinfo.fullpathname:
         from kaa.ui.viewdiff import viewdiffmode
         viewdiffmode.view_doc_diff(wnd.document, callback=None)