'Save current history log (all text in console)'

@Slot()
def save_historylog(self):

    title = _('Save    history    log')
    self.redirect_stdio.emit(False)
    (filename, _selfilter) = getsavefilename(self, title, self.historylog_filename, ('%s    (*.log)' % _('History    logs')))
    self.redirect_stdio.emit(True)
    if filename:
        filename = osp.normpath(filename)
        try:
            encoding.write(to_text_string(self.get_text_with_eol()), filename)
            self.historylog_filename = filename
            CONF.set('main', 'historylog_filename', filename)
        except EnvironmentError as error:
            QMessageBox.critical(self, title, (_("<b>Unable    to    save    file    '%s'</b><br><br>Error    message:<br>%s") % (osp.basename(filename), to_text_string(error))))
