[gnome-terminal] profile: Use correct schema source for the profiles list schema



commit 86a19228196eb323c4a6512a6e531b5343a83282
Author: Christian Persch <chpe src gnome org>
Date:   Wed Sep 28 23:11:05 2022 +0200

    profile: Use correct schema source for the profiles list schema
    
    Pass the settings schema directly to the constructor instead of the
    schema ID which would be looked up in the default schema source.

 src/terminal-settings-list.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/terminal-settings-list.cc b/src/terminal-settings-list.cc
index f0db40d1..89076430 100644
--- a/src/terminal-settings-list.cc
+++ b/src/terminal-settings-list.cc
@@ -633,10 +633,14 @@ terminal_settings_list_new (GSettingsBackend* backend,
   g_return_val_if_fail (child_schema_id != nullptr, nullptr);
   g_return_val_if_fail (g_str_has_suffix (path, ":/"), nullptr);
 
+  gs_unref_settings_schema auto schema =
+    g_settings_schema_source_lookup(schema_source, schema_id, true);
+  g_assert_nonnull(schema);
+
   return reinterpret_cast<TerminalSettingsList*>(g_object_new (TERMINAL_TYPE_SETTINGS_LIST,
                                                                "backend", backend,
                                                                "schema-source", schema_source,
-                                                              "schema-id", schema_id,
+                                                              "settings-schema", schema,
                                                               "child-schema-id", child_schema_id,
                                                               "path", path,
                                                               "flags", flags,


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