calendar: Filter out newlines when unexpanded

Enabling line-wrapping of the unexpanded body is not enough to enforce
a single line when the text has embedded newlines, so replace these with
spaces (this is similar to setting ClutterText:single-line-mode, however
that would use a paragraph separator glyph instead).
This commit is contained in:
Florian Müllner 2015-03-10 23:36:09 +01:00
parent 4253df6463
commit b18240370d

View File

@ -1044,7 +1044,7 @@ const Message = new Lang.Class({
setBody: function(text) {
this._bodyText = text;
this.bodyLabel.setMarkup(text, this._useBodyMarkup);
this.bodyLabel.setMarkup(text.replace(/\n/g, ' '), this._useBodyMarkup);
},
setUseBodyMarkup: function(enable) {