Open lordofscripts opened 1 month ago
Could you post a short sample that shows the problem?
I am not seeing this in my tests on GNOME.
If the Notifier connection is Closed, then signals don't arrive to the handlers.
Yes, this is how it is supposed to work.
Withe the Notifier connection open, one can use Notifier.Send() to send Notification coupled to the listeners as long as the Connection isn't closed.
Well, yes. you cant close the connection and then try to send on it.
If one uses the same open Notifier instance to send several signals, then ALL are bundled together, meaning that if the user closes one (or clicks for Action), then all get closed together which isn't the intended scenario.
I am not seeing this happen on GNOME, but what do you mean by closed? The notifier itself does not close anything unless you call .CloseNotification
.
In your example you only send one notification with the default object and then one with the Notifier
(to try Action
& Close
). To try what I meant, and for a better test, fire two or more with each scenario. If you only send one, you are not covering well all possibilities.
As for my last point, I noticed Raspberry Debían ships & packages dunst v0.5
whereas the latest version is 0.11
. Unfortunately it isn't easy to build. By chance I found a reported issue of what I am seeing which was tied to v0.5. Your full-blown Gnome likely has the latest version. That would explain why you don't observe it.
Anyway, I think I got far enough in my wrapper and can now move on to the main application where I planned using the notifications.
I hope your dbus notification package doesn't get abandoned.
I modified the example to send multiple when I tested it :)
I see that for every a notification is sent without
Notifier
we do:Notification
Notification
In that case, if I send several using that protocol, I can close them individually by clicking on them (real-life use case).
Now, if I send several
Notification
objects with the same connection context, clicking on any of them results on all of them getting closed.With Signal Listener
Now, in the other scenario is when we have set
Action
items to theNotification
and set up aNotifier
with handlers to listen on notification-related events.Notifier
connection isClosed
, then signals don't arrive to the handlers.Notifier
connection open, one can useNotifier.Send()
to sendNotification
coupled to the listeners as long as the Connection isn't closed.Notifier
instance to send several signals, then ALL are bundled together, meaning that if the user closes one (or clicks forAction
), then all get closed together which isn't the intended scenario.So, the only way it would work is if you have one
Notifier
instance for everyNotification
send viaNotifier.Send()
. That's somewhat cumbersome.