355
/* Determine whether it's a click package by looking for the symlink
356
that is created by the desktop hook */
358
is_click (const gchar * appid)
360
gchar * appiddesktop = g_strdup_printf("%s.desktop", appid);
361
gchar * click_link = NULL;
362
const gchar * link_farm_dir = g_getenv("UBUNTU_APP_LAUNCH_LINK_FARM");
363
if (G_LIKELY(link_farm_dir == NULL)) {
364
click_link = g_build_filename(g_get_user_cache_dir(), "ubuntu-app-launch", "desktop", appiddesktop, NULL);
366
click_link = g_build_filename(link_farm_dir, appiddesktop, NULL);
368
g_free(appiddesktop);
369
gboolean click = g_file_test(click_link, G_FILE_TEST_EXISTS);
375
/* Determine whether an AppId is realated to a Libertine container by
376
checking the container and program name. */
378
is_libertine (const gchar * appid)
380
if (app_info_libertine(appid, NULL, NULL)) {
381
g_debug("Libertine application detected: %s", appid);
389
ubuntu_app_launch_application_info (const gchar * appid, gchar ** appdir, gchar ** appdesktop)
391
if (is_click(appid)) {
392
return app_info_click(appid, appdir, appdesktop);
393
} else if (is_libertine(appid)) {
394
return app_info_libertine(appid, appdir, appdesktop);
396
return app_info_legacy(appid, appdir, appdesktop);