diff options
author | Christian Hesse <mail@eworm.de> | 2018-05-28 15:50:15 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-05-28 15:52:01 +0200 |
commit | 6ff60a4a018cbbcf8fad562d000f14f1607c2f4e (patch) | |
tree | 9766ab97010126cea4e9f77ab2b58d5578db06e7 /mpd-notification.c | |
parent | 73c75b27cb62fc75d249a68802adb91c43206fba (diff) | |
download | mpd-notification-6ff60a4a018cbbcf8fad562d000f14f1607c2f4e.tar.gz mpd-notification-6ff60a4a018cbbcf8fad562d000f14f1607c2f4e.tar.zst |
set notification timeout once
Diffstat (limited to 'mpd-notification.c')
-rw-r--r-- | mpd-notification.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mpd-notification.c b/mpd-notification.c index c0d8ced..1bdb55a 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -377,7 +377,8 @@ int main(int argc, char ** argv) { notify_notification_new(TEXT_TOPIC, TEXT_NONE, ICON_AUDIO_X_GENERIC, NULL); # endif notify_notification_set_category(notification, PROGNAME); - notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); + notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL); + notify_notification_set_timeout(notification, notification_timeout * 1000); signal(SIGHUP, received_signal); signal(SIGINT, received_signal); @@ -476,8 +477,6 @@ int main(int argc, char ** argv) { /* Call this unconditionally! When pixbuf is NULL this clears old image. */ notify_notification_set_image_from_pixbuf(notification, pixbuf); - notify_notification_set_timeout(notification, notification_timeout * 1000); - while(notify_notification_show(notification, &error) == FALSE) { if (errcount > 1) { fprintf(stderr, "%s: Looks like we can not reconnect to notification daemon... Exiting.\n", program); |