[gnome-desktop] thumbnail: Pass on G_MESSAGES_* envvar to thumbnailer
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] thumbnail: Pass on G_MESSAGES_* envvar to thumbnailer
- Date: Tue, 16 Jan 2018 15:39:19 +0000 (UTC)
commit 2947753ce5755ff3f153ad1ef55a3bb3e4829411
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 16 16:35:32 2018 +0100
thumbnail: Pass on G_MESSAGES_* envvar to thumbnailer
Even if it is sandboxed.
libgnome-desktop/gnome-desktop-thumbnail-script.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail-script.c
b/libgnome-desktop/gnome-desktop-thumbnail-script.c
index 0ac50f7..4fb13d6 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c
@@ -131,6 +131,16 @@ add_args (GPtrArray *argv_array, ...)
va_end (args);
}
+static void
+add_env (GPtrArray *array,
+ const char *envvar)
+{
+ if (g_getenv (envvar) != NULL)
+ add_args (array,
+ "--setenv", envvar, g_getenv (envvar),
+ NULL);
+}
+
static char *
get_extension (const char *path)
{
@@ -518,11 +528,8 @@ add_bwrap (GPtrArray *array,
"--die-with-parent",
NULL);
-#if 0
- add_args (array,
- "--setenv", "G_MESSAGES_DEBUG", "all",
- NULL);
-#endif
+ add_env (array, "G_MESSAGES_DEBUG");
+ add_env (array, "G_MESSAGES_PREFIXED");
/* Add gnome-desktop's install prefix if needed */
if (g_strcmp0 (INSTALL_PREFIX, "") != 0 &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]