Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show app name in notification #572

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rudi3
Copy link
Contributor

@Rudi3 Rudi3 commented Jan 19, 2020

Attempt to fix #564. I'm not familiar with gi so I'm not sure if it will/can include Notify 0.7.3.

@@ -798,6 +798,7 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
#self.showMessage(fromUTF8(escape(self.name)), msg, self.urgencies[urgency], timeout*1000)
n = Notify.Notification.new(escape(self.name), msg, self.icon_name)
n.set_urgency(Notify.Urgency.NORMAL)
n.set_app_name(escape(self.name))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gi.require_version('Notify', '0.7.3') won't work. The announced API version is still 0.7.

Instead, you could check

    if hasattr(n, "set_app_name"):
       n.set_app_name(self.name)

but if you don't set the "app-name" per-notification, the default is the one from Notify.init(self.prog).

Wouldn't the real fix be

-    Notify.init(self.prog)
+    Notify.init(self.name)

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firewall applet is just named "firewall-applet" in Plasma's notification menu
2 participants