Merge pull request #60 from namecheap/bugfix/RND-664-flameshot-update-history-widget-on-new-capture

Bugfix/rnd 664 update history widget on new capture
This commit is contained in:
Yurii Puchkov
2020-10-16 05:51:09 -07:00
committed by GitHub
13 changed files with 1276 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ env:
# docker images, see https://hub.docker.com/r/vitzy/flameshot
# vitzy/flameshot or packpack/packpack
DOCKER_REPO: vitzy/flameshot
# upload services: 0x0.st, file.io, transfer.sh, wetransfer.com
# upload services: wetransfer.com, file.io, 0x0.st
UPLOAD_SERVICE: wetransfer.com
jobs:
@@ -67,7 +67,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Get packpack tool
uses: actions/checkout@v2
with:
@@ -132,7 +132,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Install dependencies
run: |
apt-get -y -qq update
@@ -234,7 +234,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Get packpack tool
uses: actions/checkout@v2
with:
@@ -327,7 +327,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Install Dependencies
run: |
sudo apt-get -y -qq update
@@ -427,7 +427,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Setup flatpak
run: |
sudo apt-get -y -qq update
@@ -493,8 +493,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Packaging snap
uses: snapcore/action-build@v1
id: snapcraft

View File

@@ -78,7 +78,7 @@ jobs:
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
- name: Restore from cache and run vcpkg
uses: lukka/run-vcpkg@v4

View File

@@ -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.5.1
VERSION 0.8.5.2
LANGUAGES CXX)
set(PROJECT_NAME_CAPITALIZED "Flameshot")

View File

@@ -30,8 +30,11 @@
</a>
<br>
<a href="https://snapcraft.io/flameshot">
<img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" />
</a>
<img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" />
</a>
<a href="https://flathub.org/apps/details/org.flameshot.Flameshot">
<img height="60" alt="Download on Flathub" src="https://flathub.org/assets/badges/flathub-badge-en.svg"/>
</a>
</p>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -12,6 +12,9 @@ These are the steps for actually making the release
- [ ] Create sha256 for each binary and compare against sha256 shown in the CI to verify there was no corruption or inserted malware.
- [ ] Create a new "New Release" in githhub and explain changes in release notes
- [ ] Upload all binaries and sha's
- [ ] Update flatpak manifest for flathub: https://github.com/flathub/org.flameshot.Flameshot
- [ ] Push snapcraft edge release to stable
- [ ] If this is a major release coordinate with sign path on signed windows binaries
- [ ] Update change log on [website](https://github.com/flameshot-org/flameshot-org.github.io/) data/changelog.md
- [ ] Update version on [website](https://github.com/flameshot-org/flameshot-org.github.io/blob/master/_coverpage.md)

View File

@@ -52,6 +52,7 @@ set(FLAMESHOT_TS_FILES
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_tr.ts
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_uk.ts
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_zh_CN.ts
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_zh_HK.ts
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_zh_TW.ts)
if(GENERATE_TS)

View File

@@ -302,6 +302,15 @@ void Controller::updateConfigComponents()
}
}
void Controller::updateRecentScreenshots()
{
if (nullptr != m_history) {
if (m_history->isVisible()) {
m_history->loadHistory();
}
}
}
void Controller::showRecentScreenshots()
{
if (nullptr == m_history) {

View File

@@ -45,6 +45,7 @@ public:
void operator=(const Controller&) = delete;
void enableExports();
void updateRecentScreenshots();
signals:
void captureTaken(uint id, QPixmap p);

View File

@@ -16,6 +16,7 @@
// along with Flameshot. If not, see <http://www.gnu.org/licenses/>.
#include "imguruploader.h"
#include "src/core/controller.h"
#include "src/utils/confighandler.h"
#include "src/utils/filenamehandler.h"
#include "src/utils/history.h"
@@ -27,8 +28,6 @@
#include <QBuffer>
#include <QClipboard>
#include <QDesktopServices>
#include <QDrag>
#include <QHBoxLayout>
#include <QJsonDocument>
#include <QJsonObject>
#include <QLabel>
@@ -36,9 +35,7 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QPushButton>
#include <QShortcut>
#include <QTimer>
#include <QUrlQuery>
#include <QVBoxLayout>
@@ -52,7 +49,6 @@ ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent)
&QNetworkAccessManager::finished,
this,
&ImgurUploader::handleReply);
// QTimer::singleShot(2000, this, &ImgurUploader::onUploadOk); // testing
}
void ImgurUploader::handleReply(QNetworkReply* reply)
@@ -86,6 +82,7 @@ void ImgurUploader::handleReply(QNetworkReply* reply)
QApplication::clipboard()->setText(imageUrl().toString());
SystemNotification().sendMessage(
QObject::tr("URL copied to clipboard."));
Controller::getInstance()->updateRecentScreenshots();
close();
} else {
onUploadOk();

View File

@@ -18,6 +18,7 @@
#include "imgs3uploader.h"
#include "imgs3settings.h"
#include "src/core/controller.h"
#include "src/utils/confighandler.h"
#include "src/utils/history.h"
#include "src/utils/systemnotification.h"
@@ -40,7 +41,6 @@
#include <QNetworkRequest>
#include <QPushButton>
#include <QShortcut>
#include <QTimer>
#include <QUrlQuery>
#include <QVBoxLayout>
@@ -200,6 +200,7 @@ void ImgS3Uploader::handleReplyUpload(QNetworkReply* reply)
if (ConfigHandler().copyAndCloseAfterUploadEnabled()) {
QApplication::clipboard()->setText(imageUrl().toString());
SystemNotification().sendMessage(tr("URL copied to clipboard."));
Controller::getInstance()->updateRecentScreenshots();
close();
} else {
onUploadOk();

View File

@@ -39,11 +39,9 @@
class QPaintEvent;
class QResizeEvent;
class QMouseEvent;
class CaptureModification;
class QNetworkAccessManager;
class QNetworkReply;
class ColorPicker;
class Screenshot;
class NotifierBox;
class HoverEventFilter;

View File

@@ -20,9 +20,6 @@
#include "src/utils/screengrabber.h"
#include "src/utils/screenshotsaver.h"
#include "src/widgets/imagelabel.h"
#include "src/widgets/notificationwidget.h"
#include <QCheckBox>
#include <QComboBox>
#include <QDrag>
#include <QFormLayout>