|
|
3e1b5e5 |
commit 771d297a4e6e551a7c559c7eb6b77e54f7d62c37
|
|
|
3e1b5e5 |
Author: Richard Hughes <hughsie@localhost.localdomain>
|
|
|
3e1b5e5 |
Date: Tue Aug 19 22:04:32 2008 +0100
|
|
|
3e1b5e5 |
|
|
|
3e1b5e5 |
bugfix: fix compiling the browser plugins where HAVE_GDK_APP_LAUNCH_CONTEXT_NEW is defined -- re-apply as I think git got itself in a tizz (trivial)
|
|
|
3e1b5e5 |
|
|
|
3e1b5e5 |
diff --git a/contrib/packagekit-plugin/src/contents.cpp b/contrib/packagekit-plugin/src/contents.cpp
|
|
|
3e1b5e5 |
index 9d51ac9..3be68fb 100644
|
|
|
3e1b5e5 |
--- a/contrib/packagekit-plugin/src/contents.cpp
|
|
|
3e1b5e5 |
+++ b/contrib/packagekit-plugin/src/contents.cpp
|
|
|
3e1b5e5 |
@@ -598,6 +598,9 @@ void
|
|
|
3e1b5e5 |
PkpContents::runApplication (Time time)
|
|
|
3e1b5e5 |
{
|
|
|
3e1b5e5 |
GError *error = NULL;
|
|
|
3e1b5e5 |
+#ifdef HAVE_GDK_APP_LAUNCH_CONTEXT_NEW
|
|
|
3e1b5e5 |
+ GdkAppLaunchContext *context;
|
|
|
3e1b5e5 |
+#endif
|
|
|
3e1b5e5 |
|
|
|
3e1b5e5 |
if (mAppInfo == 0) {
|
|
|
3e1b5e5 |
g_warning("Didn't find application to launch");
|
|
|
3e1b5e5 |
@@ -607,20 +610,22 @@ PkpContents::runApplication (Time time)
|
|
|
3e1b5e5 |
if (time == 0)
|
|
|
3e1b5e5 |
time = get_server_timestamp();
|
|
|
3e1b5e5 |
|
|
|
3e1b5e5 |
- GAppLaunchContext *context = 0;
|
|
|
3e1b5e5 |
#ifdef HAVE_GDK_APP_LAUNCH_CONTEXT_NEW
|
|
|
3e1b5e5 |
context = gdk_app_launch_context_new();
|
|
|
3e1b5e5 |
- gdk_app_launch_context_set_timestamp(time);
|
|
|
3e1b5e5 |
+ gdk_app_launch_context_set_timestamp(context, time);
|
|
|
3e1b5e5 |
+ if (!g_app_info_launch(mAppInfo, NULL, G_APP_LAUNCH_CONTEXT (context), &error)) {
|
|
|
3e1b5e5 |
+#else
|
|
|
3e1b5e5 |
+ if (!g_app_info_launch(mAppInfo, NULL, NULL, &error)) {
|
|
|
3e1b5e5 |
#endif
|
|
|
3e1b5e5 |
-
|
|
|
3e1b5e5 |
- if (!g_app_info_launch(mAppInfo, NULL, context, &error)) {
|
|
|
3e1b5e5 |
g_warning("%s\n", error->message);
|
|
|
3e1b5e5 |
g_clear_error(&error);
|
|
|
3e1b5e5 |
return;
|
|
|
3e1b5e5 |
}
|
|
|
3e1b5e5 |
|
|
|
3e1b5e5 |
- if (context != 0)
|
|
|
3e1b5e5 |
+#ifdef HAVE_GDK_APP_LAUNCH_CONTEXT_NEW
|
|
|
3e1b5e5 |
+ if (context != NULL)
|
|
|
3e1b5e5 |
g_object_unref(context);
|
|
|
3e1b5e5 |
+#endif
|
|
|
3e1b5e5 |
}
|
|
|
3e1b5e5 |
|
|
|
3e1b5e5 |
void
|