def check_all(settings, boolval):
    """Return true if all of the elements in the dictionary are equal to b (true/false)."""
    retval = True
    for aval in settings:
        if settings[aval] != boolval:
            retval = False
            break
    return retval