forked from enlightenment/efl
Ignore empty values, don't write them either.
SVN revision: 25888
This commit is contained in:
parent
5e59f3af40
commit
7a0519ac2a
|
@ -133,7 +133,8 @@ ecore_desktop_ini_get(const char *file)
|
||||||
/* FIXME: should strip space at end, then unescape value. */
|
/* FIXME: should strip space at end, then unescape value. */
|
||||||
tv = ecore_hash_remove(current, key);
|
tv = ecore_hash_remove(current, key);
|
||||||
if (tv) free(tv);
|
if (tv) free(tv);
|
||||||
ecore_hash_set(current, strdup(key), strdup(value));
|
if (value[0] != '\0')
|
||||||
|
ecore_hash_set(current, strdup(key), strdup(value));
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stdout, " %s=%s\n", key, value);
|
fprintf(stdout, " %s=%s\n", key, value);
|
||||||
#endif
|
#endif
|
||||||
|
@ -577,7 +578,13 @@ ecore_desktop_save(Ecore_Desktop * desktop)
|
||||||
fprintf(f, "[Desktop Entry]\n");
|
fprintf(f, "[Desktop Entry]\n");
|
||||||
ecore_list_goto_first(list);
|
ecore_list_goto_first(list);
|
||||||
while ((key = (char *) ecore_list_next(list)))
|
while ((key = (char *) ecore_list_next(list)))
|
||||||
fprintf(f, "%s=%s\n", key, (char *) ecore_hash_get(desktop->group, key));
|
{
|
||||||
|
char *value;
|
||||||
|
|
||||||
|
value = (char *) ecore_hash_get(desktop->group, key);
|
||||||
|
if ((value) && (value[0] != '\0'))
|
||||||
|
fprintf(f, "%s=%s\n", key, value);
|
||||||
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue