995 Commits

Author SHA1 Message Date
Benedikt Heine
1c7f674ee0 Correct indentation 2017-09-19 00:10:36 +02:00
Nikos Tsipinakis
2acc4be55b Merge pull request #372 from bmwiedemann/sort
Sort linker input file list
2017-09-13 07:56:46 +03:00
Bernhard M. Wiedemann
5df95513ec Sort linker input file list
so that dunst binaries build in a reproducible way
in spite of indeterministic filesystem readdir order

See https://reproducible-builds.org/ for why this is good.
2017-09-12 21:26:30 +02:00
Nikos Tsipinakis
29aa4c7ec8 Merge pull request #365 from bebehei/issue-322
Prevent replacement of format strings in message
2017-09-09 09:08:50 +03:00
Benedikt Heine
e16117ca30 Use double pointers for haystack 2017-09-07 15:25:54 +02:00
Benedikt Heine
4b7f656f6e Interpret '%%' as literal '%' in format 2017-09-07 15:25:21 +02:00
Benedikt Heine
ab9bf55892 Prevent replacement of format strings in message
To replace all occuring format strings inside the msg, replace_all had
been used previously. This leads to buggy behavior, if a format string
occurs in the replaced text, as the format string will get replaced
again under certain conditions.

Introducing a pointer, which skips the already replaced parts, will
prevent doubly replacing format strings from content.

Fixes #322
2017-09-07 15:25:14 +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
Nikos Tsipinakis
420feede39 Merge pull request #369 from bebehei/pointer-consistent-scheme
Refactor star scheme of pointers
2017-09-07 13:51:08 +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
Nikos Tsipinakis
06df0dca0e Merge pull request #367 from bebehei/config-modeline
Add vim modeline to config.def.h
2017-09-06 21:59:09 +03:00
Benedikt Heine
4e3eac094d Add vim modeline to config.def.h 2017-09-06 15:06:33 +02:00
Nikos Tsipinakis
aae003d023 Merge pull request #366 from bebehei/memory-leak_1
Fix memory leak in get_pixbuf_from_path
2017-09-01 11:02:51 +03:00
Benedikt Heine
a833b4a0f4 Fix memory leak in get_pixbuf_from_path
If the svg-file is not found, the string containing the svg ending is
never freed again.
2017-08-30 19:41:15 +02:00
Nikos Tsipinakis
eb0a0f8602 Fix infinite loop when checking timeouts
Move the iter pointer to the next item before doing any logic that might
result in exiting from the current iteration of the loop since it would
cause the same notification to be processed repeatedly resulting in an
infinite loop.

Fixes 362.
2017-08-19 20:37:54 +03:00
Benedikt Heine
289bab03e4 Chain history_ignore and transient together
If the transient hint is set on the notification, it should only be
valid as long as it shows up. So the pushing it to the history
makes no sense.

As it's no problem to change this individually by the rule system,
it's a sane default for history_ignore to default to the transient
option.
2017-08-19 12:46:35 +02:00
Benedikt Heine
2da6730e5a Add docs for transient rules 2017-08-19 12:46:35 +02:00
Benedikt Heine
d4f6726944 Add rule to ignore transient settings 2017-08-19 12:46:33 +02:00
Benedikt Heine
02ba060490 Refactor if chain to avoid nested statements 2017-08-19 12:46:00 +02:00
Benedikt Heine
585f0f85e0 Add support for transistent hints 2017-08-19 12:46:00 +02:00
Nikos Tsipinakis
3c257eaeb7 Merge pull request #351 from bebehei/wordexp
replace variables and ~ in script paths
2017-08-19 10:12:16 +03:00
Nikos Tsipinakis
18b06ed459 Merge pull request #354 from enodata/master
Add libgen.h include and guard against basename(3) modifying its arg
2017-08-16 10:51:10 +03:00
Benedikt Heine
7eb99ea64d add tests for *_get_path functions 2017-08-15 23:51:14 +02:00
Benedikt Heine
8e3a7586d1 replace ~/ in script paths 2017-08-15 23:35:02 +02:00
Dmitri Goutnik
bf98183098 Add libgen.h include and guard against basename(3) modifying its arg 2017-08-15 10:44:32 -05:00
Nikos Tsipinakis
99c74b8703 Merge pull request #352 from bebehei/nextiter
Optimize check_timeouts
2017-08-15 11:49:45 +03:00
Benedikt Heine
66fceb9661 handle removing of elements in GList correctly
When closing a notification in check_timeouts, iter will get removed
of the list and therefore iter->next is NULL at the end of the
loop. This requires calling check_timeouts again.

Shifting iter to iter->next before removing the notification, we can
avoid recalling check_timeouts and avoid processing the already
processed list again.
2017-08-14 11:00:33 +02:00
Nikos Tsipinakis
68aa1f2146 Merge pull request #353 from sfs/raw-icon-from-image_data
parse raw icons from the (deprecated) image_data attribute
2017-08-09 07:35:34 +03:00
Steven Schäfer
d61a6183a5 parse raw icons from the (deprecated) image_data attribute 2017-08-06 22:11:10 +02:00
Nikos Tsipinakis
f8aaa21a08 Merge pull request #348 from bebehei/usage-one-output
print usage only on stdout
2017-08-05 07:40:36 +03:00
Benedikt Heine
b7ff4f9f1f print usage only on stdout 2017-08-04 09:55:59 +02:00
Nikos Tsipinakis
111fcaf583 Merge pull request #333 from bebehei/gtk3
depend on gtk3 instead of gtk2
2017-08-01 19:30:41 +03:00
Nikos Tsipinakis
f14301292c Merge pull request #346 from bebehei/reorder-getopt
change order of option_get_* to be displayed during --help
2017-08-01 19:26:51 +03:00
Nikos Tsipinakis
72469264e7 Merge pull request #170 from lathan/not_windoze
Rename 'icon_folders' to 'icon_path'
2017-08-01 15:21:32 +03:00
George Angelopoulos
9acb9fd255 add backwards compatibility for icon_folders option
Existing configurations will continue to work but now print a warning.
New, icon_path option takes precedence if both options are used.
If icon_folders option is used, its usage string also appears in --help
output.
2017-08-01 12:51:00 +02:00
Benedikt Heine
677e1f14ca change order of option_get_* to be displayed during --help 2017-08-01 12:21:55 +02:00
George Angelopoulos
4d03acc454 replace 'folder' with 'path' in icon functionality
"folder" is more of a windows term. In unix we have paths and
directories.
2017-07-29 15:16:08 +02:00
Nikos Tsipinakis
7104c42151 Merge pull request #345 from bebehei/typo-1
fix typos and reformat print output
2017-07-25 07:45:55 +03:00
Benedikt Heine
7443021897 fix typos and reformat print output 2017-07-24 22:31:06 +02:00
Nikos Tsipinakis
9065f2f30a Merge pull request #342 from bebehei/readability-improvement
improve readability in dbus.c
2017-07-23 10:01:49 +03:00
Benedikt Heine
c9980347cf improve readability in dbus.c 2017-07-23 02:12:10 +02:00
Nikos Tsipinakis
86cbc1d34b Make icon set via rules take priority over raw icons
When a notification contains both a raw icon and an icon path according
to the GNOME notification specification the raw icon should take
priority over anything else.

If, however, a user uses the new_icon rule to set a custom icon on a
notification, that rule overwrote the icon path and not the raw icon
and as a result the raw icon was displayed in place of the user
specified one.

As a simple fix, a new icon_overridden boolean was added to the
notification struct indicating if a custom icon has been set. If so, the
icon path should take priority over the raw icon.

Fixes #339
2017-07-19 09:13:19 +03:00
Benedikt Heine
855d4bb860 depend on gtk3 instead of gtk2 2017-07-13 15:01:52 +02:00
Nikos Tsipinakis
b06475b4aa Remove remnants from the compile-time multi-monitor support
When the logic to use a setting to decide between RandR and xinerama
apparently the variable in config.mk and the travis tests were never
removed.
2017-07-12 16:45:04 +03:00
Nikos Tsipinakis
4573b92975 Start new release cycle
Update the default version name to non-git and add new unreleased
section to the changelog to start the new release cycle.
2017-07-12 16:42:31 +03:00
Nikos Tsipinakis
b069b2dba6 Dunst v1.2.0 v1.2.0 2017-07-12 11:22:04 +03:00
Nikos Tsipinakis
53d0b30e9a Update changelog with recent changes
Reword a few sections of the changelog & bring it up to date with recent
changes to prepare for a release.
2017-07-12 11:16:45 +03:00
Nikos Tsipinakis
1b6f9dbb29 Put the version in config.mk instead of a separate file
There is no need to have a separate VERSION file in release tarballs,
having the version in config.mk directly allows for a proper fallback in
case the git repository and the version file doesn't exists. The most
important example of this is the tarballs that github creates on every
release.
2017-07-12 11:15:22 +03:00
Nikos Tsipinakis
599db75401 Add deprecation warning for the frame section 2017-07-11 11:08:36 +03:00
Nikos Tsipinakis
79fec8a557 Change the default value of max_icon_size to 0
Since the behaviour of dunst in the last release was to display icons
as-is, we should try to preserve backwards compatibility as much as
possible. This commit may be reverted in the next major release.
2017-07-11 11:08:28 +03:00