981 Commits

Author SHA1 Message Date
Steven Allen
46e0a0e668 Add dunst documentation to the systemd unit. 2017-02-18 14:24:02 -08:00
Steven Allen
3775b44339 Change the systemd unit's WantedBy to default.target
multi-user.target isn't a valid user target and it doesn't make sense to run
dunst as a system service.

Eventually, this unit should probably be converted to use
graphical-session.target but it's a bit unclear how that's supposed to work
right now.
2017-02-18 14:20:40 -08:00
Steven Allen
6f45c6926d Change the systemd service to a dbus unit 2017-02-18 14:17:38 -08:00
Nikos Tsipinakis
6288fab2d1 Merge pull request #295 from Stebalien/patch-1
Allow dunst to be managed by systemd
2017-02-17 20:34:08 +02:00
Nikos Tsipinakis
f5a7f0359e Merge pull request #296 from quite/verbose
Makefile: just be verbose
2017-02-17 18:42:50 +02:00
Steven Allen
f995f1c607 Allow dunst to be managed by systemd
This should have no effect on systems without systemd; it just causes dunst to be started through systemd when possible.
2017-02-15 14:17:39 -08:00
Daniel Lublin
2cf42f3299 Makefile: just be verbose
Show what is happening during build etc, the way most other make-based
projects do.

There is thus no need for the options target. Additionally, this target
caused unnecessary rebuilds of ./dunst each and every time, even on
`make install`.
2017-02-15 13:31:51 +01:00
Nikos Tsipinakis
21b4194031 Merge pull request #292 from johnchen902/cleandebt
Fix `#include`s and use only glib for memory management
2017-02-14 18:51:15 +02:00
John Chen
8ba62dc78a Use g_malloc0 where appropriate; remove unneeded null check 2017-02-14 00:45:02 +08:00
John Chen
656846900a Fix missing * in option_parser.c 2017-02-14 00:45:02 +08:00
John Chen
17e2929ee7 Change malloc and related functions to glib ones.
* malloc  -> g_malloc
* realloc -> g_realloc
* free    -> g_free
* strdup  -> g_strdup
* strndup -> g_strndup
2017-02-14 00:44:53 +08:00
John Chen
7037afb2bc Fix include. Add empty lines between include layers. 2017-02-14 00:39:04 +08:00
Nikos Tsipinakis
50fd0fae9b Add missing dashes in the changelog
Add missing dashes separating the version number and the release date in
the changelog.
2017-02-12 21:35:38 +02:00
Nikos Tsipinakis
eb2fda4bde Default to the config.h default if markup is not set
If neither the new 'markup' option is set nor 'allow_markup' then
default to whatever mode is set in config.h.
2017-02-12 21:27:55 +02:00
Nikos Tsipinakis
faea58159c Don't try to parse previously non-existent 'allow_markup' cmdline argument 2017-02-12 21:23:34 +02:00
Nikos Tsipinakis
149f12ee16 Switch changelog to markdown format
* Actually update the changelog contents with all the changes since the
  last release
* Add release date for all previous releases
2017-02-12 21:23:34 +02:00
Nikos Tsipinakis
345a821d86 Use stdlibs boolean macros rather than Xlibs
'True' and 'False' are defined in Xlib.h

Since we use stdbool boolean 'true' and 'false' definitions in several
places, it's best not to mix boolean macros. So in the sake of
consistency switch to using the stdbool macros project-wide.
2017-02-12 21:17:38 +02:00
Nikos Tsipinakis
de20697a69 Rename hide_duplicates_count -> hide_duplicate_count 2017-02-12 21:17:38 +02:00
Eizen
ceddf57a31 Add history_ignore rule
Fixes #197
2017-02-11 15:35:32 -03:00
Eizen
3ef15065a3 Fix ignore_newline regardless of markup
Fix issue where ignore_newline wouldn't work with other markup options. Fixes #293
2017-02-11 15:33:59 -03:00
Nikos Tsipinakis
956f91f6a4 Fix issue with loading config files with lines bigger than BUFSIZ
To load each line of the configuration file we were previously using a
simple buffer of length BUFSIZ. BUFSIZ is a macro provided by glibc as
the 'recommended length for a buffer'. But since one of our users
encountered a situation where really long config lines were necessary
it's time to change that behaviour.

This commit changes the line reading from using fgets with a character
limit of BUFSIZ to simply using getline.

We initialize the buffer pointer to NULL since getline will
automatically allocate a big enough buffer for us if it's passed a NULL
pointer. After that we pass the same buffer pointer again since,
according to the getline manpage, getline will also call realloc on the
buffer if necessary. Which means the only thing we have to do is call
free() at the end of the parsing process.

Fixes #294
2017-02-11 18:00:11 +02:00
Nikos Tsipinakis
42a641c728 Take allow_markup into account if markup is not set
Preserve backwards compatibility for now, this might be removed for the
3.0 release later on.
2017-02-08 20:55:48 +02:00
Nikos Tsipinakis
3024aed739 Use MARKUP_NULL in the default rules
Fix regression that can cause an underflow by setting the markup_level
enum to a static value(-1).
2017-02-08 20:50:23 +02:00
Eizen
ec96871a0f Fix icon alignment with dynamic width 2017-02-06 17:11:26 -03:00
Nikos Tsipinakis
3f5257f285 Remove unused function string_to_argv 2017-02-05 13:05:52 +02:00
Nikos Tsipinakis
0c49b49254 Replace string_to_argv util function with g_shell_parse_argv
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.
2017-02-05 13:00:59 +02:00
Nikos Tsipinakis
f0808f8d3f Fix alignment setting documentation
`alignment` specifies the alignment of the text within the notifications,
not the alignment of the notifications themselves.
2017-02-05 13:00:59 +02:00
Nikos Tsipinakis
38856bc705 Fix wrong config path in notification test suite 2017-02-05 13:00:59 +02:00
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
Eizen
51d5e57967 Update changelog and man page 2017-02-04 22:24:33 -03:00
Nikos Tsipinakis
d445661031 Add simple test for notification_replace_format 2017-02-04 22:10:51 +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
4aa4e93123 Format the settings file better 2017-02-04 22:10:51 +02:00
Eizen
0c7406f1ba Merge pull request #290 from 'EdwardBetts-master' 2017-02-01 12:45:18 -03:00
Edward Betts
d73526975e fix spelling mistakes 2017-02-01 10:02:01 +00:00
Eizen
c7a19d9eb8 Update Changelog 2017-01-30 16:36:15 -03:00
Eizen
36ad645c47 Update Readme 2017-01-29 16:18:22 -03:00
Nikos Tsipinakis
3126714b79 Merge pull request #287 from fkmclane/patch-1
fix 'always_run_script' typo
2017-01-29 19:48:42 +02:00
Foster McLane
d6e2e70cd8 fix 'always_run_script' typo 2017-01-29 12:30:24 -05:00
Nikos Tsipinakis
0deff4412e Add initial notification test suite
The beginnings of the notification test suite, currently only includes
tests for `notification_is_duplicate`.
2017-01-29 15:32:36 +02:00
Nikos Tsipinakis
a788770a0f Add the ability to call load_settings more than once
free_ini() didn't properly reset `section_count` and `sections` which
caused a segfault if load_ini_file was called multiple times in the same
run.
2017-01-29 15:32:36 +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
f34b846041 Fix memory leaks in the unit tests
Making valgrind complain less should help finding actual memory leaks in
the long run.
2017-01-29 15:32:36 +02:00
Nikos Tsipinakis
a3cce0ec2f Add raw_icon and timeout to notification printout 2017-01-28 12:16:20 +02:00
Nikos Tsipinakis
1e735c69a6 Merge pull request #285 from Stebalien/fix-double-free
Fix a double free in on_get_capabilities.
2017-01-27 16:48:29 +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
Eizen
5e9c3cbc95 Fix Readme
Github markdown doesn't support irc URI scheme. Move issue tracker link to the end.
2017-01-23 17:00:47 -03:00
Eizen
97bc56847b Update README
Replace old issue tracker link. Add travis status image. Add missing dependency.
2017-01-23 16:39:34 -03:00
Nikos Tsipinakis
4afe2b6924 Vertically align icons 2017-01-21 09:37:02 +02:00