summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzan2020-07-20 18:26:39 -0400
committerzan2020-07-20 18:26:39 -0400
commit8c3b57453b61c08aade185d911597f4b23bb7815 (patch)
treed9e7cdd6ea7ab66095296af0225c887bce6742eb
parent42fdc216d5ca5a42ccc11f08337dc83734b8cc7f (diff)
downloadaur-8c3b57453b61c08aade185d911597f4b23bb7815.tar.gz
Apply patch to fix upstream issue 6401
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
-rw-r--r--close-fix.diff37
3 files changed, 48 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0e199fb246e6..c74c0e1a36f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -22,7 +22,9 @@ pkgbase = clementine-git
provides = clementine
conflicts = clementine
source = git+https://github.com/clementine-player/Clementine.git
+ source = close-fix.diff
sha256sums = SKIP
+ sha256sums = 587c3724483825c2101fc15b8ef3b04b15a4dee34457285f94da6dd9b6db656c
pkgname = clementine-git
diff --git a/PKGBUILD b/PKGBUILD
index 3898dc1c0ffa..95a5be7109f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,14 +25,21 @@ optdepends=('libcdio: for CD support'
conflicts=(clementine)
provides=(clementine)
_name=Clementine
-source=("git+https://github.com/clementine-player/$_name.git")
-sha256sums=('SKIP')
+source=("git+https://github.com/clementine-player/$_name.git"
+ "close-fix.diff")
+sha256sums=('SKIP'
+ '587c3724483825c2101fc15b8ef3b04b15a4dee34457285f94da6dd9b6db656c')
pkgver() {
cd $_name
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ cd $_name
+ patch -p1 -i $srcdir/close-fix.diff
+}
+
build() {
cmake -B build -S $_name -DENABLE_SPOTIFY_BLOB=off
cmake --build build
diff --git a/close-fix.diff b/close-fix.diff
new file mode 100644
index 000000000000..2b931508c52f
--- /dev/null
+++ b/close-fix.diff
@@ -0,0 +1,37 @@
+diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
+index 14921028c..a02f0548c 100644
+--- a/src/ui/mainwindow.cpp
++++ b/src/ui/mainwindow.cpp
+@@ -1443,20 +1443,6 @@ void MainWindow::StopAfterCurrent() {
+ app_->playlist_manager()->active()->stop_after_current());
+ }
+
+-void MainWindow::closeEvent(QCloseEvent* event) {
+- bool keep_running(false);
+- if (tray_icon_)
+- keep_running =
+- settings_.value("keeprunning", tray_icon_->IsVisible()).toBool();
+-
+- if (keep_running && event->spontaneous()) {
+- event->ignore();
+- SetHiddenInTray(true);
+- } else {
+- Exit();
+- }
+-}
+-
+ void MainWindow::SetHiddenInTray(bool hidden) {
+ settings_.setValue("hidden", hidden);
+
+diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h
+index 5b2983bb4..756f33a47 100644
+--- a/src/ui/mainwindow.h
++++ b/src/ui/mainwindow.h
+@@ -134,7 +134,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
+ void keyPressEvent(QKeyEvent* event);
+ void changeEvent(QEvent*);
+ void resizeEvent(QResizeEvent*);
+- void closeEvent(QCloseEvent* event);
+
+ #ifdef Q_OS_WIN32
+ bool winEvent(MSG* message, long* result);