'Save file as...'

def save_as(self, index=None):

    if (index is None):
        index = self.get_stack_index()
    finfo = self.data[index]
    finfo.newly_created = True
    filename = self.select_savename(finfo.filename)
    if filename:
        ao_index = self.has_filename(filename)
        if (ao_index and (ao_index != index)):
            if (not self.close_file(ao_index)):
                return
            if (ao_index < index):
                index -= 1
        new_index = self.rename_in_data(index, new_filename=filename)
        self.file_renamed_in_data.emit(str(id(self)), index, filename)
        ok = self.save(index=new_index, force=True)
        self.refresh(new_index)
        self.set_stack_index(new_index)
        return ok
    else:
        return False
