[gnome-control-center] color: Search path for gcm-viewer/gcm-calibrate rather than rely on exact location



commit ed41626c677b7bf8f68b7210451c741112f0b0fb
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Apr 17 11:31:04 2020 +1200

    color: Search path for gcm-viewer/gcm-calibrate rather than rely on exact location

 panels/color/cc-color-panel.c | 8 ++++----
 panels/color/meson.build      | 4 ----
 2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 35c78b295..603178efc 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -591,13 +591,13 @@ gcm_prefs_calibrate_cb (CcColorPanel *prefs)
 
   /* run with modal set */
   argv = g_ptr_array_new_with_free_func (g_free);
-  g_ptr_array_add (argv, g_build_filename (BINDIR, "gcm-calibrate", NULL));
+  g_ptr_array_add (argv, g_strdup ("gcm-calibrate"));
   g_ptr_array_add (argv, g_strdup ("--device"));
   g_ptr_array_add (argv, g_strdup (cd_device_get_id (prefs->current_device)));
   g_ptr_array_add (argv, g_strdup ("--parent-window"));
   g_ptr_array_add (argv, g_strdup_printf ("%i", xid));
   g_ptr_array_add (argv, NULL);
-  ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, 0,
+  ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, G_SPAWN_SEARCH_PATH,
                        NULL, NULL, NULL, &error);
   if (!ret)
     g_warning ("failed to run calibrate: %s", error->message);
@@ -1029,13 +1029,13 @@ gcm_prefs_profile_view (CcColorPanel *prefs, CdProfile *profile)
 
   /* open up gcm-viewer as a info pane */
   argv = g_ptr_array_new_with_free_func (g_free);
-  g_ptr_array_add (argv, g_build_filename (BINDIR, "gcm-viewer", NULL));
+  g_ptr_array_add (argv, g_strdup ("gcm-viewer"));
   g_ptr_array_add (argv, g_strdup ("--profile"));
   g_ptr_array_add (argv, g_strdup (cd_profile_get_id (profile)));
   g_ptr_array_add (argv, g_strdup ("--parent-window"));
   g_ptr_array_add (argv, g_strdup_printf ("%i", xid));
   g_ptr_array_add (argv, NULL);
-  ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, 0,
+  ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, G_SPAWN_SEARCH_PATH,
                        NULL, NULL, NULL, &error);
   if (!ret)
     g_warning ("failed to run calibrate: %s", error->message);
diff --git a/panels/color/meson.build b/panels/color/meson.build
index d21c54a6a..742caf67b 100644
--- a/panels/color/meson.build
+++ b/panels/color/meson.build
@@ -47,10 +47,6 @@ deps = common_deps + [
   dependency('libsoup-2.4')
 ]
 
-cflags += [
-  '-DBINDIR="@0@"'.format(control_center_bindir)
-]
-
 panels_libs += static_library(
   cappletname,
   sources: sources,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]