Merge pull request #109324 from tpwrules/lxqt-fix-locations

lxqt: fix themes and translations

authored by Jörg Thalheim and committed by GitHub e1ac6eba 2416b9da

+26
+3
pkgs/desktops/lxqt/liblxqt/default.nix
··· 39 39 xorg.libXScrnSaver 40 40 ]; 41 41 42 + # convert name of wrapped binary, e.g. .lxqt-whatever-wrapped to the original name, e.g. lxqt-whatever so binaries can find their resources 43 + patches = [ ./fix-application-path.patch ]; 44 + 42 45 postPatch = '' 43 46 sed -i "s|\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR}|''${out}/share/polkit-1/actions|" CMakeLists.txt 44 47 '';
+23
pkgs/desktops/lxqt/liblxqt/fix-application-path.patch
··· 1 + --- a/lxqtapplication.cpp 2 + +++ b/lxqtapplication.cpp 3 + @@ -77,7 +77,7 @@ Application::Application(int &argc, char** argv, bool handleQuitSignals) 4 + 5 + void Application::updateTheme() 6 + { 7 + - const QString styleSheetKey = QFileInfo(applicationFilePath()).fileName(); 8 + + const QString styleSheetKey = QFileInfo(applicationFilePath()).fileName().mid(1).chopped(8); 9 + setStyleSheet(lxqtTheme.qss(styleSheetKey)); 10 + Q_EMIT themeChanged(); 11 + } 12 + 13 + --- a/lxqttranslator.cpp 14 + +++ b/lxqttranslator.cpp 15 + @@ -147,7 +147,7 @@ bool Translator::translateApplication(const QString &applicationName) 16 + if (!applicationName.isEmpty()) 17 + return translate(applicationName); 18 + else 19 + - return translate(QFileInfo(QCoreApplication::applicationFilePath()).baseName()); 20 + + return translate(QFileInfo(QCoreApplication::applicationFilePath()).baseName().mid(1).chopped(8)); 21 + } 22 + 23 +