From 40629915f74eb23118c3079ab80df9fdf42fa894 Mon Sep 17 00:00:00 2001 From: Boyuan Yang Date: Fri, 25 Sep 2020 22:03:35 -0400 Subject: [PATCH 01/13] Explicitly hide tray icon before exit on Windows Currently flameshot tray icon will not disappear after program terminates on Windows. This is a known issue and need to be explicitly handled. This commit connects the aboutToQuit signal to QSystemTrayIcon::hide slot to ensure that the tray icon is removed before program terminates. --- src/core/controller.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/controller.cpp b/src/core/controller.cpp index 3d2343f9..b0cf0b3d 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -234,6 +234,13 @@ void Controller::enableTrayIcon() } }; connect(m_trayIcon, &QSystemTrayIcon::activated, this, trayIconActivated); + +#ifdef Q_OS_WIN + // Ensure proper removal of tray icon when program quits on Windows. + connect( + qApp, &QCoreApplication::aboutToQuit, m_trayIcon, &QSystemTrayIcon::hide); +#endif + m_trayIcon->show(); } From 9ecad946672f0afa7b74c9c254786a99df60412e Mon Sep 17 00:00:00 2001 From: RieL Date: Thu, 8 Oct 2020 00:17:06 +0900 Subject: [PATCH 02/13] Update Internationalization_ko.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improved Korean translation. 1.도움 메세지를 보여줍니다 -> 도움 메세지 보기 2.캡처 모드 시작에 도움 메세지를 보여줍니다 -> 캡처 모드 시작에 도움 메세지 보기 3.데스크톱 알림을 사용합니다 -> 데스크톱 알림 사용 4.트레이 아이콘을 보임 -> 트레이 아이콘 보기 5.시작할때 실행 -> 컴퓨터를 시작할 때 실행 6.Toggle visibility of sidebar with options of the selected tool -> 사이드바를 열어 선택한 도구의 옵션보기 7.도구의 두께를 바꿉니다 -> 도구 두께 변경 8.직사각형 선택->직사각형 Selection (need more proper word to translate) 9.변경할 버튼을 선택하세요 -> 변경 할 버튼 선택 10.콘트래스트 색상 -> 대비 색상 11.선택 영역 외의 불투명도: -> 선택 영역 외 불투명도 12. 버튼 셀렉션 -> 버튼 선택 --- data/translations/Internationalization_ko.ts | 35 ++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/data/translations/Internationalization_ko.ts b/data/translations/Internationalization_ko.ts index 9bb5a6a8..df06abe5 100644 --- a/data/translations/Internationalization_ko.ts +++ b/data/translations/Internationalization_ko.ts @@ -305,28 +305,28 @@ Space로 사이드 패널을 엽니다. Show help message - 도움 메세지를 보여줍니다 + 도움 메세지 보기 Show the help message at the beginning in the capture mode. - 캡처 모드 시작에 도움 메세지를 보여줍니다. + 캡처 모드 시작에 도움 메세지 보기. Show desktop notifications - 데스크톱 알림을 사용합니다 + 데스크톱 알림 사용 Show tray icon - 트레이 아이콘을 보임 + 트레이 아이콘 보기 Show the systemtray icon - 시스템 트레이 아이콘을 보여줍니다 + 시스템 트레이 아이콘 보기 @@ -386,7 +386,7 @@ Space로 사이드 패널을 엽니다. Launch at startup startup의 적절한 번역이 필요합니다. - 시작할때 실행 + 컴퓨터를 시작할 때 실행 @@ -396,22 +396,22 @@ Space로 사이드 패널을 엽니다. Close after capture - 캡처 후 닫기 + 캡처 후 닫기 Close after taking a screenshot - 스크린샷을 찍은 이후 닫기 + 스크린샷을 찍은 후 닫기 Copy URL after upload - 업로드 이후 URL을 복사 + 업로드 이후 URL 복사 Copy URL and close window after upload - 업로드 이후 URL을 복사하고 창을 닫음 + 업로드 이후 URL을 복사하고 창 닫기 @@ -531,7 +531,7 @@ Space로 사이드 패널을 엽니다. Toggle visibility of sidebar with options of the selected tool - + 사이드바를 열어 선택한 도구의 옵션보기 @@ -541,7 +541,7 @@ Space로 사이드 패널을 엽니다. Change the tool's thickness - 도구의 두께를 바꿉니다 + 도구 두께 변경 @@ -753,7 +753,8 @@ Space로 사이드 패널을 엽니다. Rectangular Selection - 직사각형 선택 + selection에 대한 적절한 번역이 필요합니다. + 직사각형 Selection @@ -964,7 +965,7 @@ Space로 사이드 패널을 엽니다. Select a Button to modify it - 변경할 버튼을 선택하세요 + 변경 할 버튼 선택 @@ -979,7 +980,7 @@ Space로 사이드 패널을 엽니다. Contrast Color - 콘트래스트 색상 + 대비 색상 @@ -1005,12 +1006,12 @@ Space로 사이드 패널을 엽니다. Opacity of area outside selection: - 선택 영역 외의 불투명도: + 선택 영역 외 불투명도: Button Selection - 버튼 셀렉션 + 버튼 선택 From 22ae116f29da41a1d393a8e3e11a8a3b1e34dcd1 Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Wed, 7 Oct 2020 11:17:00 -0500 Subject: [PATCH 03/13] testing app image fix --- .github/workflows/Linux-pack.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 0a356514..5b7869f9 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -349,6 +349,8 @@ jobs: $GITHUB_WORKSPACE/data/img/app/flameshot.png \ ${APPIMAGE_DST_PATH}/ + rm ${APPIMAGE_DST_PATH}/lib/x86_64-linux-gnu/libxcb-glx.so.0 + VERSION=${VERSION} $GITHUB_WORKSPACE/appimagetool ${APPIMAGE_DST_PATH} mv $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage - name: SHA256Sum of appimage package(daily build) From a2f845415c55254db2df0dc0f8dee4ab4aa6da7c Mon Sep 17 00:00:00 2001 From: Ash Holland Date: Sat, 10 Oct 2020 02:13:34 +0100 Subject: [PATCH 04/13] Improve pixelation of small areas Previously the level of pixelation would decrease if the selected area was too thin to hold 10 pixelated blocks. Now the level of pixelation only decreases when the selected area is too thin to hold even one pixelated block. This doesn't completely solve the issue of pixelation decreasing when the area is thin, but it significantly improves the situation. --- src/tools/pixelate/pixelatetool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/pixelate/pixelatetool.cpp b/src/tools/pixelate/pixelatetool.cpp index 6f742279..47831d20 100644 --- a/src/tools/pixelate/pixelatetool.cpp +++ b/src/tools/pixelate/pixelatetool.cpp @@ -89,7 +89,7 @@ void PixelateTool::process(QPainter& painter, int width = selection.width() * (0.5 / qMax(1, m_thickness)); QPixmap t = pixmap.copy(selection); - t = t.scaledToWidth(qMax(width, 10), Qt::SmoothTransformation); + t = t.scaledToWidth(qMax(width, 1), Qt::SmoothTransformation); t = t.scaledToWidth(selection.width()); painter.drawImage(selection, t.toImage()); } From eae9c97b232ce04da62d45cc8c600d85bf7d1a62 Mon Sep 17 00:00:00 2001 From: Ahmed Zetao Yang Date: Sat, 10 Oct 2020 11:01:09 +0800 Subject: [PATCH 05/13] chore(CI): checkout the head commit instead of using the default merge ref --- .github/workflows/Linux-pack.yml | 42 ++++++++++++++++++++++++++++++ .github/workflows/Windows-pack.yml | 8 ++++++ .github/workflows/build_cmake.yml | 10 ++++++- .github/workflows/clang-format.yml | 9 ++++++- 4 files changed, 67 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 5b7869f9..b38b9473 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -46,10 +46,17 @@ jobs: } steps: - name: Checkout Source code + if: github.event_name == 'push' uses: actions/checkout@v2 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set env & Print flameshot version shell: bash run: | @@ -102,12 +109,19 @@ jobs: image: vitzy/flameshot:ubuntu-bionic steps: - name: Checkout Source code + if: github.event_name == 'push' # Because git version < 2.18(ubuntu 18.04), so only actions/checkout@v1 can be used. # If you use actions/checkout@v2, you will have no .git folder. uses: actions/checkout@v1 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v1 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} - name: Set env & Print flameshot version shell: bash run: | @@ -199,10 +213,17 @@ jobs: } steps: - name: Checkout Source code + if: github.event_name == 'push' uses: actions/checkout@v2 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set env & Print flameshot version shell: bash run: | @@ -285,10 +306,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Source code + if: github.event_name == 'push' uses: actions/checkout@v2 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set env & Print flameshot version shell: bash run: | @@ -378,10 +406,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Source code + if: github.event_name == 'push' uses: actions/checkout@v2 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set env & Print flameshot version shell: bash run: | @@ -437,10 +472,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Source code + if: github.event_name == 'push' uses: actions/checkout@v2 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set env & Print flameshot version shell: bash run: | diff --git a/.github/workflows/Windows-pack.yml b/.github/workflows/Windows-pack.yml index e56d0126..6ca6952a 100644 --- a/.github/workflows/Windows-pack.yml +++ b/.github/workflows/Windows-pack.yml @@ -52,11 +52,19 @@ jobs: steps: - name: Checkout Source code + if: github.event_name == 'push' uses: actions/checkout@v2 with: fetch-depth: 0 ref: master + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - name: Set env & Print flameshot version shell: bash run: | diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index ca731941..155b2b82 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -25,7 +25,15 @@ jobs: os: [ubuntu-20.04] steps: - - uses: actions/checkout@v2 + - name: Checkout Source code + if: github.event_name == 'push' + uses: actions/checkout@v2 + + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Install Dependencies run: | diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 24382ae9..1921caeb 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -7,7 +7,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout Source code + if: github.event_name == 'push' + uses: actions/checkout@v2 + - name: Checkout Source code + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: DoozyX/clang-format-lint-action@v0.9 with: source: './src' From c5b6fe39573d66ba4f98f8944e36879d5bd4add4 Mon Sep 17 00:00:00 2001 From: Ahmed Zetao Yang Date: Sat, 10 Oct 2020 22:15:19 +0800 Subject: [PATCH 06/13] fix: checkout of head commit during PR creation * according to https://github.com/actions/checkout/issues/61#issuecomment-561363340 --- .github/workflows/Linux-pack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index b38b9473..5155df7d 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -121,7 +121,7 @@ jobs: uses: actions/checkout@v1 with: fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref }} + ref: refs/pull/${{ github.event.number }}/head - name: Set env & Print flameshot version shell: bash run: | From c8767e7a1b491da8ce2ee9a60adbc943b5651f7d Mon Sep 17 00:00:00 2001 From: Ash Holland Date: Sat, 10 Oct 2020 14:24:33 +0100 Subject: [PATCH 07/13] Fix pixelation of small areas --- src/tools/pixelate/pixelatetool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/pixelate/pixelatetool.cpp b/src/tools/pixelate/pixelatetool.cpp index 47831d20..e9ce8a82 100644 --- a/src/tools/pixelate/pixelatetool.cpp +++ b/src/tools/pixelate/pixelatetool.cpp @@ -87,10 +87,12 @@ void PixelateTool::process(QPainter& painter, scene.render(&painter, selection, QRectF()); } else { int width = selection.width() * (0.5 / qMax(1, m_thickness)); + int height = selection.height() * (0.5 / qMax(1, m_thickness)); + QSize size = QSize(qMax(width, 1), qMax(height, 1)); QPixmap t = pixmap.copy(selection); - t = t.scaledToWidth(qMax(width, 1), Qt::SmoothTransformation); - t = t.scaledToWidth(selection.width()); + t = t.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + t = t.scaled(selection.width(), selection.height()); painter.drawImage(selection, t.toImage()); } } From 8ff94a95a8b59f3e23327b7e9b3fe91f23b885b6 Mon Sep 17 00:00:00 2001 From: borgmanJeremy <46930769+borgmanJeremy@users.noreply.github.com> Date: Sat, 10 Oct 2020 13:04:19 -0500 Subject: [PATCH 08/13] Cleaned up flatpak build for flathub submission (#1040) * Cleaned up flatpak build for flathub submission. Fixed app-id and other assets to match dbus naming. * fixed missing updates * fixing build issues --- .github/workflows/Linux-pack.yml | 22 +++++++++--------- ...meshot.yml => org.flameshot.Flameshot.yml} | 7 +++--- data/graphics.qrc | 4 ++-- ...meshot.png => org.flameshot.Flameshot.png} | Bin ...meshot.svg => org.flameshot.Flameshot.svg} | 0 ...meshot.png => org.flameshot.Flameshot.png} | Bin ...meshot.png => org.flameshot.Flameshot.png} | Bin ...meshot.svg => org.flameshot.Flameshot.svg} | 0 data/rpm/flameshot.spec | 6 ++--- data/snap/snapcraft.yaml | 8 +++---- ...l => org.flameshot.Flameshot.metainfo.xml} | 4 ++-- ...esktop => org.flameshot.Flameshot.desktop} | 2 +- src/CMakeLists.txt | 20 ++++++++-------- src/core/controller.cpp | 6 ++--- 14 files changed, 40 insertions(+), 39 deletions(-) rename data/flatpak/{org.flameshot.flameshot.yml => org.flameshot.Flameshot.yml} (86%) rename data/img/app/{flameshot.png => org.flameshot.Flameshot.png} (100%) rename data/img/app/{flameshot.svg => org.flameshot.Flameshot.svg} (100%) rename data/img/hicolor/128x128/apps/{flameshot.png => org.flameshot.Flameshot.png} (100%) rename data/img/hicolor/48x48/apps/{flameshot.png => org.flameshot.Flameshot.png} (100%) rename data/img/hicolor/scalable/apps/{flameshot.svg => org.flameshot.Flameshot.svg} (100%) rename docs/appdata/{flameshot.metainfo.xml => org.flameshot.Flameshot.metainfo.xml} (91%) rename docs/desktopEntry/package/{flameshot.desktop => org.flameshot.Flameshot.desktop} (99%) diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 5155df7d..48e03595 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -366,7 +366,7 @@ jobs: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install - $GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/flameshot.desktop + $GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/org.flameshot.Flameshot.desktop mkdir -p ${APPIMAGE_DST_PATH}/usr/plugins/platforminputcontexts cp \ @@ -374,7 +374,7 @@ jobs: ${APPIMAGE_DST_PATH}/usr/plugins/platforminputcontexts/ cp \ - $GITHUB_WORKSPACE/data/img/app/flameshot.png \ + $GITHUB_WORKSPACE/data/img/app/org.flameshot.Flameshot.png \ ${APPIMAGE_DST_PATH}/ rm ${APPIMAGE_DST_PATH}/lib/x86_64-linux-gnu/libxcb-glx.so.0 @@ -438,21 +438,21 @@ jobs: flatpak install -y --noninteractive flathub org.kde.Sdk//5.15 org.kde.Platform//5.15 - name: Packaging flatpak run: | - BUNDLE="org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak" - MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.flameshot.yml + BUNDLE="org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak" + MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.Flameshot.yml RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo" - APP_ID="org.flameshot.flameshot" + APP_ID="org.flameshot.Flameshot" BRANCH="master" flatpak-builder --user --disable-rofiles-fuse --repo=repo --force-clean flatpak_app ${MANIFEST_PATH} --install-deps-from=flathub flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH} - mv $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak + mv $GITHUB_WORKSPACE/org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak - name: SHA256Sum of flatpak package(daily build) run: | - sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak - sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak.sha256sum + sha256sum $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak + sha256sum $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak.sha256sum echo "================flatpak sha256sum download link====================" - echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak.sha256sum) + echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak.sha256sum) echo "========no operation for you can see link in the log console=======" - name: Upload flatpak package(daily build) run: | @@ -464,8 +464,8 @@ jobs: with: name: Linux-distribution-artifact path: | - ${{ github.workspace }}/org.flameshot.flameshot-*.${{ env.ARCH }}.flatpak - ${{ github.workspace }}/org.flameshot.flameshot-*.${{ env.ARCH }}.flatpak.sha256sum + ${{ github.workspace }}/org.flameshot.Flameshot-*.${{ env.ARCH }}.flatpak + ${{ github.workspace }}/org.flameshot.Flameshot-*.${{ env.ARCH }}.flatpak.sha256sum snap-pack: name: snap diff --git a/data/flatpak/org.flameshot.flameshot.yml b/data/flatpak/org.flameshot.Flameshot.yml similarity index 86% rename from data/flatpak/org.flameshot.flameshot.yml rename to data/flatpak/org.flameshot.Flameshot.yml index e5d9c57b..cf246772 100644 --- a/data/flatpak/org.flameshot.flameshot.yml +++ b/data/flatpak/org.flameshot.Flameshot.yml @@ -1,4 +1,4 @@ -app-id: org.flameshot.flameshot +app-id: org.flameshot.Flameshot runtime: org.kde.Platform runtime-version: '5.15' sdk: org.kde.Sdk @@ -20,7 +20,8 @@ finish-args: - --talk-name=org.freedesktop.Notifications # System Tray Icon - --talk-name=org.kde.StatusNotifierWatcher - - --own-name=org.kde.StatusNotifierItem-2-1 + - --own-name=org.kde.* + - --own-name=org.flameshot.Flameshot modules: - name: flameshot buildsystem: cmake-ninja @@ -29,4 +30,4 @@ modules: sources: - type: git url: https://github.com/flameshot-org/flameshot.git - branch: master + branch: master diff --git a/data/graphics.qrc b/data/graphics.qrc index eb4b2cb8..971b9fd5 100644 --- a/data/graphics.qrc +++ b/data/graphics.qrc @@ -1,7 +1,7 @@ - img/app/flameshot.svg - img/app/flameshot.png + img/app/org.flameshot.Flameshot.svg + img/app/org.flameshot.Flameshot.png img/material/black/undo-variant.svg img/material/black/text.svg img/material/black/square.svg diff --git a/data/img/app/flameshot.png b/data/img/app/org.flameshot.Flameshot.png similarity index 100% rename from data/img/app/flameshot.png rename to data/img/app/org.flameshot.Flameshot.png diff --git a/data/img/app/flameshot.svg b/data/img/app/org.flameshot.Flameshot.svg similarity index 100% rename from data/img/app/flameshot.svg rename to data/img/app/org.flameshot.Flameshot.svg diff --git a/data/img/hicolor/128x128/apps/flameshot.png b/data/img/hicolor/128x128/apps/org.flameshot.Flameshot.png similarity index 100% rename from data/img/hicolor/128x128/apps/flameshot.png rename to data/img/hicolor/128x128/apps/org.flameshot.Flameshot.png diff --git a/data/img/hicolor/48x48/apps/flameshot.png b/data/img/hicolor/48x48/apps/org.flameshot.Flameshot.png similarity index 100% rename from data/img/hicolor/48x48/apps/flameshot.png rename to data/img/hicolor/48x48/apps/org.flameshot.Flameshot.png diff --git a/data/img/hicolor/scalable/apps/flameshot.svg b/data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg similarity index 100% rename from data/img/hicolor/scalable/apps/flameshot.svg rename to data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg diff --git a/data/rpm/flameshot.spec b/data/rpm/flameshot.spec index 7fa9439d..8acab0b3 100644 --- a/data/rpm/flameshot.spec +++ b/data/rpm/flameshot.spec @@ -71,7 +71,7 @@ make %{?_smp_mflags} %if 0%{?is_opensuse} %if 0%{?suse_version} >= 1500 -%suse_update_desktop_file %{name} Graphics +%suse_update_desktop_file org.flameshot.Flameshot Graphics %endif %endif @@ -87,9 +87,9 @@ make %{?_smp_mflags} %{_datadir}/%{name} %{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml %{_datadir}/dbus-1/services/org.flameshot.Flameshot.service -%{_datadir}/metainfo/flameshot.metainfo.xml +%{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml %{_datadir}/flameshot/translations -%{_datadir}/applications/%{name}.desktop +%{_datadir}/applications/org.flameshot.Flameshot.desktop %{_datadir}/bash-completion/completions/%{name} %{_datadir}/zsh/site-functions/_%{name} %{_datadir}/icons/hicolor diff --git a/data/snap/snapcraft.yaml b/data/snap/snapcraft.yaml index 9c372cb1..a737fc9b 100644 --- a/data/snap/snapcraft.yaml +++ b/data/snap/snapcraft.yaml @@ -21,7 +21,7 @@ architectures: apps: flameshot: command: flameshot - desktop: usr/share/applications/flameshot.desktop + desktop: usr/share/applications/org.flameshot.Flameshot.desktop extensions: - kde-neon environment: @@ -62,9 +62,9 @@ parts: override-build: | snapcraftctl build # Correct the Icon path - sed -i 's|^Exec=flameshot|Exec=/snap/bin/flameshot.flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop - sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop - sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop + sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop build-packages: - g++ - make diff --git a/docs/appdata/flameshot.metainfo.xml b/docs/appdata/org.flameshot.Flameshot.metainfo.xml similarity index 91% rename from docs/appdata/flameshot.metainfo.xml rename to docs/appdata/org.flameshot.Flameshot.metainfo.xml index 3f413f17..973680f5 100644 --- a/docs/appdata/flameshot.metainfo.xml +++ b/docs/appdata/org.flameshot.Flameshot.metainfo.xml @@ -1,6 +1,6 @@ - org.flameshot.flameshot + org.flameshot.Flameshot CC0-1.0 GPL-3.0-or-later Flameshot @@ -28,6 +28,6 @@ https://github.com/flameshot-org/flameshot https://github.com/flameshot-org/flameshot/issues/new - flameshot.desktop + org.flameshot.Flameshot.desktop diff --git a/docs/desktopEntry/package/flameshot.desktop b/docs/desktopEntry/package/org.flameshot.Flameshot.desktop similarity index 99% rename from docs/desktopEntry/package/flameshot.desktop rename to docs/desktopEntry/package/org.flameshot.Flameshot.desktop index d6cc9c84..94b78fb5 100644 --- a/docs/desktopEntry/package/flameshot.desktop +++ b/docs/desktopEntry/package/org.flameshot.Flameshot.desktop @@ -29,7 +29,7 @@ Keywords[ja]=flameshot;screenshot;capture;shutter;スクリーンショット; Keywords[es]=flameshot;screenshot;capture;shutter;captura; Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme; Exec=flameshot -Icon=flameshot +Icon=org.flameshot.Flameshot Terminal=false Type=Application Categories=Graphics; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71a925a4..8ca41c96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -143,11 +143,11 @@ install( RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # Install desktop files, completion and dbus files -configure_file(${CMAKE_SOURCE_DIR}/docs/desktopEntry/package/flameshot.desktop - ${CMAKE_CURRENT_BINARY_DIR}/share/applications/flameshot.desktop COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/docs/desktopEntry/package/org.flameshot.Flameshot.desktop + ${CMAKE_CURRENT_BINARY_DIR}/share/applications/org.flameshot.Flameshot.desktop COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/docs/appdata/flameshot.metainfo.xml - ${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/flameshot.metainfo.xml COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/docs/appdata/org.flameshot.Flameshot.metainfo.xml + ${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/org.flameshot.Flameshot.metainfo.xml COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/docs/shell-completion/flameshot ${CMAKE_CURRENT_BINARY_DIR}/share/bash-completion/completions/flameshot COPYONLY) @@ -162,14 +162,14 @@ configure_file(${CMAKE_SOURCE_DIR}/data/dbus/org.flameshot.Flameshot.service.in ${CMAKE_CURRENT_BINARY_DIR}/share/dbus-1/services/org.flameshot.Flameshot.service) # Install Icons -configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/flameshot.png - ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/flameshot.png COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/org.flameshot.Flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/org.flameshot.Flameshot.png COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/flameshot.png - ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/flameshot.png COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/org.flameshot.Flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/org.flameshot.Flameshot.png COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/flameshot.svg - ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/flameshot.svg COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg COPYONLY) # Install assets install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) diff --git a/src/core/controller.cpp b/src/core/controller.cpp index b0cf0b3d..2f341694 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -224,8 +224,8 @@ void Controller::enableTrayIcon() m_trayIcon = new QSystemTrayIcon(); m_trayIcon->setToolTip(QStringLiteral("Flameshot")); m_trayIcon->setContextMenu(trayIconMenu); - QIcon trayicon = - QIcon::fromTheme("flameshot-tray", QIcon(":img/app/flameshot.png")); + QIcon trayicon = QIcon::fromTheme( + "flameshot-tray", QIcon(":img/app/org.flameshot.Flameshot.png")); m_trayIcon->setIcon(trayicon); auto trayIconActivated = [this](QSystemTrayIcon::ActivationReason r) { @@ -260,7 +260,7 @@ void Controller::sendTrayNotification(const QString& text, { if (m_trayIcon) { m_trayIcon->showMessage( - title, text, QIcon(":img/app/flameshot.svg"), timeout); + title, text, QIcon(":img/app/org.flameshot.Flameshot.svg"), timeout); } } From 81c68c06d6c7ef3520fd2d59f81b6e56f1a79329 Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Sat, 10 Oct 2020 19:43:35 -0500 Subject: [PATCH 09/13] staging for 0.8.4 release --- CMakeLists.txt | 2 +- data/debian/changelog | 2 +- data/rpm/flameshot.spec | 4 +++- docs/appdata/org.flameshot.Flameshot.metainfo.xml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74860fa2..2d20245c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) # This can be read from ${PROJECT_NAME} after project() is called project( flameshot - VERSION 0.8.3 + VERSION 0.8.4 LANGUAGES CXX) set(PROJECT_NAME_CAPITALIZED "Flameshot") diff --git a/data/debian/changelog b/data/debian/changelog index be7f9bd4..bee8f48f 100644 --- a/data/debian/changelog +++ b/data/debian/changelog @@ -1,4 +1,4 @@ -flameshot (0.8.3-1) unstable; urgency=medium +flameshot (0.8.4-1) unstable; urgency=medium * New stable release. diff --git a/data/rpm/flameshot.spec b/data/rpm/flameshot.spec index 8acab0b3..585ad194 100644 --- a/data/rpm/flameshot.spec +++ b/data/rpm/flameshot.spec @@ -1,5 +1,5 @@ Name: flameshot -Version: 0.8.3 +Version: 0.8.4 Release: 1%{?dist} Summary: Powerful yet simple to use screenshot software Summary(eu-ES): Potente pero simple de usar software de capturas @@ -95,6 +95,8 @@ make %{?_smp_mflags} %{_datadir}/icons/hicolor %changelog +* Sat Oct 10 2020 Jeremy Borgman - 0.8.4-1 +- Updated for flameshot 0.8.4 * Mon Sep 19 2020 Jeremy Borgman - 0.8.3-1 - Updated for flameshot 0.8.3 * Mon Sep 07 2020 Zetao Yang - 0.8.0-1 diff --git a/docs/appdata/org.flameshot.Flameshot.metainfo.xml b/docs/appdata/org.flameshot.Flameshot.metainfo.xml index 973680f5..7f7517bd 100644 --- a/docs/appdata/org.flameshot.Flameshot.metainfo.xml +++ b/docs/appdata/org.flameshot.Flameshot.metainfo.xml @@ -5,6 +5,7 @@ GPL-3.0-or-later Flameshot + From 36fdb3b2f44851fb825f9392321409994c4ce764 Mon Sep 17 00:00:00 2001 From: Ahmed Zetao Yang Date: Sun, 11 Oct 2020 09:39:18 +0800 Subject: [PATCH 10/13] docs: correcting svg file name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4342f69..053f6cae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- Flameshot + Flameshot
Flameshot From ac7142c4df5cf218ddf5b032d80ac340639f99d0 Mon Sep 17 00:00:00 2001 From: Ahmed Zetao Yang Date: Sun, 11 Oct 2020 17:22:19 +0800 Subject: [PATCH 11/13] fix: correcting images name --- CMakeLists.txt | 2 +- src/config/configwindow.cpp | 2 +- src/tools/imgur/imguruploader.cpp | 2 +- src/tools/launcher/applauncherwidget.cpp | 2 +- src/utils/screenshotsaver.cpp | 3 ++- src/widgets/infowindow.cpp | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d20245c..0a3bfc17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Powerful yet simple to use screenshot sof set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_PACKAGE_HOMEPAGE_URL "https://flameshot.org") set(CPACK_PACKAGE_CONTACT "flameshot-org developers ") -set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data/img/app/flameshot.svg") # TODO: Can any generator make use of this? +set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data/img/app/org.flameshot.Flameshot.svg") # TODO: Can any generator make use of this? set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") # TODO: Where is this used? Do we need a better source? if(WIN32) diff --git a/src/config/configwindow.cpp b/src/config/configwindow.cpp index 737c6573..ccd10714 100644 --- a/src/config/configwindow.cpp +++ b/src/config/configwindow.cpp @@ -39,7 +39,7 @@ ConfigWindow::ConfigWindow(QWidget* parent) setAttribute(Qt::WA_DeleteOnClose); const int size = GlobalValues::buttonBaseSize() * 12; setMinimumSize(size, size); - setWindowIcon(QIcon(":img/app/flameshot.svg")); + setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); setWindowTitle(tr("Configuration")); auto changedSlot = [this](QString s) { diff --git a/src/tools/imgur/imguruploader.cpp b/src/tools/imgur/imguruploader.cpp index 26e3f149..a457c1c3 100644 --- a/src/tools/imgur/imguruploader.cpp +++ b/src/tools/imgur/imguruploader.cpp @@ -50,7 +50,7 @@ ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent) , m_pixmap(capture) { setWindowTitle(tr("Upload to Imgur")); - setWindowIcon(QIcon(":img/app/flameshot.svg")); + setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) QRect position = frameGeometry(); diff --git a/src/tools/launcher/applauncherwidget.cpp b/src/tools/launcher/applauncherwidget.cpp index 4ae24175..1ca1dc50 100644 --- a/src/tools/launcher/applauncherwidget.cpp +++ b/src/tools/launcher/applauncherwidget.cpp @@ -52,7 +52,7 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent) , m_pixmap(p) { setAttribute(Qt::WA_DeleteOnClose); - setWindowIcon(QIcon(":img/app/flameshot.svg")); + setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); setWindowTitle(tr("Open With")); m_keepOpen = ConfigHandler().keepOpenAppLauncherValue(); diff --git a/src/utils/screenshotsaver.cpp b/src/utils/screenshotsaver.cpp index fd5c433d..40363042 100644 --- a/src/utils/screenshotsaver.cpp +++ b/src/utils/screenshotsaver.cpp @@ -108,7 +108,8 @@ bool ScreenshotSaver::saveToFilesystemGUI(const QPixmap& capture) QString msg = QObject::tr("Error trying to save as ") + savePath; QMessageBox saveErrBox( QMessageBox::Warning, QObject::tr("Save Error"), msg); - saveErrBox.setWindowIcon(QIcon(":img/app/flameshot.svg")); + saveErrBox.setWindowIcon( + QIcon(":img/app/org.flameshot.Flameshot.svg")); saveErrBox.exec(); } } diff --git a/src/widgets/infowindow.cpp b/src/widgets/infowindow.cpp index b624adfa..23bc8c8d 100644 --- a/src/widgets/infowindow.cpp +++ b/src/widgets/infowindow.cpp @@ -36,7 +36,7 @@ InfoWindow::InfoWindow(QWidget* parent) : QWidget(parent) { setAttribute(Qt::WA_DeleteOnClose); - setWindowIcon(QIcon(":img/app/flameshot.svg")); + setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); setWindowTitle(tr("About")); #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) From a472648263a0c4a2f30b0ae553b873236818d4b8 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Sun, 11 Oct 2020 20:41:25 +0300 Subject: [PATCH 12/13] Fix - memory leaks --- src/config/shortcutswidget.cpp | 1 + src/utils/configshortcuts.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/shortcutswidget.cpp b/src/config/shortcutswidget.cpp index 84c9d292..afd1aabc 100644 --- a/src/config/shortcutswidget.cpp +++ b/src/config/shortcutswidget.cpp @@ -147,5 +147,6 @@ void ShortcutsWidget::slotShortcutCellClicked(int row, int col) m_table->setItem(row, col, item); } } + delete setShortcutDialog; } } diff --git a/src/utils/configshortcuts.cpp b/src/utils/configshortcuts.cpp index 69e438b6..7f957e36 100644 --- a/src/utils/configshortcuts.cpp +++ b/src/utils/configshortcuts.cpp @@ -17,7 +17,7 @@ const QVector& ConfigShortcuts::captureShortcutsDefault( m_shortcuts << (QStringList() << shortcutName << b->tool()->description() << ks.toString()); - b->close(); + delete b; } m_shortcuts << (QStringList() From 0c4bb3716cd06719b706b051dffca3a18a477c2c Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Sun, 11 Oct 2020 20:59:10 +0300 Subject: [PATCH 13/13] Fix - add keyboar icon in the SetShortcutDialog --- data/graphics.qrc | 1 + 1 file changed, 1 insertion(+) diff --git a/data/graphics.qrc b/data/graphics.qrc index a267ebf9..b0270ea5 100644 --- a/data/graphics.qrc +++ b/data/graphics.qrc @@ -2,6 +2,7 @@ img/app/org.flameshot.Flameshot.svg img/app/org.flameshot.Flameshot.png + img/app/keyboard.svg img/material/black/delete.svg img/material/black/undo-variant.svg img/material/black/text.svg