string_to_argv parsing was very simplistic and didn't properly handle
quotations. Since we are already using glib, g_shell_parse_argv serves
the same purpose with much better parsing and error handling.
Setting markup_mode to -1 might not work since in some implementations
enum might not be signed. For convenience, add a new enum value
`MARKUP_NULL` to serve the same purpose.
Merge the allow_markup and plain_text settings into a single setting.
These 2 settings had a similar function, allow_markup controlled whether
markup was parsed or stripped and plain_text whether the notification
was escaped and displayed as is.
To cover all the possible combinations of the settings mentioned above
`markup` can take the following values:
full: The equivalent of allow_markup yes, plain_text no.
Passes the text straight to pango with minimal parsing. All valid
pango tags will be parsed.
strip: The equivalent of allow_markup no, plain_text no.
Strips the markup using string_strip_delimited. The parsing is
simplistic and if there are any unescaped '<' and/or '>'
characters it might get tripped and strip out actual text.
According to the GNOME notification specification, if a server
doesn't support markup(and we don't advertise that we do if it is
turned off) it should be stripped clientside, so this setting
should rarely be used. It is mainly left in for compatibility
with broken clients that don't follow the specification.
no: The equivalent of allow_markup [yes/no](any value), plain_text
yes.
Makes the notification content be rendered as plain text
regardless if it contains markup. Any Markup will be shown as
regular text.
Markup inside 'format' will still be parsed regardless of what markup is
set to.
Closes#279
* Don't mix pragma guards and include guards, prefer classic include
guards since apparently pragma guards are not a standard yet.
* Use the DUNST_FILE_H naming convention for all include guards.
If a notification has a raw icon, icon is set to NULL which was passed
without checking to strcmp. We don't (yet) support comparing raw icons so
if a raw icon is set, we can safely assume the notification is not a
duplicate.
* Fix#281 bad free. Also fix a memory leak.
With `n->icon = r->new_icon` and later `free(n->icon)`
`r->new_icon` is wrongly freed. Fix that with strdup.
Also fix an obvious memory leak by the way.
* Fix a bug that would cause distclean to fail if config.h didn't exist
* Make sure the options target is run when running make dunst
* Remove debug target as the optimization override it was doing was only
applied in the linking phase. Optimizations are applied during
compilation, not linking, and I don't see any easy way to fix that so
let's drop the target entirely.