don't display notifications with empty format

This commit is contained in:
Sascha Kruse 2012-08-31 02:51:32 +02:00
parent 8d8834a8f3
commit 8a3970f223
2 changed files with 14 additions and 1 deletions

View File

@ -966,7 +966,12 @@ int init_notification(notification * n, int id)
close_notification_by_id(id, -1);
}
l_push(notification_queue, n);
if(strlen(n->msg) == 0) {
close_notification(n, 2);
printf("skipping notification: %s %s\n", n->body, n->summary);
} else {
l_push(notification_queue, n);
}
return n->id;
}

View File

@ -120,6 +120,13 @@
# and you can override the 'timeout', 'urgency', 'foreground', 'background'
# and 'format'.
# Shell-like globbing will get expanded.
#
# NOTE: if you don't want a notification to be displayed, set the format to ""
#[ignore]
## This notification will not be displayed
# summary = "foobar"
# format = ""
#[signed_on]
# appname = Pidgin
@ -140,3 +147,4 @@
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#