aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-16 22:05:08 -0600
committerTed Gould <ted@gould.cx>2010-02-16 22:05:08 -0600
commit452c195c4ec87b3e269feb2ae8124ede30da5e33 (patch)
tree63c42558293905f06abf388e140141c35c9db499
parentaf36cb86cf0cb671cd8521e66562341a2a015fd1 (diff)
downloadlibayatana-indicator-452c195c4ec87b3e269feb2ae8124ede30da5e33.tar.gz
libayatana-indicator-452c195c4ec87b3e269feb2ae8124ede30da5e33.tar.bz2
libayatana-indicator-452c195c4ec87b3e269feb2ae8124ede30da5e33.zip
Forgot to set the type of the desktop file, need to be an Application.
-rw-r--r--libindicator/indicator-desktop-shortcuts.c11
1 files 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) {