From 452c195c4ec87b3e269feb2ae8124ede30da5e33 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Feb 2010 22:05:08 -0600 Subject: Forgot to set the type of the desktop file, need to be an Application. --- libindicator/indicator-desktop-shortcuts.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c index 988e78e..4cebbf2 100644 --- a/libindicator/indicator-desktop-shortcuts.c +++ b/libindicator/indicator-desktop-shortcuts.c @@ -479,8 +479,9 @@ indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gc group. We have to do this with data as apparently there isn't and add_group function in g_key_file. Go figure. */ gchar * desktopdata = g_strdup_printf("[" G_KEY_FILE_DESKTOP_GROUP "]\n" - G_KEY_FILE_DESKTOP_KEY_NAME "=\"%s\"\n" - G_KEY_FILE_DESKTOP_KEY_EXEC "=\"%s\"\n", + G_KEY_FILE_DESKTOP_KEY_TYPE "=" G_KEY_FILE_DESKTOP_TYPE_APPLICATION "\n" + G_KEY_FILE_DESKTOP_KEY_NAME "=%s\n" + G_KEY_FILE_DESKTOP_KEY_EXEC "=%s\n", name, exec); @@ -497,6 +498,12 @@ indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gc } GDesktopAppInfo * appinfo = g_desktop_app_info_new_from_keyfile(launcher); + if (appinfo == NULL) { + g_warning("Unable to build Desktop App info (unknown)"); + g_key_file_free(launcher); + return FALSE; + } + gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, NULL, &error); if (error != NULL) { -- cgit v1.2.3