Fix missing icon on snap (#2616)

* defined FLAMESHOT_ICON variable

* print statements

* remove print statements

* adding FLAMESHOT_ICON to snap yaml file

* code format; comment
This commit is contained in:
vozdeckyl
2022-05-23 16:06:24 +01:00
committed by GitHub
parent 0ecb4eefa4
commit 14100659b9
3 changed files with 17 additions and 4 deletions

View File

@@ -12,6 +12,13 @@
#include "src/core/flameshotdaemon.h"
#endif
// work-around for snap, which cannot install icons into
// the system folder, so instead the absolute path to the
// icon (saved somwhere in /snap/flameshot/...) is passed
#ifndef FLAMESHOT_ICON
#define FLAMESHOT_ICON "flameshot"
#endif
SystemNotification::SystemNotification(QObject* parent)
: QObject(parent)
, m_interface(nullptr)
@@ -61,9 +68,10 @@ void SystemNotification::sendMessage(const QString& text,
hintsMap[QStringLiteral("x-kde-urls")] =
QStringList({ fullPath.toString() });
}
args << (qAppName()) // appname
<< static_cast<unsigned int>(0) // id
<< "flameshot" // icon
<< FLAMESHOT_ICON // icon
<< title // summary
<< text // body
<< QStringList() // actions