aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-22 15:25:31 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-22 15:25:31 -0500
commit35f705a62130c27345c8a22e9add1c1120b0f16d (patch)
tree511484efd4ea2a60f68c050bf56860796e0cdc59
parentrequire [Type] = Application for sandbox gadget .desktop entries (diff)
downloadenlightenment-35f705a62130c27345c8a22e9add1c1120b0f16d.tar.gz
support gadget versions with [X-Gadget-Version] .desktop entry
-rw-r--r--src/bin/e_gadget_runner.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/e_gadget_runner.c b/src/bin/e_gadget_runner.c
index 2385066a6..1ea675a1a 100644
--- a/src/bin/e_gadget_runner.c
+++ b/src/bin/e_gadget_runner.c
@@ -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