[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 320/331] Fix launching various KDE4 applications
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 320/331] Fix launching various KDE4 applications
- Date: Wed, 4 May 2016 14:25:26 +0000 (UTC)
commit c26a7b2a9e107f4edaf9e3b31c2a5d364ce53e22
Author: Richard Hughes <richard hughsie com>
Date: Wed Apr 27 10:31:47 2016 +0100
Fix launching various KDE4 applications
Based on a patch by Iain Lane <iain orangesquash org uk>, many thanks.
src/gs-application.c | 2 +-
src/gs-dbus-helper.c | 2 +-
src/gs-plugin.c | 3 ++-
src/gs-utils.h | 3 +++
4 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 660b54b..8d7381e 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -723,7 +723,7 @@ launch_activated (GSimpleAction *action,
desktop_id = g_variant_get_string (parameter, NULL);
display = gdk_display_get_default ();
- appinfo = G_APP_INFO (g_desktop_app_info_new (desktop_id));
+ appinfo = G_APP_INFO (gs_utils_get_desktop_app_info (desktop_id));
if (appinfo == NULL) {
g_warning ("no such desktop file: %s", desktop_id);
return;
diff --git a/src/gs-dbus-helper.c b/src/gs-dbus-helper.c
index f1c1ced..fa30681 100644
--- a/src/gs-dbus-helper.c
+++ b/src/gs-dbus-helper.c
@@ -298,7 +298,7 @@ notify_search_resources (GsShellExtrasMode mode,
g_autoptr(GNotification) n = NULL;
if (desktop_id != NULL) {
- app_info = g_desktop_app_info_new (desktop_id);
+ app_info = gs_utils_get_desktop_app_info (desktop_id);
if (app_info != NULL)
app_name = g_app_info_get_name (G_APP_INFO (app_info));
}
diff --git a/src/gs-plugin.c b/src/gs-plugin.c
index ed1b79d..5b2780c 100644
--- a/src/gs-plugin.c
+++ b/src/gs-plugin.c
@@ -44,6 +44,7 @@
#include "gs-plugin.h"
#include "gs-os-release.h"
+#include "gs-utils.h"
/**
* gs_plugin_status_to_string:
@@ -362,7 +363,7 @@ gs_plugin_app_launch (GsPlugin *plugin, GsApp *app, GError **error)
desktop_id);
return FALSE;
}
- appinfo = G_APP_INFO (g_desktop_app_info_new (desktop_id));
+ appinfo = G_APP_INFO (gs_utils_get_desktop_app_info (desktop_id));
if (appinfo == NULL) {
g_set_error (error,
GS_PLUGIN_ERROR,
diff --git a/src/gs-utils.h b/src/gs-utils.h
index d53cb35..5d5a61b 100644
--- a/src/gs-utils.h
+++ b/src/gs-utils.h
@@ -22,6 +22,7 @@
#ifndef __GS_UTILS_H
#define __GS_UTILS_H
+#include <gio/gdesktopappinfo.h>
#include <gtk/gtk.h>
#include "gs-app.h"
@@ -72,6 +73,8 @@ void gs_utils_widget_set_custom_css (GtkWidget *widget,
gboolean gs_utils_is_current_desktop (const gchar *name);
+GDesktopAppInfo *gs_utils_get_desktop_app_info (const gchar *id);
+
G_END_DECLS
#endif /* __GS_UTILS_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]