summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-04-27 17:30:43 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-04-27 17:30:43 +0200
commit3662e2cdfc9a3855ea16053fde3926a9842e2bc6 (patch)
tree802d86d29eaae25e18fc30ee563646fc50f281e0
parentbbf4048065cafcc55c186468b0a1cfc1a1bc2236 (diff)
downloadudev-block-notify-3662e2cdfc9a3855ea16053fde3926a9842e2bc6.tar.gz
udev-block-notify-3662e2cdfc9a3855ea16053fde3926a9842e2bc6.tar.zst
set properties only once
-rw-r--r--udev-block-notify.c5
1 files 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) {