[sysprof/wip/chergert/sysprof-3] libsysprof-ui: use flatpak-spawn when necessary
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] libsysprof-ui: use flatpak-spawn when necessary
- Date: Fri, 10 May 2019 19:16:19 +0000 (UTC)
commit b8ed0aae743cc375f5059b6afcd6ac42c6c8d9c1
Author: Christian Hergert <chergert redhat com>
Date: Fri May 10 09:22:57 2019 -0700
libsysprof-ui: use flatpak-spawn when necessary
src/libsysprof-ui/sysprof-profiler-menu-button.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-profiler-menu-button.c
b/src/libsysprof-ui/sysprof-profiler-menu-button.c
index 395d739..d8bd148 100644
--- a/src/libsysprof-ui/sysprof-profiler-menu-button.c
+++ b/src/libsysprof-ui/sysprof-profiler-menu-button.c
@@ -820,7 +820,22 @@ sysprof_profiler_menu_button_validate_spawn (SysprofProfilerMenuButton *self,
}
else
{
- sysprof_profiler_set_spawn_argv (priv->profiler, (const gchar * const *)argv);
+ g_autoptr(GPtrArray) cooked = g_ptr_array_new ();
+
+ if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
+ {
+ g_ptr_array_add (cooked, "flatpak-spawn");
+ g_ptr_array_add (cooked, "--host");
+ g_ptr_array_add (cooked, "--watch-bus");
+ }
+
+ for (guint i = 0; argv[i] != NULL; i++)
+ g_ptr_array_add (cooked, argv[i]);
+ g_ptr_array_add (cooked, NULL);
+
+ sysprof_profiler_set_spawn_argv (priv->profiler,
+ (const gchar * const *)cooked->pdata);
+
g_object_set (entry,
"secondary-icon-name", NULL,
"secondary-icon-tooltip-text", NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]