diff --git a/dunst.c b/dunst.c index d500f21..70a1c55 100644 --- a/dunst.c +++ b/dunst.c @@ -908,11 +908,12 @@ int init_notification(notification * n, int id) n->msg = string_replace("%I", basename(n->icon), n->msg); n->msg = string_replace("%b", n->body, n->msg); if (n->progress) { - char pg[20]; + char pg[10]; sprintf(pg, "[%3d%%]", n->progress-1); n->msg = string_replace("%p", pg, n->msg); - } else + } else { n->msg = string_replace("%p", "", n->msg); + } n->msg = fix_markup(n->msg); diff --git a/dunst_dbus.c b/dunst_dbus.c index 9f8cfe5..8590af5 100644 --- a/dunst_dbus.c +++ b/dunst_dbus.c @@ -336,7 +336,7 @@ void notify(DBusMessage * dmsg) continue; } dbus_message_iter_get_basic(&hint, &hint_name); - _extract_hint(DBUS_TYPE_STRING, "urgency", hint_name, &hint, &urgency); + _extract_hint(DBUS_TYPE_BYTE, "urgency", hint_name, &hint, &urgency); _extract_hint(DBUS_TYPE_STRING, "fgcolor", hint_name, &hint, &fgcolor); _extract_hint(DBUS_TYPE_STRING, "bgcolor", hint_name, &hint, &bgcolor); _extract_hint(DBUS_TYPE_INT32, "value", hint_name, &hint, &progress);