the dicks at canonical like to break fdo .desktop file spec by adding invalid characters (underscores) to key names. we are not amused.

SVN revision: 71941
This commit is contained in:
Mike Blumenkrantz 2012-06-11 09:38:10 +00:00
parent 4d3515b730
commit 3e24827119
1 changed files with 3 additions and 1 deletions

View File

@ -809,10 +809,11 @@ efreet_desktop_generic_fields_parse(Efreet_Desktop *desktop, Efreet_Ini *ini)
const char *not_show_in = NULL, *only_show_in = NULL;
val = efreet_ini_localestring_get(ini, "Name");
if (!val) val = efreet_ini_localestring_get(ini, "_Name");
if (val) desktop->name = strdup(val);
else
{
ERR("efreet_desktop_generic_fields_parse error: no Name");
ERR("efreet_desktop_generic_fields_parse error: no Name or _Name fields");
return 0;
}
@ -820,6 +821,7 @@ efreet_desktop_generic_fields_parse(Efreet_Desktop *desktop, Efreet_Ini *ini)
if (val) desktop->generic_name = strdup(val);
val = efreet_ini_localestring_get(ini, "Comment");
if (!val) val = efreet_ini_localestring_get(ini, "_Comment");
if (val) desktop->comment = strdup(val);
val = efreet_ini_localestring_get(ini, "Icon");