Skip to content
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

Implement v2 notification spec #1298

Merged
merged 20 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9aa3737
notification: Bump interface to version 2
jsparber Mar 8, 2024
a43693a
notification: Accept icons as file descriptor
jsparber Jan 18, 2024
40770d2
tests: Implement tests for file-descriptor notification icons
jsparber Feb 27, 2024
eafe091
notification: Add new sound property
jsparber Mar 5, 2024
0932ee7
test: Implement tests for notification sound property
jsparber Mar 7, 2024
19774be
notification: Add new property markup-body to support markup
jsparber Mar 22, 2024
297b5a8
notification: Improve description of title and body
jsparber Apr 12, 2024
20a2e63
test: Implement test for notification property markup-body
jsparber Mar 22, 2024
9c617f1
notification: Add display-hint property
jsparber Mar 21, 2024
6a4b280
test: Implement tests for display-hint notification property
jsparber Mar 22, 2024
6e895bc
notification: Improve wording around DBus Activation
jsparber Apr 16, 2024
077ff6e
notification: Add platform-data to ActionInvoked signal
jsparber Apr 16, 2024
eb8c1f4
notification: Add category property
jsparber Mar 21, 2024
a5fac9b
notification: Add purpose property for buttons
jsparber Mar 21, 2024
c2ae443
test: Implement tests for category notification property
jsparber Mar 22, 2024
2baa5b8
notification: Add supported-options property
jsparber Mar 21, 2024
cb08bd3
test: Implement tests for supported-options property in notification
jsparber Mar 26, 2024
4b1a2e3
notification: Introduce version property for backend impl interface
jsparber Oct 14, 2024
2e8860a
notification: Ensure backwards compatibility with old backends
jsparber Oct 14, 2024
1e65575
notification: Deprecate bytes option for icons
jsparber Oct 15, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ RUN apt install -y --no-install-recommends \
libgdk-pixbuf-2.0-dev \
librsvg2-2 \
librsvg2-common \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-good \
libgstreamer-plugins-good1.0-dev \
libgeoclue-2-dev \
libglib2.0-dev \
libjson-glib-dev \
Expand All @@ -50,4 +53,4 @@ RUN apt install -y --no-install-recommends \
python3-sphinx-copybutton \
python3-sphinxext-opengraph \
furo \
python3-sphinx
python3-sphinx
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
env:
IMAGE_TAG: 20241015-2
IMAGE_TAG: 20241016-2

on:
workflow_call:
Expand Down
32 changes: 30 additions & 2 deletions data/org.freedesktop.impl.portal.Notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

This notification interface lets sandboxed applications
send and withdraw notifications.

This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.impl.portal.Notification">
<!--
Expand All @@ -39,12 +41,17 @@

The ID can be used to later withdraw the notification.
If the application reuses the same ID without withdrawing,
the notification is replaced by the new one.
the notification is updated with the new one. It's possible
to set ``show-as-new`` hint in the ``display-hint`` property
to animate replacing the notification instead of updating it.

The format of the @notification is the same as for
:ref:`org.freedesktop.portal.Notification.AddNotification`.

Since version 2, the icon property never uses the ``bytes`` option.
-->
<method name="AddNotification">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
Expand All @@ -62,21 +69,42 @@
<arg type="s" name="id" direction="in"/>
</method>

<!--
SupportedOptions:

Some properties in :ref:`org.freedesktop.impl.portal.Notification.AddNotification`
may have options advertised by the notification server.

The format is the same as for ``SupportedOptions`` property of
:ref:`org.freedesktop.portal.Notification`.
-->
<property name="SupportedOptions" type="a{sv}" access="read"/>

<!--
ActionInvoked:
@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 following values in order:

#. The `target` for the action, if one was specified.

#. The `platform-data` as vardict containing an ``activation-token`` (``s``) for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
-->
<signal name="ActionInvoked">
<arg type="s" name="app_id"/>
<arg type="s" name="id"/>
<arg type="s" name="action"/>
<arg type="av" name="parameter"/>
</signal>

<property name="version" type="u" access="read"/>
</interface>
</node>
Loading
Loading