mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-22 09:51:06 +00:00
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:
@@ -46,9 +46,10 @@ parts:
|
|||||||
- kde-frameworks-5-qt-5-15-core20
|
- kde-frameworks-5-qt-5-15-core20
|
||||||
source: https://github.com/flameshot-org/flameshot.git
|
source: https://github.com/flameshot-org/flameshot.git
|
||||||
plugin: cmake
|
plugin: cmake
|
||||||
# This cannot be enabled until the KF5 toolkit in the snap is updated
|
cmake-parameters:
|
||||||
#cmake-parameters:
|
- -DFLAMESHOT_ICON=/snap/flameshot/current/usr/local/share/icons/hicolor/scalable/apps/flameshot.svg
|
||||||
# - -DUSE_WAYLAND_CLIPBOARD=1
|
# This cannot be enabled until the KF5 toolkit in the snap is updated
|
||||||
|
#- -DUSE_WAYLAND_CLIPBOARD=1
|
||||||
source-type: git
|
source-type: git
|
||||||
override-pull: |
|
override-pull: |
|
||||||
snapcraftctl pull
|
snapcraftctl pull
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ endif ()
|
|||||||
|
|
||||||
add_executable(Flameshot::flameshot ALIAS flameshot)
|
add_executable(Flameshot::flameshot ALIAS flameshot)
|
||||||
|
|
||||||
|
if(FLAMESHOT_ICON)
|
||||||
|
target_compile_definitions(flameshot PUBLIC FLAMESHOT_ICON="${FLAMESHOT_ICON}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_property(TARGET flameshot PROPERTY WIN32_EXECUTABLE true)
|
set_property(TARGET flameshot PROPERTY WIN32_EXECUTABLE true)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
|||||||
@@ -12,6 +12,13 @@
|
|||||||
#include "src/core/flameshotdaemon.h"
|
#include "src/core/flameshotdaemon.h"
|
||||||
#endif
|
#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)
|
SystemNotification::SystemNotification(QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_interface(nullptr)
|
, m_interface(nullptr)
|
||||||
@@ -61,9 +68,10 @@ void SystemNotification::sendMessage(const QString& text,
|
|||||||
hintsMap[QStringLiteral("x-kde-urls")] =
|
hintsMap[QStringLiteral("x-kde-urls")] =
|
||||||
QStringList({ fullPath.toString() });
|
QStringList({ fullPath.toString() });
|
||||||
}
|
}
|
||||||
|
|
||||||
args << (qAppName()) // appname
|
args << (qAppName()) // appname
|
||||||
<< static_cast<unsigned int>(0) // id
|
<< static_cast<unsigned int>(0) // id
|
||||||
<< "flameshot" // icon
|
<< FLAMESHOT_ICON // icon
|
||||||
<< title // summary
|
<< title // summary
|
||||||
<< text // body
|
<< text // body
|
||||||
<< QStringList() // actions
|
<< QStringList() // actions
|
||||||
|
|||||||
Reference in New Issue
Block a user