about summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2021-01-14 18:25:26 +0000
committerGitHub <noreply@github.com>2021-01-14 18:25:26 +0000
commite1ac6eba349b3cb9d94566e0be9fca7a41c9c7fc (patch)
treea205a0d9ae376d690afd9185933c9f3398d78b68 /pkgs/desktops
parent2416b9da70719402edd473b0bc26bd879c6a6a9c (diff)
parentb6779d541a87fd413623c650d5fa9831d267032c (diff)
Merge pull request #109324 from tpwrules/lxqt-fix-locations
lxqt: fix themes and translations
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/lxqt/liblxqt/default.nix3
-rw-r--r--pkgs/desktops/lxqt/liblxqt/fix-application-path.patch23
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/desktops/lxqt/liblxqt/default.nix b/pkgs/desktops/lxqt/liblxqt/default.nix
index ee915491f8574..959afe1b887a7 100644
--- a/pkgs/desktops/lxqt/liblxqt/default.nix
+++ b/pkgs/desktops/lxqt/liblxqt/default.nix
@@ -39,6 +39,9 @@ mkDerivation rec {
     xorg.libXScrnSaver
   ];
 
+  # convert name of wrapped binary, e.g. .lxqt-whatever-wrapped to the original name, e.g. lxqt-whatever so binaries can find their resources
+  patches = [ ./fix-application-path.patch ];
+
   postPatch = ''
     sed -i "s|\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR}|''${out}/share/polkit-1/actions|" CMakeLists.txt
   '';
diff --git a/pkgs/desktops/lxqt/liblxqt/fix-application-path.patch b/pkgs/desktops/lxqt/liblxqt/fix-application-path.patch
new file mode 100644
index 0000000000000..12ef97db5d824
--- /dev/null
+++ b/pkgs/desktops/lxqt/liblxqt/fix-application-path.patch
@@ -0,0 +1,23 @@
+--- a/lxqtapplication.cpp
++++ b/lxqtapplication.cpp
+@@ -77,7 +77,7 @@ Application::Application(int &argc, char** argv, bool handleQuitSignals)
+ 
+ void Application::updateTheme()
+ {
+-    const QString styleSheetKey = QFileInfo(applicationFilePath()).fileName();
++    const QString styleSheetKey = QFileInfo(applicationFilePath()).fileName().mid(1).chopped(8);
+     setStyleSheet(lxqtTheme.qss(styleSheetKey));
+     Q_EMIT themeChanged();
+ }
+
+--- a/lxqttranslator.cpp
++++ b/lxqttranslator.cpp
+@@ -147,7 +147,7 @@ bool Translator::translateApplication(const QString &applicationName)
+     if (!applicationName.isEmpty())
+         return translate(applicationName);
+     else
+-        return translate(QFileInfo(QCoreApplication::applicationFilePath()).baseName());
++        return translate(QFileInfo(QCoreApplication::applicationFilePath()).baseName().mid(1).chopped(8));
+ }
+ 
+