Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from flameshot-org:master #77

Merged
merged 2 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 13 additions & 40 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@

name: flameshot
adopt-info: flameshot
base: core20
base: core22
summary: Powerful yet simple to use screenshot software
description: |
A powerful open source screenshot and annotation tool for Linux, Flameshot
has a varied set of markup tools available, which include Freehand drawing,
Lines, Arrows, Boxes, Circles, Highlighting, Blur. Additionally, you can
customise the color, size and/or thickness of many of these image annotation
tools.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
#confinement: devmode # use 'strict' once you have the right plugs and slot
grade: stable
confinement: strict
compression: lzo
architectures:
- build-on: amd64

apps:
flameshot:
command: usr/local/bin/flameshot
desktop: usr/local/share/applications/org.flameshot.Flameshot.desktop
command: usr/bin/flameshot
desktop: usr/share/applications/org.flameshot.Flameshot.desktop
extensions:
- kde-neon
environment:
Expand All @@ -33,55 +32,29 @@ apps:
- removable-media
- network
- network-bind
- opengl
- x11
- wayland
- desktop
- desktop-legacy
- unity7

parts:
flameshot:
build-snaps:
- kde-frameworks-5-99-qt-5-15-7-core20
source: https://github.com/flameshot-org/flameshot.git
plugin: cmake
cmake-parameters:
- -DFLAMESHOT_ICON=/snap/flameshot/current/usr/local/share/icons/hicolor/scalable/apps/flameshot.svg
# This cannot be enabled until the KF5 toolkit in the snap is updated
#- -DUSE_WAYLAND_CLIPBOARD=1
- -DFLAMESHOT_ICON=/snap/flameshot/current/usr/share/icons/hicolor/scalable/apps/flameshot.svg
- -DCMAKE_INSTALL_PREFIX=/usr
- -DUSE_WAYLAND_CLIPBOARD=1
source-type: git
override-pull: |
snapcraftctl pull
craftctl default
# remove release candidates
last_committed_tag="$(git tag -l --sort=-v:refname | grep -v rc | head -1)"
git_revno="$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)"
git_hash="$(git rev-parse --short HEAD)"
snapcraftctl set-version "${last_committed_tag}+git${git_revno}.${git_hash}"
override-build: |
snapcraftctl build
craftctl default
# Correct the Icon path
sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/local/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
build-packages:
- g++
- make
- qt5-default
- git
stage-packages:
- dbus-x11
- libgtk2.0-0
- openssl
- ca-certificates
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgdk-pixbuf2.0-0
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${CRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop
sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snap Edition)/g' ${CRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop

slots:
# Depending on in which environment we're running we either need
# to use the system or session DBus so we also need to have one
Expand Down
7 changes: 6 additions & 1 deletion src/tools/pixelate/pixelatetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ CaptureTool::Type PixelateTool::type() const

QString PixelateTool::description() const
{
return tr("Set Pixelate as the paint tool");
return tr("Set Pixelate as the paint tool."
" Warning: pixelation is not a security tool!"
" Secrets - especially text - can be recovered from pixelated "
"areas in some situations."
" To securely hide contents from the screenshot use a black box "
"instead.");
}

QRect PixelateTool::boundingRect() const
Expand Down
Loading