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>
file_is_desktop_file_for_application (GFile *file, gboolean store_values, gchar ***table)
{
gboolean result;
file_is_desktop_file_for_application (GFile *file, gboolean store_values, gchar ***table)
{
gboolean result;
GKeyFile *keyfile = g_key_file_new ();
g_key_file_load_from_file (keyfile, g_file_get_path(file), G_KEY_FILE_NONE, NULL);
GKeyFile *keyfile = g_key_file_new ();
g_key_file_load_from_file (keyfile, g_file_get_path(file), G_KEY_FILE_NONE, NULL);
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);
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);
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);