112 Commits

Author SHA1 Message Date
Nikos Tsipinakis
f51f9a19b7 Add missing semicolon 2017-01-21 09:19:02 +02:00
Nikos Tsipinakis
bba3cfe700 Fix segfault when checking for duplicate notifications with raw icons
If a notification has a raw icon, icon is set to NULL which was passed
without checking to strcmp. We don't (yet) support comparing raw icons so
if a raw icon is set, we can safely assume the notification is not a
duplicate.
2017-01-21 09:13:03 +02:00
Nikos Tsipinakis
c4a002bc79 Initialise default icon before checking for duplicates
Since we are also comparing the icons, the icon path should be set
before the duplicate check is done
2017-01-16 17:46:06 +02:00
Nikos Tsipinakis
9ec8dbe5db Initialize null fields with sane defaults in notification_init 2017-01-01 20:04:59 +02:00
Nikos Tsipinakis
c6d783f5e2 Replace null checks with assert calls
In my opinion, it's better to crash early when something is wrong than
to pretend it never happened. This change will allow us to catch more
in the long run.
2017-01-01 17:15:29 +02:00
Nikos Tsipinakis
0cb1524cc6 Don't check return status of notification_create
notification_create is guaranteed to return a pointer to a notification,
if the memory allocation fails it throws an error and exits the program.
2017-01-01 17:05:25 +02:00
Nikos Tsipinakis
0a0c02021d Update functions in dbus.c to use camel_case for consistency 2016-12-22 20:00:45 +02:00
Nikos Tsipinakis
de9c52f98f Implement notification_create function
notification_create currently simply allocates memory and zeroes it to
properly initialise a notification. Since we currently have at least 2
places in the code that create notifications(startup notification in
dunst.c and notifications from dbus in dbus.c) the creation should be
handled from a central location in case we ever need to change the
creation procedure later on.
2016-12-22 19:49:29 +02:00
Nikos Tsipinakis
6c9de72c7d Don't consider notifications duplicate if icon or urgency differ
Expand the duplication checking functionality to also check for urgency
and icons. If icons are turned off in the settings the icon check is
skipped.

Icons matching is done based on the given path, if the path differs or
an icon name is used for one notification but an absolute path for
another, the icons are considered different even if they refer to the
same file.
2016-12-22 19:45:38 +02:00
Nikos Tsipinakis
a2e0a6efe7 Remove whitespace from empty line 2016-12-15 18:38:34 +02:00
Eizen
bfd24224aa Merge pull request #270 2016-12-13 20:36:55 -03:00
Nikos Tsipinakis
2df2e7d06c Move dunst source files to src/ 2016-11-19 11:54:03 +02:00