14 Commits

Author SHA1 Message Date
Benedikt Heine
bbbddad3a7 Use structs for notifications 2018-09-16 02:58:31 +02:00
Benedikt Heine
1fa1532d7f Pack type rule_t into struct rule 2018-09-16 02:58:27 +02:00
sh!zeeg
aa5ccd7dd7 per section 'frame_color' parameter 2018-03-08 21:33:28 +03:00
Benedikt Heine
bda8c1dbb2 Add rule to show notification on fullscreen 2018-02-25 20:18:40 +01:00
Benedikt Heine
d91053c85e Use enum for urgency 2017-11-16 17:10:28 +01:00
Benedikt Heine
956b5c6401 Use gint64 as microseconds for internal timeunit
time(NULL) is vulnerable against timeshifts by NTP, timezones,...

g_get_monotonic_time() is not, but counts its in microseconds with the
gint64 datatype. To prevent any conversion bugs, all internal
timeformats are now using a gint64 and only get converted during import
or export (DBus notification arrives, configuration reading, age
threshold display).
2017-10-07 17:46:21 +02:00
Nikos Tsipinakis
16bbde5bf3 Merge pull request #343 from bebehei/transient-notifications
add support for transient hints
2017-09-07 14:01:19 +03:00
Benedikt Heine
759aa518d5 Refactor star scheme of pointers
To achieve a consistent scheme, all stars of the
pointers should be on the side of the variable and
not on the side of the type.

wrong: char* a
wrong: char * a
good:  char *a

This commit is generated by the following sed command
with manual fixes of all false positives.

find src \( -name '*.c' -or -name '*.h' \) -print0
| xargs -0 -n1 sed -i
's/\([a-zA-Z]\+[-_a-zA-Z0-9]*\)\s*\*\s\+
\([a-zA-Z]\+[-_a-zA-Z0-9]*\)/\1 *\2/g'
2017-09-06 23:14:25 +02:00
Benedikt Heine
d4f6726944 Add rule to ignore transient settings 2017-08-19 12:46:33 +02:00
John Chen
7037afb2bc Fix include. Add empty lines between include layers. 2017-02-14 00:39:04 +08:00
Eizen
ceddf57a31 Add history_ignore rule
Fixes #197
2017-02-11 15:35:32 -03: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
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