-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Rewrite NotificationsMonitor
#266
Conversation
Signed-off-by: Gustavo Marques <[email protected]>
c66eb0f
to
8db3af7
Compare
8db3af7
to
c79006e
Compare
GLib.DBusProxy cannot be used to emit signals in the bus. Signed-off-by: Gustavo Marques <[email protected]>
the [SingleInstance] attribute deal with making the class a singleton and forcing a unique instance is created and referenced everytime the constructor method is called, sealed mark the class as non-derivable. while here fix the class name to match the file name. Signed-off-by: Gustavo Marques <[email protected]>
rather than calling initialize() in the construct block make it public and let the Indicator decides when to initalize the monitor. Signed-off-by: Gustavo Marques <[email protected]>
use a generic match for method calls and signal emissions for the org.freedesktop.Notifications interface, restrict the method_return and error ones to the org.freedesktop.Notifications name. Signed-off-by: Gustavo Marques <[email protected]>
rewrite the switch statement to check member_name instead of message_type, this allow to mege the CloseNotification and NotificationClosed cases. the case of the notify call beeing successfull or not is also merged. the monitor signals are now emitted before the next Gtk redraw cycle, making sure that the tray got updated in the current cycle. Signed-off-by: Gustavo Marques <[email protected]>
c79006e
to
76943d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good from what I understand of how this works. I am not totally sure how to best test this. if you want me to let me know but I trust you enough with this that I am fine with you merging.
This is also working for me and I can confirm replaces are working. Nice work! Way to save 100 lines as well, very cool diff |
Cleanup the class and make the filter simple.
Depends on elementary/notifications#211.
Closes #9.