From a5a2c299f7868e945f041fe8bd81283b506d2c5a Mon Sep 17 00:00:00 2001 From: Julian Sparber Date: Tue, 16 Apr 2024 10:42:07 +0200 Subject: [PATCH] notification: Define how apps can get an activation-token via ActionInvoked We need to hand out the activation token for XDG Activation in some way. I think it's pretty nice that we can just add the same platform data as used for DBus Activation to the ActionInvoked signal. --- data/org.freedesktop.impl.portal.Notification.xml | 6 +++++- data/org.freedesktop.portal.Notification.xml | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/org.freedesktop.impl.portal.Notification.xml b/data/org.freedesktop.impl.portal.Notification.xml index 329818bbf..191d00402 100644 --- a/data/org.freedesktop.impl.portal.Notification.xml +++ b/data/org.freedesktop.impl.portal.Notification.xml @@ -128,10 +128,14 @@ @app_id: App id of the application @id: the application-provided ID for the notification @action: the name of the action - @parameter: array which will contain the target parameter for the action, if one was specified + @parameter: an array containing additional information Send to the application when a non-exported action is activated. + + The @parameter contains the target parameter for the action, if one was specified, + and the `platform-data` as vardict containing an ``activation-token`` (``s``) for `XDG Activation + `_. --> diff --git a/data/org.freedesktop.portal.Notification.xml b/data/org.freedesktop.portal.Notification.xml index 1dcc0d98c..e463aaa6b 100644 --- a/data/org.freedesktop.portal.Notification.xml +++ b/data/org.freedesktop.portal.Notification.xml @@ -40,7 +40,7 @@ `_ using ``ActivateAction()`` method in the ``org.freedesktop.Application`` interface. An `activation-token` for - ` XDG Activation + `XDG Activation `_ and an application-defined `target` is passed when activating the action. Other @@ -427,10 +427,14 @@ ActionInvoked: @id: the application-provided ID for the notification @action: the name of the action - @parameter: array which will contain the target parameter for the action, if one was specified + @parameter: an array containing additional information Send to the application when a non-exported action is activated. + + The @parameter contains the target parameter for the action, if one was specified, + and the `platform-data` as vardict containing an ``activation-token`` (``s``) for `XDG Activation + `_. -->