Commit Graph

131 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño) eba4dfa540 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-22 01:48:48 +02:00
Marco Trevisan (Treviño) d1f402294e notification: Do not try to append snap name to desktop when it's a path 2022-04-22 01:48:48 +02:00
Marco Trevisan (Treviño) 60b40c4bfa 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-22 01:48:48 +02:00
Corentin Noël 333f7c5d32 Send the application ID when possible 2022-04-21 16:35:38 +02: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
Jan Tojnar a599a04de6
Drop Autotools 2020-01-13 17:09:17 +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 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
Marco Trevisan 593f260722 Build with meson and add CI 2019-01-31 17:15:27 +00:00
Emmanuele Bassi 43aac613f1 Conditionall call g_type_init() after a version check
There's no need to call g_type_init() since GLib 2.36, so let's hide it
when building against newer versions of GLib.
2017-07-17 10:16:06 +01:00
Emmanuele Bassi 46e8b1cfad build: Update the list of headers in srcdir
The generated notify-features.h header lives in builddir, which means it
does not exist in srcdir, where glib-mkenums will look. It also contains
pre-processor symbols only, so it's not really useful.

As we removed it from the list of headers to be scanned by the
introspection parser, we also need to update the files rules for that.
2017-07-17 10:11:48 +01:00
Evan Nemerson da49c8c599 NotifyNotification: fix set_hint_byte_array value annotation
https://bugzilla.gnome.org/show_bug.cgi?id=667904
2014-04-01 21:19:01 +02:00
Evan Nemerson 5a486c5490 Include C header information and exported packages in GIR
https://bugzilla.gnome.org/show_bug.cgi?id=667904
2014-04-01 21:02:56 +02:00
Giovanni Campagna 2b4ab4d22f NotifyNotification: fix annotation for add_action()
Using GFreeFunc instead of GDestroyNotify was a mistake, but
(scope async) is even a bigger mistake (one that can crash apps,
if an action is invoked multiple times)

https://bugzilla.gnome.org/show_bug.cgi?id=702390
2013-09-02 21:42:37 -04:00
Matthias Clasen 9128042026 Clarify docs of notify_notification_set_timeout
In response to
https://bugzilla.gnome.org/show_bug.cgi?id=701645
2013-06-07 20:28:10 -04:00
Colin Walters 5e3654b70b build: Also fix introspection when srcdir != builddir 2012-01-16 18:47:31 -05:00
Colin Walters b6e1f7f1a2 build: Another srcdir != builddir fix 2012-01-16 18:44:49 -05:00
Colin Walters bc612b9fc8 build: Fix srcdir != builddir 2012-01-16 18:42:58 -05:00
Javier Jardón 2fe1748295 notification.h: Add deprecation guards 2011-10-09 13:08:53 -04:00
Richard Hughes 1c40dfaff4 Add notify_notification_set_app_name() to set the application name for the notification
When a daemon like gnome-settings-daemon has multiple plugins, if a plugin uses
notify_set_app_name() then subsequent notifications get the wrong
'Application name' in the gnome-shell persistent message tray.

This new function is per-notification and is thus allows us to set a custom
application name without overwriting the application name stored by notify_init().

https://bugzilla.gnome.org/show_bug.cgi?id=648947
2011-05-02 23:36:52 -04:00
Matthias Clasen 10ea1f0e65 Allow properties to be set in any order
The code as written needlessly required summary to be set first.
https://bugzilla.gnome.org/show_bug.cgi?id=645222
2011-03-20 23:51:55 -04:00
William Jon McCann b20752a2e5 Use - instead of _ in hint names consistently 2011-01-17 16:57:31 -05:00
William Jon McCann a967c61e5b Add a way to set or change the application name
May be useful for presenting different message sources
within a single process.
2011-01-17 16:40:17 -05:00
Emilio Pozuelo Monfort 9d5e8582b3 Don't export private symbols in the shared library
https://bugzilla.gnome.org/show_bug.cgi?id=635958
2011-01-11 23:33:13 +00:00
Martin Pitt d3de00c14e Some more missing GIR annocations
https://bugzilla.gnome.org/show_bug.cgi?id=635169
2010-11-18 14:05:48 +01:00
Jonathan Matthew 2b6e827092 Generate gir and typelib for gobject-introspection 2010-11-18 00:13:14 -05:00
Jonathan Matthew 84958a7acb Fix some annotations 2010-11-18 00:11:29 -05:00
William Jon McCann 54b6285006 Don't set NULL hint strings 2010-11-15 14:44:40 -05:00
William Jon McCann e6a4970a79 return NULL not FALSE 2010-11-15 14:41:25 -05:00
William Jon McCann ef744d75d0 Show a warning and assert if notify_init isn't called before show 2010-11-15 12:44:32 -05:00
William Jon McCann 1b33c07973 Remove function annotations from notify.h 2010-11-14 11:07:53 -05:00
Javier Jardón 2ae1dadfa9 docs: Some fixes
https://bugzilla.gnome.org/show_bug.cgi?id=634266
2010-11-14 11:00:57 -05:00
Javier Jardón 560abf5c97 docs: Move documentation to inline comments: notify
https://bugzilla.gnome.org/show_bug.cgi?id=634266
2010-11-14 10:52:42 -05:00
Javier Jardón abb884af73 docs: Move documentation to inline comments: notification
https://bugzilla.gnome.org/show_bug.cgi?id=634266
2010-11-14 10:52:38 -05:00
William Jon McCann 59b6bff174 Use LGPL file header
Mistakenly used a GPL license header.
2010-11-14 10:42:10 -05:00
Guillaume Desmottes 49766bca28 notify_notification_set_image_from_pixbuf: ref the pixbuf (#633829) 2010-11-02 17:02:37 +01:00
William Jon McCann d82ad1b225 Remove silly old dbus version comments in the docs 2010-10-15 00:14:24 -04:00
Christian Persch f63e8ab8b1 Port to gdbus
Bug #622891.
2010-10-12 15:57:33 +02:00
William Jon McCann db7eb0180c Use notify-features.h instead of features.h 2010-10-09 01:26:38 -04:00
William Jon McCann cb6f92ce5b Port to gtk3 for the tests 2010-10-09 01:26:38 -04:00
William Jon McCann b6c1835fcf Don't need to fuss with gtk symbols since we don't use gtk at all anymore 2010-10-09 00:32:31 -04:00
William Jon McCann 7acabe0741 Add a macro for determining the version of the library 2010-10-08 23:29:30 -04:00
William Jon McCann 27e05d0f95 Remove the ability to attach notifications to widgets or positions 2010-10-08 22:47:06 -04:00
William Jon McCann 3f14ad4c71 Remove the ability to attach to a status icon
This technique is replaced by the use of notification persistence.
2010-10-08 22:31:40 -04:00
Jonny Lamb 4830863bab Use correct variable in NULL check
If you pass NULL as the fourth argument to notify_get_server_info it
segfaults.

https://bugzilla.gnome.org/show_bug.cgi?id=623096
2010-07-01 20:46:04 -04:00
Martin Pitt 1a103f1eee Fix assertion when uniniting without any notifications
The lazy initialization from commit 3dc04fa caused a small regression: When a
process would init and uninit libnotify without ever sending a notification,
_proxy was still NULL, which caused an assertion

(process:20953): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

Bug-Ubuntu: https://bugs.launchpad.net/bugs/570462
2010-07-01 14:32:57 +02:00
Bastien Nocera 0eb56b2fcf Don't link against a particular version of GTK+
Instead, open ourselves through GModule, and check whether
we have all the GTK+ and GDK functions required for us to
work correctly.

This means that the front-end application cannot rely on
libnotify linking against GTK+, which would only be a problem
for edge-cases.

https://bugzilla.gnome.org/show_bug.cgi?id=622550
2010-06-28 23:34:50 +01:00
William Jon McCann 5be65318a4 Disconnect the proxy destroy signal handler 2010-06-24 04:29:55 -04:00
William Jon McCann afb6e6a1f3 Remove checks for old GTK+ 2010-06-24 02:56:51 -04:00