[gnome-builder/gnome-builder-43] libide/core: fix layered settings paths for languages
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-43] libide/core: fix layered settings paths for languages
- Date: Tue, 27 Sep 2022 04:59:18 +0000 (UTC)
commit fcef0e0b4dd67627d24f42f856d9758ae4d87621
Author: Christian Hergert <chergert redhat com>
Date: Mon Sep 26 21:58:58 2022 -0700
libide/core: fix layered settings paths for languages
We need to maintain compatibility with old installs of Builder and the
location where language defaults are set. This adds a specific override
for those language settings so we get the right value.
Fixes #1813
src/libide/core/ide-settings.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/libide/core/ide-settings.c b/src/libide/core/ide-settings.c
index d55885c35..48da00c95 100644
--- a/src/libide/core/ide-settings.c
+++ b/src/libide/core/ide-settings.c
@@ -162,6 +162,19 @@ ide_settings_resolve_schema_path (const char *schema_id,
else
return g_strconcat ("/org/gnome/builder/projects/", path_suffix, NULL);
}
+ else if (g_str_equal (schema_id, "org.gnome.builder.editor.language"))
+ {
+ /* This is a special case so that we don't have to migrate users settings
+ * from one path to another. Otherwise, we'd be perfectly fine doing it
+ * other way (but that'd require changes to ide-language-defaults.c too).
+ *
+ * Bug: https://gitlab.gnome.org/GNOME/gnome-builder/-/issues/1813
+ */
+ if (project_id != NULL)
+ return g_strconcat ("/org/gnome/builder/projects/", project_id, "/editor/language/", path_suffix,
NULL);
+ else
+ return g_strconcat ("/org/gnome/builder/editor/language/", path_suffix, NULL);
+ }
else
{
const char *suffix = schema_id + strlen ("org.gnome.builder.");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]