20 Commits

Author SHA1 Message Date
kongo2002
4f16213f9f add some graceful termination handling 2016-10-29 02:27:29 -03:00
Justin Jacobs
539d4dd102 Fix crash from uninitialized pointer value 2016-10-29 02:27:08 -03:00
Andrew Krasichkov
a6d9626c54 Try to support raw image data (see knopwob/dunst#151 ) 2016-03-09 18:37:04 +02:00
Justin Jacobs
61ce42a7e2 Fix memory leaks 2015-03-03 00:49:24 -05:00
Yuri D'Elia
b5e00c43c7 Fix markup handling.
The current "allow_markup" setting will simply strip any markup from the final
notification, which includes formatting elements. On top of that, literal
[<>&..] symbols are not quoted before are being passed onto pango in several
places, resulting in stray error messages.

This patch fixes allow_markup to correctly strip markup only from the incoming
notification, not from the format.

You might also want to treat incoming messages as literal text (supplied by
un-aware programs), in which case you need to properly quote the text before
it's processed by pango. A new setting is introduced, called "plain_text",
which forces incoming messages to be treated literally.

allow_markup/plain_text are complimentary to each other.

The new rule actions allow to narrow down the handling to a specific block,
achieving notification Zen.

The following is done in this patch:

- Fix ruleset initialization in config.def.h.
- Introduce new allow_markup/plain_text actions in the rules.
- Fix handling of allow_markup to strip markup from summary/body only,
  preserving format's markup.
- Fix broken string functions (string_replace_all didn't handle recursive
  replacements correctly).
- Fix quoting of other literal fields (icon name/appname).
- Fix handling of ignore_newline as well (applied only on summary/body).
- Dunstrc update with the same previous defaults.
2014-12-05 16:05:41 +01:00
t5c
eedd220e37 check return values of malloc and handle error.
added some missing includes, too.

closes #199.
2014-11-04 15:14:22 +01:00
Sascha Kruse
f3fcc109f4 Fix comparison of registration_id
Fixes #193
2014-09-11 10:27:43 +02:00
Anton Lofgren
7a4d7fdd79 dbus: Fix iterator memory leak
The manual for g_variant_iter_next_value states the following:

"[..]
Use g_variant_unref() to drop your reference on the return value when
you no longer need it.
[..]"
https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-iter-next-value

For most notifications (I guess), this is not a problem, since the leak
is relatively tiny. However, for notifications that contain big chunks
of binary data, such as those sent out by the new Spotify client, it
adds up fast.

The Spotify notifications in particular contain a rather large
"icon_data" byte array (contained in a dict), which while never recorded
is never-the-less iterated over and allocated, which in turn gives rise to
issue #173.

This fixes #173.
2014-05-30 11:52:24 +02:00
Sascha Kruse
1ccb6185ac allow rule matching against category
fix issue #135
2014-03-08 15:03:38 +01:00
Giuliano Schneider
844186b77d fixed "warning: ‘g_type_init’ is deprecated" 2013-04-30 13:45:34 +02:00
Sascha Kruse
e3bce11796 dbus.c: don't unref invocation 2013-03-08 20:30:51 +01:00
Sascha Kruse
aa91688795 format introspection_data 2013-03-02 17:52:44 +01:00
Sascha Kruse
a1374ff1b0 read value hints again 2013-02-27 00:16:51 +01:00
Sascha Kruse
0368c63174 More informative error message, when dbus initialization fails 2013-02-25 22:06:57 +01:00
Sascha Kruse
43a14fa979 advertise "body-markup" capabilities 2013-02-23 03:15:23 +00:00
Sascha Kruse
4ef3cf96ff fix possible memory corruption 2013-02-23 00:46:19 +00:00
Sascha Kruse
e82da9d5e7 indent -linx --no-tabs 2013-02-21 23:23:54 +00:00
Sascha Kruse
4e92d61804 notification.{c,h} 2013-02-21 18:02:20 +00:00
Sascha Kruse
f2e42aabfd cleanup notification_* function names 2013-02-20 10:26:12 +01:00
Sascha Kruse
0dc127715f renamed dunst_dbus.* -> dbus.* 2013-02-20 08:52:54 +00:00