Commit Graph

443 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño) 59553a5af2 NEWS: Add --wait feature to last release 2022-04-27 20:16:49 +02:00
Marco Trevisan (Treviño) 2674c76f53
Bump version to 0.7.10
Update NEWS.
2022-04-27 19:00:44 +02:00
Marco Trevisan (Treviño) d138596c78 CI: Also install the built files and expose docs and logs 2022-04-27 18:29:47 +02:00
Marco Trevisan (Treviño) d07785959c notification: Add support for getting actions activation token
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
2022-04-27 18:02:20 +02:00
Marco Trevisan (Treviño) 47400a2ff7 notify-send: Clear errors that could be re-used
We're using error variable multiple times, and this may lead to problems
when trying to set it again. So let's just clear once it's used.
2022-04-25 22:23:40 +02:00
Marco Trevisan (Treviño) 1da6996491 notify: Use the application ID if available to set the fallback app name 2022-04-25 22:23:40 +02:00
Ben Blain e05030875e docs/notify-send: Add missing --app-name description to manual 2022-04-25 22:23:40 +02:00
Ben Blain 12d4b90623 notify-send: Check for notification server actions capability support 2022-04-25 22:23:40 +02:00
Ben Blain 6c707d2dfd notify-send: Add support for notification actions and responses
The activated action name is written to stdout and the notification is closed
when a valid action has been selected.
2022-04-25 22:23:37 +02:00
Ben Blain a396dd9af9 notify-send: Add option to wait until notification has been closed
If an expiration timeout is set, the notification is not waited longer
than such time.
2022-04-25 22:15:50 +02:00
Matthias Sweertvaegher 00a7e74774 docs/notify-send: Add print/replace-id arguments to man page 2022-04-25 19:43:12 +02:00
Paul Collins 652b4d6911 notify-send: Support for replacing an existing notification
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
2022-04-25 19:42:13 +02:00
Marco Trevisan (Treviño) f9c1cf1b71 notification: Keep converted URIs as such when we prepend a path 2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) 997e2e374a notification: Do not duplicate calls on parse functions 2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) 0d86d8c8d5 notification: Improve debug logs when rewriting paths 2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) b2d6712b15 notification: Avoid creating a new hint variant when nothing has changed 2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) 961f45f44c notification: Use snap name and app name as fallback desktop-entry
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.
2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) e72396e8ca notification: Preserve snap details into the private struct
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.
2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) d21b8140a8 notification: Do not try to append snap name to desktop when it's a path 2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) c4d5ea8baf notification: Do not prepend SNAP prefix when is already present
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.
2022-04-25 19:13:22 +02:00
Marco Trevisan (Treviño) d348a36a05 build: Do not require g-ir-scanner on introspection=auto 2022-04-21 23:53:44 +02:00
Marco Trevisan (Treviño) d5a888fa31 notification: Use g_memdup2 when available
It's not really an issue here, as we use a properly typed len, but
better not to use a deprecated and potentially dangerous API.
2022-04-21 23:53:44 +02:00
Marco Trevisan (Treviño) 736fcea1d0 build: Avoid warnings or mis-behavior in recent meson versions
In future meson will check the run_command result by default, while it's
fine for us, it would cause our nicer error message not to work.
2022-04-21 23:53:44 +02:00
Marco Trevisan (Treviño) 2accd4ceab Revert "Revert "Merge branch 'readme' into 'master'""
This reverts commit 1ad4630107.

As per: https://gitlab.gnome.org/GNOME/libnotify/-/commit/1ad46301#note_1434358
2022-04-21 18:51:13 +02:00
Corentin Noël 333f7c5d32 Send the application ID when possible 2022-04-21 16:35:38 +02:00
David King 7f31e29e62 docs: Use consistent IDs in spec build
This avoids differences between IDs for separate builds of the
specification.
2022-04-21 14:37:58 +02:00
Logan Rathbone 1ad4630107 Revert "Merge branch 'readme' into 'master'"
This reverts merge request !21
2022-03-21 22:19:32 +00:00
Logan Rathbone e35921f10f Merge branch 'readme' into 'master'
Add README clarifying status of libnotify

See merge request GNOME/libnotify!21
2022-03-21 22:15:16 +00:00
Maximiliano Sandoval R edb1dc8394
Add README clarifying status of libnotify
See discussions at https://gitlab.gnome.org/GNOME/libnotify/-/issues/20.

Based off https://gitlab.gnome.org/GNOME/libnotify/-/merge_requests/19
2022-03-14 17:50:55 +01:00
Ray Strode a228f1e84d notify-send: Give failing exit code if showing notification fails
Right now notify-send will quietly return a successful exit status
even if showing the notification fails.

This commit changes the behavior to instead fail on failure.

https://gitlab.gnome.org/GNOME/libnotify/-/merge_requests/13
2021-05-14 13:55:53 -04:00
Marco Trevisan 05112e2a5b Merge branch 'update_documenation' into 'master'
Update documenation (generated man file) to express that plasma notification...

See merge request GNOME/libnotify!14
2021-04-06 11:59:19 +00:00
Alberts Muktupāvels 39575f7c6f Merge branch 'master' into 'master'
notify-send: Support commas in icon filenames

See merge request GNOME/libnotify!15
2021-03-26 15:57:33 +00:00
Thorsten Wißmann dfaa76109e notify-send: Support commas in icon filenames
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
2021-03-26 16:52:49 +01:00
Alberts Muktupāvels 48e64c39bc Merge branch 'fix-ci' into 'master'
fix CI build stuck on TZ data config

See merge request GNOME/libnotify!16
2020-12-24 18:34:29 +00:00
Matthias Sweertvaegher 698a05fcc4 fix CI build stuck on TZ data config
when pushing a new commit, I noticed the CI build gets stuck on:

Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
  1. Africa   3. Antarctica  5. Arctic  7. Atlantic  9. Indian    11. US
  2. America  4. Australia   6. Asia    8. Europe    10. Pacific  12. Etc
Geographic area:
2020-12-14 17:44:11 +01:00
Boris Shtrasman 50cf335a34 Take Marco Trevisan text enhencment 2020-09-17 20:52:37 +03:00
Boris Shtrasman 4e2971be0c enhence text 2020-09-01 16:03:03 +03:00
Boris Shtrasman d9ba514b15 Update documenation (generated man file) to express that plasma notification system will ignore timeout value when level is in critical mode 2020-08-31 21:56:54 +03:00
Marco Trevisan (Treviño) 98a4bf483a release: 0.7.9 2020-02-26 20:06:01 +01:00
Marco Trevisan d30f73d628 Merge branch 'wip/jtojnar/manpage' into 'master'
Add notify-send manpage

Closes #4

See merge request GNOME/libnotify!6
2020-01-13 17:15:51 +00:00
Marco Trevisan ea61ec4301 Merge branch 'snap-paths-support' into 'master'
notification: use snap namespace and prefix whent launched inside snap

See merge request GNOME/libnotify!5
2020-01-13 17:11:47 +00:00
Marco Trevisan b95d41283e Merge branch 'wip/jtojnar/drop-autotools' into 'master'
Drop Autotools

See merge request GNOME/libnotify!11
2020-01-13 17:10:31 +00:00
Jan Tojnar edfd97f4a9
ci: Do not pass default flags to meson 2020-01-13 17:12:00 +01:00
Jan Tojnar a599a04de6
Drop Autotools 2020-01-13 17:09:17 +01:00
Jan Tojnar 162d195869
Add notify-send manpage
Taken from Debian, converted to Docbook and fixed some issues.

Closes: https://gitlab.gnome.org/GNOME/libnotify/issues/4
2020-01-13 16:41:31 +01:00
Iain Lane 2e8ed8add3 notification: Handle snap applications
When a non-relocatable application is packaged as a snap, its resources
will be visible under `${SNAP}`. We can discover these resources by
probing paths that are given to us and trying the same path under
`${SNAP}` if the probe fails.

Snap packages have desktop files namespaced by the snap name. This name
is available inside the snap environment as `${SNAP_NAME}`. Also probe
desktop files and try this form of mangled name if the referenced
desktop file is not found.
2019-08-14 15:43:43 +02:00
Jan Tojnar 55eb69247f
build: check supported linker args before build
MacOS linker does not support --version-script argument so we need
to only add it to ldflags when it is available.
2019-04-26 20:20:22 +02:00
Florian Müllner 44f9222212 Bump version to 0.7.8
Update NEWS.
2019-03-28 19:24:26 +01:00
Florian Müllner f5a845dd00 build: Don't use absolute path with 'subdir' keyword
Newer meson versions expect a relative path (to the includedir option)
there and reject passing an absolute path.

https://gitlab.gnome.org/GNOME/libnotify/merge_requests/8
2019-03-28 19:06:26 +01:00
Iain Lane d3277ac331 Merge branch 'notify-send-support-file-proto' into 'master'
notify-send: allow passing colon as hint value

See merge request GNOME/libnotify!4
2019-02-15 13:35:36 +00:00