public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Gerald B Cox <gbcox@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/cantata] f44: rhbz#2531667
Date: Fri, 11 Sep 2026 23:31:01 GMT	[thread overview]
Message-ID: <178916946197.1.11770808095019749780.rpms-cantata-3947ef48ee0a@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/cantata
Branch : f44
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=f44

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
-

                 reply	other threads:[~2026-09-11 23:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178916946197.1.11770808095019749780.rpms-cantata-3947ef48ee0a@fedoraproject.org \
    --to=gbcox@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox