elementary / notifications

Gtk Notifications Server
https://elementary.io
GNU General Public License v3.0
38 stars 6 forks source link

Use GLib.ActionGroup to handle actions #193

Closed Marukesu closed 1 year ago

Marukesu commented 1 year ago

this is a alternative to #192, it's more complex since it's also used to activate actions in the bubble's buttons.

The usage of a ActionGroup here is that it's allows us to untangle the Bubble class from the freedesktop notifications server in the future.

Marukesu commented 1 year ago

@leolost2605 if you want to test this with the indicator, you can use a DBusActionGroup to get a proxy to the exported action group. the actions follow a "fdo-${id}.${action}" format. closing a notification from the indicator can be done by calling the "close" (non-namespaced) action with the notification id as parameter.

this doesn't fix the expired emission though, so you need to use a urgent notification and don't let it be dismissed to proper test it.

Marukesu commented 1 year ago

Did a rewrite of the FdoActionGroup class, the FdoNotificationActionGroup got removed and actions now follow a "$id.$action" format. the close action had the signature changed too to handle batch removal of notifications.

i tested activating actions via d-spy and in the bubble, everything is working ok here.

Marukesu commented 1 year ago

Alright, fixed the issue with Describe/DescribeAll. all the DBus methods should be working now.

leolost2605 commented 1 year ago

🎉