[gnome-build-meta/fix-yelp: 5/7] Include a yelp patch that was lost
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/fix-yelp: 5/7] Include a yelp patch that was lost
- Date: Mon, 21 Jan 2019 22:23:53 +0000 (UTC)
commit d1541e8e1de7648f09ab19748739cef2feae4ead
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 20 16:41:06 2019 -0500
Include a yelp patch that was lost
This patch was included in the 3.28 runtime, but
got lost somewhere.
elements/sdk/yelp.bst | 2 ++
files/yelp/0001-Try-to-fit-in-a-sandbox.patch | 46 +++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
---
diff --git a/elements/sdk/yelp.bst b/elements/sdk/yelp.bst
index 9dfb551..0f8190a 100644
--- a/elements/sdk/yelp.bst
+++ b/elements/sdk/yelp.bst
@@ -3,6 +3,8 @@ sources:
- kind: git
url: gitlab_gnome_org:GNOME/yelp
track: master
+- kind: patch
+ file: files/yelp/0001-Try-to-fit-in-a-sandbox.patch
depends:
- sdk/WebKitGTK+.bst
- sdk/adwaita-icon-theme.bst
diff --git a/files/yelp/0001-Try-to-fit-in-a-sandbox.patch b/files/yelp/0001-Try-to-fit-in-a-sandbox.patch
new file mode 100644
index 0000000..1907cb5
--- /dev/null
+++ b/files/yelp/0001-Try-to-fit-in-a-sandbox.patch
@@ -0,0 +1,46 @@
+From 1a9ddf907792de0778f13248b6f0bd7e8d211562 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen redhat com>
+Date: Thu, 16 Mar 2017 15:44:48 -0400
+Subject: [PATCH] Try to fit in a sandbox
+
+When running in another apps sandbox, use an app name that works.
+---
+ src/yelp-application.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/yelp-application.c b/src/yelp-application.c
+index 47a69991..c7fd646c 100644
+--- a/src/yelp-application.c
++++ b/src/yelp-application.c
+@@ -370,12 +370,27 @@ YelpApplication *
+ yelp_application_new (void)
+ {
+ YelpApplication *app;
++ char *app_id = NULL;
++ char *yelp = NULL;
++
++ if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS)) {
++ GKeyFile *kf = g_key_file_new ();
++ g_key_file_load_from_file (kf, "/.flatpak-info", G_KEY_FILE_NONE, NULL);
++ app_id = g_key_file_get_string (kf, "Application", "name", NULL);
++ yelp = g_strconcat (app_id, ".Help", NULL);
++ g_key_file_unref (kf);
++ }
++ else {
++ yelp = g_strdup ("org.gnome.Yelp");
++ }
+
+ app = g_object_new (YELP_TYPE_APPLICATION,
+- "application-id", "org.gnome.Yelp",
++ "application-id", yelp,
+ "flags", G_APPLICATION_HANDLES_COMMAND_LINE,
+ "inactivity-timeout", 5000,
+ NULL);
++ g_free (app_id);
++ g_free (yelp);
+
+ return app;
+ }
+--
+2.12.0
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]