[gnome-shell] [Notification] Replace all newlines in body with spaces
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [Notification] Replace all newlines in body with spaces
- Date: Sun, 21 Feb 2010 02:45:22 +0000 (UTC)
commit ec725cc6d4d56868ad973580d60cfe501080826f
Author: Florian Müllner <fmuellner src gnome org>
Date: Sat Feb 20 22:08:54 2010 +0100
[Notification] Replace all newlines in body with spaces
Accidentally we only replaced the first newline of the body text with
spaces - replace all occurrences instead.
https://bugzilla.gnome.org/show_bug.cgi?id=610549
js/ui/messageTray.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 06dd250..188a55f 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -116,7 +116,7 @@ Notification.prototype = {
y_fill: false });
this._titleLabel = new St.Label();
- title = title ? _cleanMarkup(title.replace('\n', ' ')) : '';
+ title = title ? _cleanMarkup(title.replace(/\n/g, ' ')) : '';
this._titleLabel.clutter_text.set_markup('<b>' + title + '</b>');
this._bannerBox.add_actor(this._titleLabel);
@@ -126,7 +126,7 @@ Notification.prototype = {
this._bannerBodyText = null;
this._bannerLabel = new St.Label();
- banner = banner ? _cleanMarkup(banner.replace('\n', ' ')) : '';
+ banner = banner ? _cleanMarkup(banner.replace(/\n/g, ' ')) : '';
this._bannerLabel.clutter_text.set_markup(banner);
this._bannerBox.add_actor(this._bannerLabel);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]