From 956a318ea52e13c47b5a758cade34dba6adf2db9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sat, 27 Apr 2013 17:35:31 +0200 Subject: set properties only once --- mpd-notification.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpd-notification.c b/mpd-notification.c index dbdefb3..e03e986 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -53,6 +53,8 @@ int main(int argc, char ** argv) { } notification = notify_notification_new(TEXT_TOPIC, NULL, ICON_SOUND); + notify_notification_set_category(notification, PROGNAME); + notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); while(mpd_run_idle_mask(conn, MPD_IDLE_PLAYER)) { mpd_command_list_begin(conn, true); @@ -91,8 +93,6 @@ int main(int argc, char ** argv) { notify_notification_update(notification, TEXT_TOPIC, notifystr, ICON_SOUND); notify_notification_set_timeout(notification, NOTIFICATION_TIMEOUT); - notify_notification_set_category(notification, PROGNAME); - notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); while(!notify_notification_show(notification, &error)) { if (errcount > 1) { -- cgit v1.2.3-70-g09d2