From 69745041f80a579991d630a590ac8b2bae9fb757 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 9 Feb 2011 09:01:16 -0500 Subject: [PATCH] Add some more info for desktop app info Small gotchas that can easily be avoided. --- docs/reference/gtk/migrating-2to3.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml index 2b2f4728e2..915ed4591f 100644 --- a/docs/reference/gtk/migrating-2to3.xml +++ b/docs/reference/gtk/migrating-2to3.xml @@ -144,7 +144,7 @@ GAppLaunchContext *context; GError *error = NULL; - info = g_desktop_app_info_new ("epiphany.desktop"); + info = (GAppInfo *) g_desktop_app_info_new ("epiphany.desktop"); context = gdk_display_get_app_launch_context (display); g_app_info_launch (info, NULL, context, &error); @@ -157,6 +157,10 @@ g_object_unref (info); g_object_unref (context); + Remember that you have to include + gio/gdesktopappinfo.h + and use the gio-unix-2.0 pkg-config file + when using g_desktop_app_info_new(). If you are launching a custom commandline, you can still use g_app_info_launch() with a GAppInfo that is constructed