X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fconfig.cc;h=cefa28cc84bd3d30a0aaee7a8efafd496131461b;hb=0b72760cead4cc3a1b2b29a7dc6e36b59df2eef4;hp=3e99e135b0754b6f18a462666b849696fc56a525;hpb=a95a6bd8e81a6bcc9db8abbbb3c0c78f087733f4;p=chaz%2Fopenbox diff --git a/util/epist/config.cc b/util/epist/config.cc index 3e99e135..cefa28cc 100644 --- a/util/epist/config.cc +++ b/util/epist/config.cc @@ -20,6 +20,10 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. +#ifdef HAVE_CONFIG_H +# include "../../config.h" +#endif // HAVE_CONFIG_H + #include "config.hh" using std::string; @@ -77,7 +81,7 @@ bool Config::getValue(Config::BoolType type, bool &ret) const BoolItemList::const_iterator it = bool_items.begin(), end = bool_items.end(); for (; it != end; ++it) { if ((*it)->type == type) { - ret = (*it)->type; + ret = (*it)->value; return true; } } @@ -123,7 +127,8 @@ void Config::addOption(const std::string &name, const std::string &value) item->type = bool_options[i].type; - if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "1")) + if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "1") == 0 || + strcasecmp(tmp, "on") == 0) item->value = true; else item->value = false;