*Efreet_Ini: Add a new API call:
authordavemds <davemds@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 24 Oct 2009 09:23:51 +0000 (09:23 +0000)
committerdavemds <davemds@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 24 Oct 2009 09:23:51 +0000 (09:23 +0000)
EAPI void efreet_ini_key_unset(Efreet_Ini *ini, const char *key);

With this you can remove keys from ini files

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@43245 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/efreet_ini.c
src/lib/efreet_ini.h

index a03661a..ab94d0a 100644 (file)
@@ -604,6 +604,20 @@ efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value)
 }
 
 /**
+ * @param ini: The ini struct to work with
+ * @param key: The key to remove
+ * @return Returns no value
+ * @brief Remove the given key from the ini struct
+ */
+EAPI void
+efreet_ini_key_unset(Efreet_Ini *ini, const char *key)
+{
+    if (!ini || !key || !ini->section) return;
+
+    eina_hash_del(ini->section, key, NULL);
+}
+
+/**
  * @param str The string to unescape
  * @return An allocated unescaped string
  * @brief Unescapes backslash escapes in a string
index 3f2e462..17be511 100644 (file)
@@ -52,6 +52,8 @@ EAPI double       efreet_ini_double_get(Efreet_Ini *ini, const char *key);
 EAPI void         efreet_ini_double_set(Efreet_Ini *ini, const char *key,
                                                     double value);
 
+EAPI void         efreet_ini_key_unset(Efreet_Ini *ini, const char *key);
+
 /**
  * @}
  */