Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions data/org.freedesktop.impl.portal.Notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,14 @@
Send to the application when a non-exported action is
activated.
The @parameter contains the following values in order:
The @parameter is an array of variants that contains
the following values in order:
#. The `target` for the action, if one was specified.
#. The `target` for the action (``v``) (the value may
Copy link
Contributor

Choose a reason for hiding this comment

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

D-Bus doesn't have the concept of empty value, so it's not possible to have an unset variant. We could set it to an empty array but that's not correct since we wouldn't be able to differentiate whether it's unset or the actual target of the button

Copy link
Contributor Author

Choose a reason for hiding this comment

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

D-Bus doesn't have the concept of empty value, so it's not possible to have an unset variant. We could set it to an empty array but that's not correct since we wouldn't be able to differentiate whether it's unset or the actual target of the button

Sure, indeed that was my main concern of this API when I saw the recent changes.

HOWEVER, indeed we can send an empty container (as for example was done in GLib IIRC), but it's not the greatest option since the API is technically new.

At the same time, since that parameter is controlled by the application, if the application, it should not care about it when the value is set to something else.

And, if we want to use an array for these values, having it of a "flexible length" it does not make sense, so or we use a fixed number of elements or we need to trash the API.

be unset, but the variant must be always present).
#. The `platform-data` as vardict containing an ``activation-token`` (``s``) for
#. The `platform-data` as vardict (``a{sv}``) containing
an ``activation-token`` (``s``) for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
-->
Expand Down
9 changes: 6 additions & 3 deletions data/org.freedesktop.portal.Notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,14 @@
Send to the application when a non-exported action is
activated.

The @parameter contains the following values in order:
The @parameter is an array of variants that contains
the following values in order:

#. The `target` for the action, if one was specified.
#. The `target` for the action (``v``) (the value may
be unset, but the variant must be always present).

#. The `platform-data` as vardict (``a{sv}``) containing an ``activation-token`` (``s``) for
#. The `platform-data` as vardict (``a{sv}``) containing
an ``activation-token`` (``s``) for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_

Expand Down
Loading