<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">config.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+15</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">8ec0f1f990aa -> 00dd49743974</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">config.h</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+4</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">8ec0f1f990aa -> 00dd49743974</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+19</td><td></td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >2 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Add boolean config type
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>config.c</b></big> <small id="info" style="color: #888888;" >8ec0f1f990aa -> 00dd49743974</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/config.c
+++ lxdream/src/config.c
@@ -154,6 +154,21 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     return group->params[key].value;
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+gboolean lxdream_get_config_boolean_value( lxdream_config_group_t group, int key )
+{
+    const gchar *value = lxdream_get_config_value(group, key);
+    if( strcasecmp(value, "on") == 0 || strcasecmp(value, "true") == 0 ||
+        strcasecmp(value, "yes") == 0 || strcasecmp(value, "1") == 0 ) {
+        return TRUE;
+    } else {
+        return FALSE;
+    }
+}
+
+gboolean lxdream_set_config_boolean_value( lxdream_config_group_t group, int key, gboolean value )
+{
+    return lxdream_set_config_value(group, key, value ? "on" : "off");
+}
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 gboolean lxdream_set_config_value( lxdream_config_group_t group, int key, const gchar *value )
 {
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>config.h</b></big> <small id="info" style="color: #888888;" >8ec0f1f990aa -> 00dd49743974</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/config.h
+++ lxdream/src/config.h
@@ -36,6 +36,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define CONFIG_TYPE_KEY 3
 #define CONFIG_TYPE_FILELIST 4
 #define CONFIG_TYPE_INTEGER 5
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define CONFIG_TYPE_BOOLEAN 6
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #define DEFAULT_CONFIG_FILENAME "lxdreamrc"
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -97,6 +98,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > void lxdream_copy_config_group( lxdream_config_group_t dest, lxdream_config_group_t src );
 void lxdream_clone_config_group( lxdream_config_group_t dest, lxdream_config_group_t src );
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+gboolean lxdream_get_config_boolean_value( lxdream_config_group_t group, int key );
+gboolean lxdream_set_config_boolean_value( lxdream_config_group_t group, int key, gboolean value );
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Return a fully expanded path value for a key - this performs substitutions
  * for ~ and simple shell variables ($VAR and ${VAR})
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>