[gnome-build-meta/abderrahim/backports] Fix yelp



commit e887986e06c5a1f1ef554f4864cd598fe868f75d
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 22 11:16:23 2019 +0000

    Fix yelp

 elements/sdk/yelp.bst                         |  2 ++
 files/yelp/0001-Try-to-fit-in-a-sandbox.patch | 48 +++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
---
diff --git a/elements/sdk/yelp.bst b/elements/sdk/yelp.bst
index 31a093d6..ad22c27a 100644
--- a/elements/sdk/yelp.bst
+++ b/elements/sdk/yelp.bst
@@ -3,6 +3,8 @@ sources:
 - kind: tar
   url: https://download.gnome.org/sources/yelp/3.30/yelp-3.30.0.tar.xz
   ref: 647fb00a592e92c95815d59e86016339ef1bd1a0aea309bd3367962005480a18
+- kind: patch
+  path: 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 00000000..bb71e270
--- /dev/null
+++ b/files/yelp/0001-Try-to-fit-in-a-sandbox.patch
@@ -0,0 +1,48 @@
+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.
+
+https://gitlab.gnome.org/GNOME/yelp/issues/123
+---
+ 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]