68 Commits

Author SHA1 Message Date
Nikos Tsipinakis
8f9e85f122 Fix incorrect handling of 'do_action, close' mouse action (again!) 2020-12-17 19:49:26 +02:00
Nikos Tsipinakis
3d3ba4b9c5
Merge pull request #775 from fwSmit/progress-bar
Add progress bar
2020-11-10 11:55:02 +02:00
fwsmit
bfcf655b1e Add feature: progress bar 2020-11-06 14:25:04 +01:00
fwsmit
55d700f746 Add filetype to vim modeline 2020-11-02 20:25:26 +01:00
Djeeberjr
1b8f56eb45 changed script_run back to bool 2020-07-18 15:51:04 +02:00
Djeeberjr
4d66a60a4f multiple scripts for notification 2020-07-12 00:50:52 +02:00
Nikos Tsipinakis
69e319c729 Invalidate actions after notification is closed 2020-03-31 15:27:16 +02:00
Nikos Tsipinakis
700a3225f2 Increase notification character limit
Fixes #636
2019-06-18 14:16:32 +03:00
Michael Sloan
977a7a7ea4 New rule option: skip_display 2019-01-30 23:50:33 -08:00
Benedikt Heine
1e82c761c9 Add support for desktop-entry hints 2019-01-25 07:59:01 +01:00
Benedikt Heine
6f8b53c4e8 Compare raw icons by their checksums
Currently, we just skipped the notification comparison, if the
notification had a raw icon attached. This is a bit counterintuitive.

Calculating a checksum of the raw icon's data is the solution.

For that we cache the pixel buffer and introduce a field, which saves
the current icon's id. The icon_id may be a path or a hash.
So you can compare two notifications by their icon_id field regardless
of their icon type by their icon_id field.
2019-01-11 13:10:37 +01:00
Benedikt Heine
cd09d5a88e Cache GdkPixbuf in notification structure 2019-01-07 17:56:00 +01:00
Benedikt Heine
088907488c Rename icon field to iconname 2019-01-07 17:56:00 +01:00
Benedikt Heine
52885ca6ad Use a hashtable for notification actions
As g_strv_contains is only available in GLib >= 2.44, we have to bump
the GLib requirements and the CI distros, too.
2018-12-29 14:30:55 +01:00
Benedikt Heine
3e205ff159 Use notification_colors struct in settings 2018-11-26 18:17:00 +01:00
Benedikt Heine
c3cd623f41 Use notification_colors struct for notification colors 2018-11-26 17:31:46 +01:00
Jordan Galby
d879d70da0 Implement stack_tag, implementing x-canonical-private-synchronous
Implements "x-dunst-stack-tag", "x-canonical-private-synchronous",
"private-synchronous", and "synchronous" hints via the "stack_tag" feature.
2018-11-10 14:59:32 +01:00
Benedikt Heine
52c47524f2 Test notification referencing 2018-10-08 18:27:11 +02:00
Benedikt Heine
974bcb776e Remember if the notification is living on a valid connection
The notification spec says, that a notification gets invalidated when
closed. So the client won't listen anymore to ActionInvoked signals and
won't listen to NotificationClosed signals.

Remembering the actual status of the notification helps the standard and
makes the behavior clearer.
2018-10-06 13:44:01 +02:00
Benedikt Heine
837b4fe125 Implement refcounting for notifications 2018-10-06 13:43:49 +02:00
Benedikt Heine
bbbddad3a7 Use structs for notifications 2018-09-16 02:58:31 +02:00
Benedikt Heine
de0f0bf3d9 Pack type RawImage into raw_image struct 2018-09-16 02:58:26 +02:00
Benedikt Heine
8010f83286 Pack Actions type into struct actions 2018-09-16 02:58:23 +02:00
Benedikt Heine
c692d222d7 Save the notification's scriptrun in script_run field 2018-09-13 11:14:33 +02:00
Benedikt Heine
646d037b15 Make NULL a valid input for notification_free 2018-07-10 13:23:12 +02:00
Benedikt Heine
54ce81ccca Convert notification.[ch] into docstrings 2018-07-10 13:23:12 +02:00
Benedikt Heine
7187290536 Turn read only fields into const 2018-07-10 13:23:05 +02:00
Benedikt Heine
e091dd4d15 Notification comparison done right 2018-07-07 11:51:14 +02:00
Benedikt Heine
aa5cc977cc Add pushback mode 2018-02-25 20:18:40 +01:00
Benedikt Heine
0f46564e97 Print fullscreen value of notification 2018-02-25 20:18:40 +01:00
Benedikt Heine
bda8c1dbb2 Add rule to show notification on fullscreen 2018-02-25 20:18:40 +01:00
Benedikt Heine
422f353243 Add initial doxygen documentation 2018-02-22 20:08:00 +01:00
Benedikt Heine
b97a49c09b Fix memory leak colors given via hints
The hints given via DBus are not constants. Therefore the color fields
have to get freed during notification cleanup. As it's not possible to
disinguish, which field is constant, we have to duplicate the settings
on assignment.
2017-12-15 00:16:31 +01:00
Benedikt Heine
acd8be51ab Remove a and img tags from msg
While the notification spec allows tags like <a href="...">...</a> and
<img src="..." alt="...">, pango cannot parse these tags and therefore
these tags should be removed before passed to pango.

Also the method notification_extract_markup_urls is not needed anymore,
as markup_strip_a can return URLs optionally.

This implies, that URL replacement is now indicated via show_indicators
for URLs and the dmenu string is in the format of
'[text between a tags] URL\n'. This is similarly handled for images,
too.
2017-12-15 00:16:31 +01:00
Benedikt Heine
eae071f330 Rename color_strings to colors
This is an antipattern and makes linelength increase for nothing
2017-11-25 10:58:25 +01:00
Benedikt Heine
d190af6db1 Restructure notification struct and add comments 2017-11-25 10:58:25 +01:00
Benedikt Heine
fc4f0a4238 Refactor arguments into one line
Parameters should not cover an area. All arguments should be on a single
line (either horizontally or vertically).
2017-11-25 01:32:06 +01:00
Benedikt Heine
823665a3bd Sanitize negative urgency correctly 2017-11-21 16:19:40 +01:00
Benedikt Heine
5f51147263 Prefix urgency enum with URG_ 2017-11-16 17:12:30 +01:00
Benedikt Heine
d91053c85e Use enum for urgency 2017-11-16 17:10:28 +01:00
Nikos Tsipinakis
76857b6e7c
Merge pull request #423 from bebehei/optimize_icons
Optimize icons
2017-11-02 07:54:41 +02:00
Benedikt Heine
11af7402fa Use '-1' for undefined progress 2017-10-31 15:58:41 +01:00
Benedikt Heine
b571698f52 Free Actions in separate method
Also free the memory of the actual Action.
2017-10-31 12:49:19 +01:00
Benedikt Heine
23cae3110d Optimize out icon_overridden
There is no need save if the icon field should have precedence, as
setting raw_icon to NULL emphasizes the same.

Also freeing raw_icon saves unneccessary memory.
2017-10-31 12:49:16 +01:00
Benedikt Heine
13ed6301d8 Add separate function to free RawImage 2017-10-31 12:49:07 +01:00
Benedikt Heine
f869175d0d Move id assignment to separate function in queues.c
Move all id-changing functions out of notification_init and handle this
in queues.c

Also use stack_duplicates in combination with replacement of
notifications correctly. Fixes #404 (issue not found)
2017-10-29 20:38:40 +01:00
Benedikt Heine
a7003e3616 Refactor: Move queue specific methods to queues.c 2017-10-29 20:38:40 +01:00
Benedikt Heine
1f0e8d2181 overhaul get_sleep_time 2017-10-07 17:46:24 +02: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
Benedikt Heine
d6c1fbb556 Remove unused struct fields 2017-10-06 18:33:56 +02:00