From 3662e2cdfc9a3855ea16053fde3926a9842e2bc6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sat, 27 Apr 2013 17:30:43 +0200 Subject: set properties only once --- udev-block-notify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/udev-block-notify.c b/udev-block-notify.c index 5f1d786..19a1506 100644 --- a/udev-block-notify.c +++ b/udev-block-notify.c @@ -161,6 +161,9 @@ int main (int argc, char ** argv) { if (notificationref[major][minor] == NULL) { notification = notify_notification_new(TEXT_TOPIC, notifystr, icon); + notify_notification_set_category(notification, PROGNAME); + notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); + notificationref[major][minor] = notification; } else { notification = notificationref[major][minor]; @@ -168,8 +171,6 @@ int main (int argc, char ** argv) { } 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-54-g00ecf