Merge pull request #219498 from Alper-Celik/master

plasma-desktop: fix opening orca screen reader settings from kde systemsettings and kcmshell5 in kcm_access kcm
This commit is contained in:
K900 2023-04-14 08:57:13 +03:00 committed by GitHub
commit 5d67039b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 3 deletions

View File

@ -53,6 +53,10 @@
, plasma-workspace
, qqc2-desktop-style
, xf86inputlibinput
, glib
, gsettings-desktop-schemas
, runCommandLocal
, makeWrapper
}:
mkDerivation {
@ -115,10 +119,19 @@ mkDerivation {
patches = [
./hwclock-path.patch
./tzdir.patch
./kcm-access.patch
];
CXXFLAGS = [
''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/sbin/hwclock\"''
];
CXXFLAGS =
let
# run gsettings with desktop schemas for using in kcm_accces kcm
gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
makeWrapper ${glib}/bin/gsettings $out --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
'';
in
[
''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/bin/hwclock\"''
''-DNIXPKGS_GSETTINGS=\"${gsettings-wrapper}\"''
];
postInstall = ''
# Display ~/Desktop contents on the desktop by default.
sed -i "''${!outputBin}/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \

View File

@ -0,0 +1,13 @@
diff --git a/kcms/access/kcmaccess.cpp b/kcms/access/kcmaccess.cpp
index 4f8d3e2..a96f755 100644
--- a/kcms/access/kcmaccess.cpp
+++ b/kcms/access/kcmaccess.cpp
@@ -176,7 +176,7 @@ void KAccessConfig::launchOrcaConfiguration()
QStringLiteral("screen-reader-enabled"),
QStringLiteral("true")};
- int ret = QProcess::execute(QStringLiteral("gsettings"), gsettingArgs);
+ int ret = QProcess::execute(QStringLiteral(NIXPKGS_GSETTINGS), gsettingArgs);
if (ret) {
const QString errorStr = QLatin1String("gsettings ") + gsettingArgs.join(QLatin1Char(' '));
setOrcaLaunchFeedback(i18n("Could not set gsettings for Orca: \"%1\" failed", errorStr));