7 Commits

Author SHA1 Message Date
John Chen
7037afb2bc Fix include. Add empty lines between include layers. 2017-02-14 00:39:04 +08: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
Steven Allen
2b2992de38 Fix a double free in on_get_capabilities.
`value` was already being freed by `g_dbus_method_invocation_return_value`.

Fixes #215
2017-01-26 16:38:38 -08:00
Nikos Tsipinakis
0cb1524cc6 Don't check return status of notification_create
notification_create is guaranteed to return a pointer to a notification,
if the memory allocation fails it throws an error and exits the program.
2017-01-01 17:05:25 +02:00
Nikos Tsipinakis
0a0c02021d Update functions in dbus.c to use camel_case for consistency 2016-12-22 20:00:45 +02:00
Nikos Tsipinakis
de9c52f98f Implement notification_create function
notification_create currently simply allocates memory and zeroes it to
properly initialise a notification. Since we currently have at least 2
places in the code that create notifications(startup notification in
dunst.c and notifications from dbus in dbus.c) the creation should be
handled from a central location in case we ever need to change the
creation procedure later on.
2016-12-22 19:49:29 +02:00
Nikos Tsipinakis
2df2e7d06c Move dunst source files to src/ 2016-11-19 11:54:03 +02:00