support gadget versions with [X-Gadget-Version] .desktop entry

fix T6397
This commit is contained in:
Mike Blumenkrantz 2018-01-22 15:25:31 -05:00
parent 9bba6e80e4
commit 35f705a621
1 changed files with 6 additions and 1 deletions

View File

@ -103,8 +103,13 @@ static char *
sandbox_name(const char *filename)
{
Efreet_Desktop *ed = eina_hash_find(sandbox_gadgets, filename);
char *version, buf[1024];
return strdup(ed->name);
if (!ed->x) return strdup(ed->name);
version = eina_hash_find(ed->x, "X-Gadget-Version");
if (!version) return strdup(ed->name);
snprintf(buf, sizeof(buf), "%s (v%s)", ed->name, version);
return strdup(buf);
}
static void