diff --git a/app/core/gimp-templates.c b/app/core/gimp-templates.c index 3d0142a1bc..3a25c86541 100644 --- a/app/core/gimp-templates.c +++ b/app/core/gimp-templates.c @@ -57,7 +57,18 @@ gimp_templates_load (Gimp *gimp) g_clear_error (&error); g_object_unref (file); - file = gimp_sysconf_directory_file ("templaterc", NULL); + if (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR")) + { + gchar *path; + path = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"), + "etc", "templaterc", NULL); + file = g_file_new_for_path (path); + g_free (path); + } + else + { + file = gimp_sysconf_directory_file ("templaterc", NULL); + } if (! gimp_config_deserialize_file (GIMP_CONFIG (gimp->templates), file, NULL, &error)) diff --git a/app/widgets/gimpcontrollers.c b/app/widgets/gimpcontrollers.c index 9268627121..d7ff9ac7e1 100644 --- a/app/widgets/gimpcontrollers.c +++ b/app/widgets/gimpcontrollers.c @@ -158,7 +158,18 @@ gimp_controllers_restore (Gimp *gimp, g_clear_error (&error); g_object_unref (file); - file = gimp_sysconf_directory_file ("controllerrc", NULL); + if (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR")) + { + gchar *path; + path = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"), + "etc", "controllerrc", NULL); + file = g_file_new_for_path (path); + g_free (path); + } + else + { + file = gimp_sysconf_directory_file ("controllerrc", NULL); + } if (! gimp_config_deserialize_file (GIMP_CONFIG (manager->controllers), file, NULL, &error))