1095 Commits

Author SHA1 Message Date
Benedikt Heine
3b6c5299be Use void as argument for parameterless functions 2018-02-20 16:24:00 +01:00
Benedikt Heine
c3e8bedfab
Merge pull request #474 from bebehei/logging
Logging with GLib
2018-02-12 13:13:37 +01:00
Benedikt Heine
6402218205 Remove negative NULL-check warning
According to the docs in the GSourceFuncs, the timeout_ parameter can be
NULL. But when it's NULL, it would be equivalent to an invocation to
return -1 as timeout_ and FALSE as return value. This is exactly the
same, what we're doing if timeout_ is not NULL.
2018-02-02 17:29:05 +01:00
Benedikt Heine
1e6a15de00 Fix memleak 2018-02-02 17:29:05 +01:00
Benedikt Heine
280ec456a4 Allow to set the log level via options 2018-02-02 17:29:04 +01:00
Benedikt Heine
38dced7591 Translate last unusual logging calls 2018-02-02 17:29:04 +01:00
Benedikt Heine
58dc09b415 Replace PERR macro with appropriate logging macro 2018-02-02 17:29:04 +01:00
Benedikt Heine
19b364d67c Translate fprintf statements into log messages 2018-02-02 17:29:04 +01:00
Benedikt Heine
b5516be360 Add guidelines for logging messages 2018-02-02 17:29:04 +01:00
Benedikt Heine
020a90e521 Replace die method with appropriate critical log 2018-02-02 17:29:04 +01:00
Benedikt Heine
2c503c2984 Add option to suppress log output when testing 2018-02-02 17:29:04 +01:00
Benedikt Heine
cad2ac34f9 Add GLib logging capabilities 2018-02-02 17:29:04 +01:00
Nikos Tsipinakis
75c8f56137
Merge pull request #488 from stapelberg/patch-1
Fix race condition resulting in the service file being empty in some cases.
2018-01-30 09:07:17 +02:00
Michael Stapelberg
ac6086198e
Makefile: correct dependencies to fix race condition
Before this commit, when building dunst in parallel, org.knopwob.dunst.service might get installed as an empty file. See https://bugs.debian.org/888760
2018-01-29 16:53:08 +01:00
Benedikt Heine
4c6af492bd
Merge pull request #487 from alexeykovac/add-PKG_CONFIG
add PKG_CONFIG make variable
2018-01-26 02:52:37 +01:00
Alexey Kovac
68466f73ed add PKG_CONFIG make variable 2018-01-25 21:28:24 -02:00
Nikos Tsipinakis
8144a9541c
Merge pull request #485 from bebehei/submodules
Build dunst also as a git submodule
2018-01-17 11:28:30 +02:00
Benedikt Heine
370e6ede70 Build dunst also as a git submodule
Git submodules have the property to have .git symlinked into the main
.git folder. On a symlink, the traling dot of a wildcard doesn't work.
2018-01-16 15:03:55 +01:00
Nikos Tsipinakis
d25404d590
Merge pull request #482 from bebehei/execvp-errorhandler
Handle execvp error in open_browser
2018-01-15 17:30:27 +02:00
Benedikt Heine
7bfb0b9b5f Handle execvp error when opening dmenu
The execvp function usually doesn't return and exits by itself. But,
when having an error, it returns. A faulty dmenu setting could trigger
this and stop dunst receiving signals.
2018-01-14 00:50:10 +01:00
Benedikt Heine
87c0fd4d90 Don't overwrite settings in children
string_append frees the first argument. While it's a setting,
settings.browser will contain a false dangling pointer.
2018-01-13 23:52:40 +01:00
Benedikt Heine
b209d06963 Handle execvp error in open_browser
The execvp function usually doesn't return and exits by itself. But,
when having an error, it returns. As a faulty browser setting could
trigger this, dunst has to handle this, as the forked child wants to
access the X11 server too, resulting in XIO errors.

Fixes #476
2018-01-13 15:18:02 +01:00
Benedikt Heine
f7cf5b6f5b
Merge pull request #471 from tsipinakis/feature/raise-progress-limit
Raise the maximum value of the progress hint
2018-01-07 15:44:29 +01:00
Nikos Tsipinakis
337d0a9cd1 Raise the maximum value of the progress hint
The progress hint is mostly used for progress bars but as discussed in
 #437 there are cases where values > 100 make sense.

Fixes #437
2018-01-05 21:55:15 +02:00
Nikos Tsipinakis
18df78c115
Merge pull request #468 from bebehei/dbus-acquisition-message
Improve wording of DBus name lost error message
2018-01-05 21:50:36 +02:00
Nikos Tsipinakis
a4a38d4467 Start new release cycle
Switch default version string back to the `-non-git` prefix to indicate
an indev version.

Additionally fix the formatting of the 1.3 header in the changelog.
2018-01-05 21:05:53 +02:00
Nikos Tsipinakis
10ee1782d9 Dunst v1.3.0 v1.3.0 2018-01-05 20:56:16 +02:00
Nikos Tsipinakis
6444f1ffa7 Update changelog 2018-01-05 20:32:28 +02:00
Nikos Tsipinakis
630fd7fe03 Point out that make calls should use the same vars in README 2018-01-05 20:25:46 +02:00
Benedikt Heine
5f4d9c6685 Query the Notification Server name when dying 2018-01-05 18:13:26 +01:00
Nikos Tsipinakis
db0796b73d
Merge pull request #466 from bebehei/stdinconfig
Interpret - as STDIN config file
2018-01-05 18:05:04 +02:00
Benedikt Heine
65043c00d4
Merge pull request #463 from bebehei/serviceprefix
Add configurable path variables for services
2017-12-29 00:49:02 +01:00
Benedikt Heine
b1aaee38f7
Merge pull request #376 from bebehei/drop-gtk
Drop gtk and use gdk-pixbuf
2017-12-26 15:33:29 +01:00
Benedikt Heine
85da5d788b Add build documentation 2017-12-26 03:31:06 +01:00
Benedikt Heine
de09b5a87d Do not create directories separately 2017-12-26 03:31:06 +01:00
Benedikt Heine
573ea1de20 Use systemd as a soft dependency
Dunst does not neccessarily need systemd. Dunst gets started primarily
via DBus. The systemd service is useful on systemd init based systems,
but won't have any impact on non-systemd systems.

To make systemd a soft dependency is neccessary, as pkg-config now also
queries the systemd.pc file, which won't exist on non systemd systems.
2017-12-26 03:31:06 +01:00
Benedikt Heine
8f17d6026b Add configurable path variables for services
Setting PREFIX to a location different to /usr, the install routine
fails to install the systemd and dbus service files. These are
installed, but in the PREFIX directory and not /usr. DBus and systemd
usually only read their files from /usr/ and ignore files in /usr/local.

Now by default, we're asking pkg-config, where to install it. Mostly,
this will be /usr and this conflicts the FHS. But it's the user's intent
to install dunst and (possibly) override the package manager's files
belonging to dunst.

At the current point, even DBus ignores the PREFIX and installs its
systemd service file to the location specified by pkg-config.
2017-12-26 01:35:14 +01:00
Benedikt Heine
8f5afaafb6 Do not redraw window on PropertyChange
When receiving a PropertyChange XEvent, it's mostly because the focus of
another window changed to another window. This isn't actually neccessary
for dunst. We need the event only, to know, when the screens have
switched.

As redrawing the screen became more expensive with the drop of GTK3, we
have to ignore this event and only really redraw the window, when the
focus has moved to another screen.
2017-12-25 15:53:20 +01:00
Nikos Tsipinakis
5009d444aa
Merge pull request #465 from bebehei/run
Make run static to not export it
2017-12-23 09:34:29 +02:00
Benedikt Heine
b337fdfefa Interpret - as STDIN config file 2017-12-23 02:09:32 +01:00
Benedikt Heine
a5d722799e Insert actual screen number into screen info struct
The screen info struct contained always a 0 in its screen number field.
So it always had been scr1 == scr2.
2017-12-22 22:27:09 +01:00
Benedikt Heine
d7ec8bf165 Explain counterintuitive gdk pixbuf conversion 2017-12-22 22:27:08 +01:00
Benedikt Heine
a6dea0cc35 Use GByteArray for bytebuffer in pixbuf conversion 2017-12-22 22:27:08 +01:00
Nikos Tsipinakis
0afdda11f3 Drop dependency on gtk3
As per discussion in #334 drop dependency on gtk3 and instead depend
only on gdk-pixbuf2 for icon loading.

The only gtk3 function used was gdk_cairo_set_source_pixbuf in order to
convert the loaded pixbufs into cairo surfaces for us to render. In
order to drop the dependency this step was bypassed by using pixbufs
export to png capability and importing it into cairo via a pngstream.
2017-12-22 22:27:08 +01:00
Benedikt Heine
6424f1a07b Make run static to not export it
This enforces to call wake_up in other files and not run(NULL).
2017-12-22 22:24:21 +01:00
Nikos Tsipinakis
4908a75a89
Merge pull request #460 from bebehei/dbus
Output the PID of the current FDN daemon
2017-12-21 16:34:48 +02:00
Nikos Tsipinakis
5a9f37b07f
Merge pull request #462 from bebehei/valgrind
Add valgrind to travis configuration and check for leaks
2017-12-19 19:19:07 +02:00
Benedikt Heine
48ec829c74 Do not move memory to itself
To move the memory is only needed, when the memory is really freshly
allocated.
2017-12-19 11:50:03 +01:00
Benedikt Heine
1d39aa348c Add valgrind to travis configuration and check for leaks 2017-12-19 11:37:28 +01:00
Benedikt Heine
3c7f8409f0 Output the PID of the current FDN daemon
When the DBus name lost function is called, either the whole DBus
connection is lost, or another rivaling FDN daemon acquired the name.
Without enough experience, this is impossible to trace back and examine
further.

To make it easier for new users, dunst prints out the PID of the
process, which currently acquired the FDN DBus name.
2017-12-19 10:04:03 +01:00