[arch-commits] Commit in deepin-screenshot/repos/community-x86_64 (3 files)
Felix Yan
felixonmars at archlinux.org
Sun Feb 23 09:59:15 UTC 2020
Date: Sunday, February 23, 2020 @ 09:59:14
Author: felixonmars
Revision: 579521
archrelease: copy trunk to community-x86_64
Added:
deepin-screenshot/repos/community-x86_64/PKGBUILD
(from rev 579520, deepin-screenshot/trunk/PKGBUILD)
deepin-screenshot/repos/community-x86_64/deepin-screenshot-no-notification.patch
(from rev 579520, deepin-screenshot/trunk/deepin-screenshot-no-notification.patch)
Deleted:
deepin-screenshot/repos/community-x86_64/PKGBUILD
-----------------------------------------+
PKGBUILD | 61 +++++++++-------
deepin-screenshot-no-notification.patch | 108 ++++++++++++++++++++++++++++++
2 files changed, 142 insertions(+), 27 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-02-23 09:59:04 UTC (rev 579520)
+++ PKGBUILD 2020-02-23 09:59:14 UTC (rev 579521)
@@ -1,27 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
-# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
-
-pkgname=deepin-screenshot
-pkgver=5.0.0
-pkgrel=1
-pkgdesc="Easy-to-use screenshot tool for linuxdeepin desktop environment"
-arch=('x86_64')
-url="https://github.com/linuxdeepin/deepin-screenshot"
-license=('GPL3')
-depends=('deepin-qt5integration' 'dtkwm' 'deepin-turbo')
-makedepends=('cmake' 'qt5-tools')
-groups=('deepin-extra')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-screenshot/archive/$pkgver.tar.gz")
-sha512sums=('ad073961deaa78a47739af6cf8b0d0fa77a92ee6668c57f9a5bbf51ad2be1d2028681cffabdc26548be1bdbe24c7ccc7e7ff3d49b86907f794495bfbea62aa30')
-
-build() {
- cd deepin-screenshot-$pkgver
- cmake . -DCMAKE_INSTALL_PREFIX=/usr
- make
-}
-
-package() {
- cd deepin-screenshot-$pkgver
- make DESTDIR="$pkgdir" install
-}
Copied: deepin-screenshot/repos/community-x86_64/PKGBUILD (from rev 579520, deepin-screenshot/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-02-23 09:59:14 UTC (rev 579521)
@@ -0,0 +1,34 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
+# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
+
+pkgname=deepin-screenshot
+pkgver=5.0.0
+pkgrel=2
+pkgdesc="Easy-to-use screenshot tool for linuxdeepin desktop environment"
+arch=('x86_64')
+url="https://github.com/linuxdeepin/deepin-screenshot"
+license=('GPL3')
+depends=('deepin-qt5integration' 'dtkwm' 'deepin-turbo')
+makedepends=('cmake' 'qt5-tools')
+groups=('deepin-extra')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-screenshot/archive/$pkgver.tar.gz"
+ deepin-screenshot-no-notification.patch)
+sha512sums=('ad073961deaa78a47739af6cf8b0d0fa77a92ee6668c57f9a5bbf51ad2be1d2028681cffabdc26548be1bdbe24c7ccc7e7ff3d49b86907f794495bfbea62aa30'
+ 'ffd0b306017e54edd6c910e2eca8881d000d4ef6f879683b2d14a8c685dbd4d5a9e13db2358b1622f6bcff4e0ebf90e15d14c6f084e3ae9c0b3857a0ddafde58')
+
+prepare() {
+ cd deepin-screenshot-$pkgver
+ patch -p1 -i ../deepin-screenshot-no-notification.patch
+}
+
+build() {
+ cd deepin-screenshot-$pkgver
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd deepin-screenshot-$pkgver
+ make DESTDIR="$pkgdir" install
+}
Copied: deepin-screenshot/repos/community-x86_64/deepin-screenshot-no-notification.patch (from rev 579520, deepin-screenshot/trunk/deepin-screenshot-no-notification.patch)
===================================================================
--- deepin-screenshot-no-notification.patch (rev 0)
+++ deepin-screenshot-no-notification.patch 2020-02-23 09:59:14 UTC (rev 579521)
@@ -0,0 +1,108 @@
+From f8ad99cb28f547ac1295c71cf8228df5ca529e42 Mon Sep 17 00:00:00 2001
+From: Michael Blesel <3blesel at informatik.uni-hamburg.de>
+Date: Mon, 29 Apr 2019 18:59:15 +0200
+Subject: [PATCH] The -s and -n options can now be used together.
+
+When using the -s and -n options together the -n option was ignored
+before.
+I added a noNotify argument to the Screenshot::savePathScreenshot
+and the MainWindow::savePath functions.
+MainWindow::savePath now sets MainWindow::m_noNotify if the program
+was called with -n option.
+Lastly MainWindow::saveSpecificedPath checks m_noNotify before
+sending a notification.
+---
+ src/main.cpp | 3 ++-
+ src/mainwindow.cpp | 10 +++++++---
+ src/mainwindow.h | 2 +-
+ src/screenshot.cpp | 4 ++--
+ src/screenshot.h | 2 +-
+ 5 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index f0204f6..3de5180 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -107,7 +107,8 @@ int main(int argc, char *argv[])
+ w.topWindowScreenshot();
+ } else if (cmdParser.isSet(savePathOption)) {
+ qDebug() << "cmd savepath screenshot";
+- w.savePathScreenshot(cmdParser.value(savePathOption));
++ w.savePathScreenshot(cmdParser.value(savePathOption),
++ cmdParser.isSet(prohibitNotifyOption));
+ } else if (cmdParser.isSet(prohibitNotifyOption)) {
+ qDebug() << "screenshot no notify!";
+ w.noNotifyScreenshot();
+diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
+index dcf4c14..b1c6cf1 100644
+--- a/src/mainwindow.cpp
++++ b/src/mainwindow.cpp
+@@ -935,8 +935,10 @@ void MainWindow::fullScreenshot()
+ sendNotify(m_saveIndex, m_saveFileName, r);
+ }
+
+-void MainWindow::savePath(const QString &path)
++void MainWindow::savePath(const QString &path, bool noNotify)
+ {
++ m_noNotify = noNotify;
++
+ if (!QFileInfo(path).dir().exists()) {
+ exitApp();
+ }
+@@ -1017,8 +1019,10 @@ void MainWindow::saveSpecificedPath(QString path)
+
+ QString summary = QString(tr("Picture has been saved to %1")).arg(savePath);
+
+- m_notifyDBInterface->Notify("Deepin Screenshot", 0, "deepin-screenshot", "",
+- summary, actions, hints, 0);
++ if (!m_noNotify) {
++ m_notifyDBInterface->Notify("Deepin Screenshot", 0, "deepin-screenshot", "",
++ summary, actions, hints, 0);
++ }
+ exitApp();
+ }
+
+diff --git a/src/mainwindow.h b/src/mainwindow.h
+index d04d424..4674732 100644
+--- a/src/mainwindow.h
++++ b/src/mainwindow.h
+@@ -82,7 +82,7 @@ class MainWindow : public QLabel
+
+ public slots:
+ void fullScreenshot();
+- void savePath(const QString &path);
++ void savePath(const QString &path, bool noNotify);
+ void saveSpecificedPath(QString path);
+ // void delayScreenshot(int num);
+ void noNotify();
+diff --git a/src/screenshot.cpp b/src/screenshot.cpp
+index 5f4eade..7ca4dfb 100644
+--- a/src/screenshot.cpp
++++ b/src/screenshot.cpp
+@@ -114,11 +114,11 @@ void Screenshot::noNotifyScreenshot()
+ m_window->noNotify();
+ }
+
+-void Screenshot::savePathScreenshot(const QString &path)
++void Screenshot::savePathScreenshot(const QString &path, bool noNotify)
+ {
+ initUI();
+ m_window->show();
+- m_window->savePath(path);
++ m_window->savePath(path, noNotify);
+ }
+
+ bool Screenshot::eventFilter(QObject* watched, QEvent *event)
+diff --git a/src/screenshot.h b/src/screenshot.h
+index 4e745cd..4a4a8a8 100644
+--- a/src/screenshot.h
++++ b/src/screenshot.h
+@@ -35,7 +35,7 @@ public slots:
+ void fullscreenScreenshot();
+ void topWindowScreenshot();
+ void noNotifyScreenshot();
+- void savePathScreenshot(const QString &path);
++ void savePathScreenshot(const QString &path, bool noNotify=false);
+
+ protected:
+ bool eventFilter(QObject* watched, QEvent* event) override;
More information about the arch-commits
mailing list