From f64e3d14d2701eaa77190a626c142c21459edeb2 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 19 Mar 2024 14:07:54 +0100 Subject: flameshot-once: patch paths in applauncherwidget --- .../simple/flameshot-once/flameshot/default.nix | 1 + .../flameshot/flameshot-12.applauncher.patch | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix b/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix index f60acef08..43cfdb00d 100644 --- a/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix +++ b/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix @@ -12,5 +12,6 @@ pkgs.flameshot.overrideAttrs (old: rec { patches = old.patches or [] ++ [ ./flameshot-12.imgur.patch ./flameshot-12.history.patch + ./flameshot-12.applauncher.patch ]; }) diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch b/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch new file mode 100644 index 000000000..6937c55b3 --- /dev/null +++ b/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch @@ -0,0 +1,26 @@ +diff --git a/src/tools/launcher/applauncherwidget.cpp b/src/tools/launcher/applauncherwidget.cpp +index 8a202c89..7427aeb9 100644 +--- a/src/tools/launcher/applauncherwidget.cpp ++++ b/src/tools/launcher/applauncherwidget.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + namespace { + #if defined(Q_OS_WIN) +@@ -66,7 +67,12 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent) + QDir appsDirLocal(dirLocal); + m_parser.processDirectory(appsDirLocal); + +- QString dir = QStringLiteral("/usr/share/applications/"); ++ const char *USER = secure_getenv("USER"); ++ QString dirUser = "/etc/profiles/per-user/" + QString::fromUtf8(USER) + "/share/applications/"; ++ QDir appsDirUser(dirUser); ++ m_parser.processDirectory(appsDirUser); ++ ++ QString dir = QStringLiteral("/run/current-system/sw/share/applications/"); + QDir appsDir(dir); + m_parser.processDirectory(appsDir); + #endif -- cgit v1.2.3