nixpkgs-suyu/pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch
2018-10-11 15:24:37 +02:00

21 lines
1 KiB
Diff

diff --git a/src/gtkconfigkcmodule.cpp b/src/gtkconfigkcmodule.cpp
index 7b82d50..96831d8 100644
--- a/src/gtkconfigkcmodule.cpp
+++ b/src/gtkconfigkcmodule.cpp
@@ -91,6 +91,16 @@ GTKConfigKCModule::GTKConfigKCModule(QWidget* parent, const QVariantList& args )
iconsProxyModel->sort(0);
ui->cb_icon->setModel(iconsProxyModel);
ui->cb_icon_fallback->setModel(iconsProxyModel);
+
+ // 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";