From: Baptiste DURAND Date: Wed, 29 Oct 2014 13:23:41 +0000 (+0100) Subject: Use app_laucher to launch applications registered by application framework. X-Git-Tag: accepted/tizen/common/20150511.125909^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;p=profile%2Fcommon%2Fweston-common.git Use app_laucher to launch applications registered by application framework. In Tizen, applications installed have specific destop file field. When it appears in destop file use "app_launcher -s " 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 --- 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);