depot/third_party/nixpkgs/pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04: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";