3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch
Thomas Tuegel 1c3492f358
kde-gtk-config: Set path for GSettings schemas
Fixes: #38919

The KCModule is patched to set the appropriate environment variables in
the parent process when it is initialized.
2018-05-12 20:35:25 -05:00

22 lines
1.1 KiB
Diff

Index: kde-gtk-config-5.12.4/src/gtkconfigkcmodule.cpp
===================================================================
--- kde-gtk-config-5.12.4.orig/src/gtkconfigkcmodule.cpp
+++ kde-gtk-config-5.12.4/src/gtkconfigkcmodule.cpp
@@ -78,6 +78,16 @@ GTKConfigKCModule::GTKConfigKCModule(QWi
m_iconsModel = new IconThemesModel(false, this);
ui->cb_icon->setModel(m_iconsModel);
ui->cb_icon_fallback->setModel(m_iconsModel);
+
+ // Add GSETTINGS_SCHEMAS_PATH to the front of XDG_DATA_DIRS.
+ // Normally this would be done by wrapGAppsHook, but this plugin
+ // (shared object) cannot be wrapped.
+ QByteArray xdgdata = qgetenv("XDG_DATA_DIRS");
+ if (!xdgdata.isEmpty()) {
+ xdgdata.push_front(":");
+ }
+ xdgdata.push_front(QByteArray(GSETTINGS_SCHEMAS_PATH));
+ qputenv("XDG_DATA_DIRS", xdgdata);
m_tempGtk2Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/gtkrc-2.0";
m_tempGtk3Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/.config/gtk-3.0/settings.ini";