small bugfixes

This commit is contained in:
progandy 2012-10-08 12:39:49 +02:00
parent bcd3a79b1c
commit 0e063637db
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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);