5 Commits

Author SHA1 Message Date
Nikos Tsipinakis
4d55ccb0ee Check against MARKUP_NULL when checking if markup is set
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.
2017-02-05 13:00:59 +02:00
Nikos Tsipinakis
4e1b97f3cc Merge allow_markup and plain_text into markup
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
2017-02-04 22:10:51 +02:00
Nikos Tsipinakis
63bb4ad857 Move setting enums to settings.h
Not sure why these were in dunst.h in the first place since they are
mostly used by the settings struct.
2017-01-29 15:32:36 +02:00
Nikos Tsipinakis
964688699e Use include guards consistently
* 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.
2017-01-29 15:32:36 +02:00
Nikos Tsipinakis
2df2e7d06c Move dunst source files to src/ 2016-11-19 11:54:03 +02:00