def install(self):
        try:
            numset = 0
            numerrors = 0
            for name in self.options:
                option = weechat.config_get(name)
                if option:
                    if weechat.config_option_set(option, self.options[name], 1) == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR:
                        self.prnt_error('Error setting option "%s" to value "%s" (running an old WeeChat?)' % (name, self.options[name]))
                        numerrors += 1
                    else:
                        numset += 1
                else:
                    self.prnt('Warning: option not found: "%s" (running an old WeeChat?)' % name)
                    numerrors += 1
            errors = ''
            if numerrors > 0:
                errors = ', %d error(s)' % numerrors
            if self.filename:
                self.prnt('Theme "%s" installed (%d options set%s)' % (self.filename, numset, errors))
            else:
                self.prnt('Theme installed (%d options set%s)' % (numset, errors))
        except:
            if self.filename:
                self.prnt_error('Failed to install theme "%s"' % self.filename)
            else:
                self.prnt_error('Failed to install theme')