public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/cantata] f45: rhbz#2531667
@ 2026-09-11 23:30 Gerald B Cox
0 siblings, 0 replies; only message in thread
From: Gerald B Cox @ 2026-09-11 23:30 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/cantata
Branch : f45
Commit : 3947ef48ee0ab126f7a53a8891980c7555886e32
Author : Gerald B Cox <gbcox@fedoraproject.org>
Date : 2026-09-11T16:29:36-07:00
Stats : +9/-28 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/cantata/c/3947ef48ee0ab126f7a53a8891980c7555886e32?branch=f45
Log:
rhbz#2531667
---
diff --git a/pr127-tray-icon.patch b/pr127-tray-icon.patch
index afd8ede..0209705 100644
--- a/pr127-tray-icon.patch
+++ b/pr127-tray-icon.patch
@@ -48,11 +48,11 @@ Subject: [PATCH] Improve tray icon behavior and KDE integration (patch p5)
1 # support/QtAwesome.cpp.txt
46 # #
---
- gui/mainwindow.cpp | 10 +++++
- gui/trayitem.cpp | 102 +++++++++++++++++++++++++++++++++---------
- gui/trayitem.h | 62 ++++++++++++++++---------
- support/QtAwesome.cpp | 2 +-
- 4 files changed, 133 insertions(+), 43 deletions(-)
+ gui/mainwindow.cpp | 10 +++++
+ gui/trayitem.cpp | 85 +++++++++++++++++++++++++++++++++------------------
+ gui/trayitem.h | 62 ++++++++++++++++++++++++++++++++-----
+ support/QtAwesome.cpp | 2 +-
+ 4 files changed, 115 insertions(+), 44 deletions(-)
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 869f5353..08fe9dfa 100644
@@ -143,7 +143,7 @@ index 8514ba00..343ba8f8 100644
void TrayItem::trayItemClicked(QSystemTrayIcon::ActivationReason reason)
{
-@@ -194,22 +224,54 @@ void TrayItem::trayItemClicked(QSystemTrayIcon::ActivationReason reason)
+@@ -194,22 +224,35 @@ void TrayItem::trayItemClicked(QSystemTrayIcon::ActivationReason reason)
void TrayItem::songChanged(const Song& song, bool isPlaying)
{
@@ -151,7 +151,8 @@ index 8514ba00..343ba8f8 100644
bool useable = song.isStandardStream()
? !song.title.isEmpty() && !song.name().isEmpty()
: !song.title.isEmpty() && !song.artist.isEmpty() && !song.album.isEmpty();
- if (useable && isPlaying) {
+- if (useable && isPlaying) {
++ if (useable && isPlaying && Settings::self()->showPopups()) {
- if (songNotif == nullptr) {
- songNotif = new KNotification("newSong");
- songNotif->setAutoDelete(false);
@@ -162,7 +163,7 @@ index 8514ba00..343ba8f8 100644
- songNotif->setUrgency(KNotification::LowUrgency);
- songNotif->sendEvent();
- }
-+ // Always emit a KDE notification: Plasma can suppress popups but still keep history.
++ // Respect Cantata's popup preference on every desktop.
+ auto *n = new KNotification(QStringLiteral("newSong"));
+ // Ensure it maps to cantata.notifyrc (safer for per‑app settings/history)
+ n->setComponentName(QStringLiteral("cantata"));
@@ -171,25 +172,6 @@ index 8514ba00..343ba8f8 100644
+ n->setImage(CurrentCover::self()->image().scaledToHeight(512, Qt::SmoothTransformation));
+ n->setUrgency(KNotification::LowUrgency);
+ n->sendEvent();
-+
-+ #if defined(USE_KSNI)
-+// Multi-line tooltip + overlay (Linux SNI)
-+ const QString title = song.isStandardStream()
-+ ? song.name()
-+ : QStringLiteral("%1 — %2").arg(song.artist, song.title);
-+
-+ const QString sub = song.isStandardStream()
-+ ? song.title
-+ : song.album;
-+ setToolTip(QStringLiteral("audio-x-generic"), title, sub);
-+ setOverlayPaused(!isPlaying);
-+ #else
-+// Single-line tooltip fallback (Windows/macOS or Linux without SNI)
-+ const QString oneLine = song.isStandardStream()
-+ ? QStringLiteral("%1 — %2").arg(song.name(), song.title)
-+ : QStringLiteral("%1 — %2").arg(song.artist, song.title);
-+ setToolTip(QString(), oneLine, QString());
-+ #endif
}
+
+#if defined(USE_KSNI)
@@ -316,4 +298,3 @@ index 58fb353c..7f4073dd 100644
Q_INIT_RESOURCE(QtAwesomeFree);
--
2.52.0
-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 23:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 23:30 [rpms/cantata] f45: rhbz#2531667 Gerald B Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox