mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-ui: use flatpak-spawn when necessary
This commit is contained in:
@ -820,7 +820,22 @@ sysprof_profiler_menu_button_validate_spawn (SysprofProfilerMenuButton *self,
|
|||||||
}
|
}
|
||||||
else
|
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,
|
g_object_set (entry,
|
||||||
"secondary-icon-name", NULL,
|
"secondary-icon-name", NULL,
|
||||||
"secondary-icon-tooltip-text", NULL,
|
"secondary-icon-tooltip-text", NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user