diff options
author | Baptiste DURAND <baptiste.durand@open.eurogiciel.org> | 2014-10-29 14:23:41 +0100 |
---|---|---|
committer | Rafal Krypa <r.krypa@samsung.com> | 2015-05-04 11:45:24 +0200 |
commit | ce103fb60ffea0d5ececa8e177f19d6c5f6c5092 (patch) | |
tree | 36c5f74978064f7c76e1e12def596c92246c9d72 | |
parent | 582e74c6c925baa051577d0d6ebd16a7b099ba1c (diff) | |
download | weston-common-ce103fb60ffea0d5ececa8e177f19d6c5f6c5092.tar.gz weston-common-ce103fb60ffea0d5ececa8e177f19d6c5f6c5092.tar.bz2 weston-common-ce103fb60ffea0d5ececa8e177f19d6c5f6c5092.zip |
Use app_laucher to launch applications registered by application framework.HEADsubmit/tizen_common/20150511.102306accepted/tizen/common/20150511.125909tizen_3.0.2015.q2_commontizenaccepted/tizen_common
In Tizen, applications installed have specific destop file field.
When it appears in destop file use "app_launcher -s <appid>" to launch them
changes in review : https://review.tizen.org/gerrit/29552 are needed first
BUG-Tizen=TC-1968
Change-Id: I213976616f7f8bca9b550bc738d2c7e6b6638c5d
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
-rw-r--r-- | src/tz-launcher.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tz-launcher.c b/src/tz-launcher.c index 8f8d9fc..c116c91 100644 --- a/src/tz-launcher.c +++ b/src/tz-launcher.c @@ -51,7 +51,7 @@ gboolean file_is_desktop_file_for_application (GFile *file, gboolean store_values, gchar ***table) { gboolean result; - + gchar *appid; GKeyFile *keyfile = g_key_file_new (); g_key_file_load_from_file (keyfile, g_file_get_path(file), G_KEY_FILE_NONE, NULL); @@ -59,7 +59,13 @@ file_is_desktop_file_for_application (GFile *file, gboolean store_values, gchar gchar **values = g_new (gchar*, 7); values[0] = g_key_file_get_value (keyfile, "Desktop Entry", "Name", &error); values[1] = g_key_file_get_value (keyfile, "Desktop Entry", "Comment", NULL); - values[2] = g_key_file_get_value (keyfile, "Desktop Entry", "Exec", &error); + appid = g_key_file_get_value (keyfile, "Desktop Entry", "X-TIZEN-AppID", NULL); + if (!appid) + values[2] = g_key_file_get_value (keyfile, "Desktop Entry", "Exec", &error); + else { + values[2] = g_strdup_printf ("app_launcher -s %s",appid); + g_free(appid); + } values[3] = g_key_file_get_value (keyfile, "Desktop Entry", "Icon", NULL); values[4] = g_key_file_get_value (keyfile, "Desktop Entry", "Terminal", NULL); values[5] = g_key_file_get_value (keyfile, "Desktop Entry", "Type", &error); |