981 Commits

Author SHA1 Message Date
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
Nikos Tsipinakis
842a35db06 Make per_monitor_dpi take precedence over Xft.dpi
If the per-monitor dpi feature has been enabled it shouldn't be overridden
just because an Xft.dpi value is set, it's possibly for other programs
that don't have such a feature.
2017-07-11 10:12:56 +03:00
Nikos Tsipinakis
c547f6eec9 Add force_xinerama option
Since after the release a lot of downstream users will not be building
from source, it makes a lot more sense to have an option to fall back to
the Xinerama extension for those that are still on systems that do not
support RandR.
2017-07-10 14:38:20 +03:00
Nikos Tsipinakis
44ac026d97 Add format string for raw progress value
While it's not the best solution, it should cover most use cases where a
custom format on the progress value is required. If any further
customization is needed, the only current alternative is to use rules
to override the format.

Closes #273
2017-07-09 20:20:49 +03:00
Nikos Tsipinakis
d206f2445f Merge pull request #332 from bebehei/fieldlength-max
limit length of single fields in notification
2017-07-09 19:46:31 +03:00
Benedikt Heine
717c747a8c truncate overlong messages (fixes #248)
Displaying too heavy notifications can DoS dunst. For example bad
programs, which pipe raw image data into the notification.
Limiting the maximum character length to 5000 circumvents this.

5000 should be ridiculously high to prevent DoS while still not
truncating all correct notifications.
2017-07-09 16:34:47 +02:00
Nikos Tsipinakis
abc5436e0e Move systemd service file to the root directory
Since the systemd service is installed by default and officially
supported there is no reason for it to be in the contrib directory.
2017-07-08 12:33:04 +03:00
Nikos Tsipinakis
b2a6dbd0a4 Rename image files in documentation 2017-07-08 12:26:09 +03:00
Nikos Tsipinakis
a08fba49d0 Remove bounce setting
Bounce was functionally removed in
b2883b213342c912a76329bb8f6c179ea3451ae5 during the transition from Xft
to Cairo without any mention. There is no use to keeping it in the example dunstrc
and storing the value in the code,

This commit will probably be reversed if and when bounce is
re-implemented.
2017-07-03 15:36:08 +03:00
Nikos Tsipinakis
264b546155 Rearrange the settings into groups
Rearrange the settings in the example dunstrc and the manpage into broad
categories according to the part of the program they affect: Display,
text, icons, history and misc.
2017-07-01 11:57:02 +03:00
Nikos Tsipinakis
5e2c781cba Move frame settings to the global section
There is no reason for the frame settings to have their own section
since it's not an area that will be expanded upon. Move them to the
global section to be consistent.
2017-07-01 11:56:15 +03:00
Nikos Tsipinakis
2927140d8b Merge pull request #330 from miseran/click_action
Allow middle click on notification to invoke action
2017-06-30 08:00:41 +03:00
Reto Schnyder
d9977cbb41 Handle clicks on release instead of press
This prevents the release event from going to the window behind if the
click closes the notification.
2017-06-29 20:04:14 +02:00
Reto Schnyder
c8e6f317ab Move url prefix removal to open_browser
This way, it also applies to middle clicks.
Incidentally, it seems this fixed a crash when opening <a href> urls.
2017-06-29 19:59:50 +02:00
Reto Schnyder
e04bfe0a58 Allow middle click on notification to invoke action
A middle click on an notification with a single or default action will
invoke it. If there are multiple actions and no default, the context
menu is opened. If there are no actions, proceed similarly with URLs.
2017-06-29 19:38:54 +02:00