(self, wnd, saved=None, document=None)
Show save_as dialog and save to the specified file.
Show save_as dialog and save to the specified file.
Show save_as dialog and save to the specified file .
def file_saveas(self, wnd, saved=None, document=None):
        "Show save_as dialog and save to the specified file."
        def cb(filename, enc, newline):
            if filename:
                self.file_save(wnd, filename, saved=saved, document=document,
                               encoding=enc, newline=newline)
            else:
                if saved:
                    saved(canceled=True)

        if not document:
            document = wnd.document

        from kaa.ui.selectfile import selectfile

        if document.fileinfo:
            newline = document.fileinfo.newline
            encoding = document.fileinfo.encoding
        else:
            newline = encoding = None

        selectfile.show_filesaveas(
            document.get_filename(), newline, encoding, cb)
def file_saveas ( self , wnd , saved = None , document = None ) : def cb ( filename , enc , newline ) : if filename : self . file_save ( wnd , filename , saved = saved , document = document , encoding = enc , newline = newline ) else : if saved : saved ( canceled = True ) if not document : document = wnd . document from kaa . ui . selectfile import selectfile if document . fileinfo : newline = document . fileinfo . newline encoding = document . fileinfo . encoding else : newline = encoding = None selectfile . show_filesaveas ( document . get_filename ( ) , newline , encoding , cb )