Show both summary and body of notifications, and support body-markup

Previously we were only showing the summary for notifications, but most
notifications only make sense if you show both.

https://bugzilla.gnome.org/show_bug.cgi?id=606331
This commit is contained in:
Dan Winship
2010-01-07 12:08:19 -05:00
parent 4ab513ca77
commit a424bbbabf
3 changed files with 33 additions and 5 deletions

View File

@ -44,7 +44,11 @@ NotificationBox.prototype = {
setContent: function(notification) {
this._iconBox.child = notification.icon;
this._text.text = notification.text;
// Support <b>, <i>, and <u>, escape anything else
// so it displays as raw markup.
let markup = notification.text.replace(/<(\/?[^biu]>|[^>\/][^>])/g, "&lt;$1");
this._text.clutter_text.set_markup(markup);
}
};