diff --git a/legacy/efreet/src/lib/efreet_ini.c b/legacy/efreet/src/lib/efreet_ini.c index a03661a452..ab94d0ad8d 100644 --- a/legacy/efreet/src/lib/efreet_ini.c +++ b/legacy/efreet/src/lib/efreet_ini.c @@ -603,6 +603,20 @@ efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value) FREE(buf); } +/** + * @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 diff --git a/legacy/efreet/src/lib/efreet_ini.h b/legacy/efreet/src/lib/efreet_ini.h index 3f2e462ab6..17be511a35 100644 --- a/legacy/efreet/src/lib/efreet_ini.h +++ b/legacy/efreet/src/lib/efreet_ini.h @@ -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); + /** * @} */