aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-04-27 17:35:31 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-04-27 17:35:31 +0200
commit956a318ea52e13c47b5a758cade34dba6adf2db9 (patch)
tree0cc8ebfdec71397e643c2e5fd623d1c7be57f5c8
parentf6e340cb6755235585f738d6ffb4f02a4c000139 (diff)
downloadmpd-notification-956a318ea52e13c47b5a758cade34dba6adf2db9.tar.gz
mpd-notification-956a318ea52e13c47b5a758cade34dba6adf2db9.tar.zst
set properties only once
-rw-r--r--mpd-notification.c4
1 files 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) {