Starting with d0778595, we access the Notification object after the
NotifyActionCallback; some clients (eg, Electron) have historically
unref'd the object at the end of the NotifyActionCallback. They probably
should not have been doing so, but this hotfix adds an additional ref
before and after the callback so that we don't break existing code.
Fixes#25
Per:
- Discussions on #release-team
- No response to email to mccann in over 10 days
- Email response from chammond confirming he should no longer be listed
as maintainer
See also: afef1e98Closes: #14
In case a transient notification is requested but persistence is not
supported, it's not an error but it is useful to show a debug message
to clarify that.
Notification actions can now be activated with an activation token
containing platform data. So update the notification-spec to include
latest version of the specification, and expose the activation token
during an action activation.
Not to change the API, by modifying the type of NotifyActionCallback
it's just better to provide a function to fetch the activation token
during activation only, so that this can be retro-compatible.
Reference: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/b9a4700
Support printing and overriding notification ID, so that it's possible
to replace a notification that is currently showing with an updated
content.
Based on patch as provided by Paul Collins in the following bug
report:
https://bugs.launchpad.net/ubuntu/+source/libnotify/+bug/257135/comments/8
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Fixes#19
Snaps use desktop IDs based on the snap name and the application name
inside the snap, so if we're in a such container, we need to compute the
desktop-entry using those values. We can figure them out from the snap
cgroup they're in.
In such case, don't even try to use the GApplication ID as that is
likely wrong in a snapped environment.
We may need to use them in various places, so there's no point to repeat
the same in multiple places, this way we can also use some shortcuts for
non-snap setups.
We used to just add it again, to eventually figure out that the file
did not exists, but may not work properly in some scenarios.
Also always fill the path_filename when using a file-name only, as that
may be refer to something under the SNAP path, and in such case we want
to try check if that exists before giving up.
Do not cut off an icon filename (passed to -i) at the first comma
character. The original motivation probably was to support a list of
icon names in -i separated by comma. However, this has never been
implemented and the help text for -i also only mentions "an icon".
Hence, no functionality is lost by this change. In contrast, -i now
supports commas in icon filepaths.
https://gitlab.gnome.org/GNOME/libnotify/-/issues/16