E notification: Support newlines in notifications.

SVN revision: 66872
This commit is contained in:
Tom Hacohen 2012-01-04 15:13:24 +00:00
parent 844eb83a38
commit 769348ef64
1 changed files with 10 additions and 1 deletions

View File

@ -586,5 +586,14 @@ _notification_format_message(Popup_Data *popup)
edje_object_part_text_set(o, "notification.text.title", title);
/* FIXME: Filter to only include allowed markup? */
edje_object_part_text_set(o, "notification.textblock.message", b);
{
/* We need to replace \n with <br>. FIXME: We need to handle all the
* newline kinds, and paragraph separator. ATM this will suffice. */
Eina_Strbuf *buf = eina_strbuf_new();
eina_strbuf_append(buf, b);
eina_strbuf_replace_all(buf, "\n", "<br>");
edje_object_part_text_set(o, "notification.textblock.message",
eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
}
}