linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qgnomeplatform / hardcode-gsettings.patch
blob9b342d7cf83207880763c7e1d0e6490e5aac37c4
1 diff --git a/common/gnomehintssettings.cpp b/common/gnomehintssettings.cpp
2 index 9860e57..40fa6ec 100644
3 --- a/common/gnomehintssettings.cpp
4 +++ b/common/gnomehintssettings.cpp
5 @@ -80,9 +80,17 @@ void gtkMessageHandler(const gchar *log_domain,
6 GnomeHintsSettings::GnomeHintsSettings()
7 : QObject(0)
8 , m_usePortal(checkUsePortalSupport())
9 - , m_gnomeDesktopSettings(g_settings_new("org.gnome.desktop.wm.preferences"))
10 - , m_settings(g_settings_new("org.gnome.desktop.interface"))
12 + g_autoptr(GSettingsSchemaSource) schemaSource = nullptr;
13 + g_autoptr(GSettingsSchema) gnomeDesktopSchema = nullptr;
14 + g_autoptr(GSettingsSchema) settingsSchema = nullptr;
16 + schemaSource = g_settings_schema_source_new_from_directory("@gds_gsettings_path@", g_settings_schema_source_get_default(), true, nullptr);
17 + gnomeDesktopSchema = g_settings_schema_source_lookup(schemaSource, "org.gnome.desktop.wm.preferences", false);
18 + m_gnomeDesktopSettings = g_settings_new_full(gnomeDesktopSchema, nullptr, nullptr);
19 + settingsSchema = g_settings_schema_source_lookup(schemaSource, "org.gnome.desktop.interface", false);
20 + m_settings = g_settings_new_full(settingsSchema, nullptr, nullptr);
22 gtk_init(nullptr, nullptr);
24 // Set log handler to suppress false GtkDialog warnings