messageTray: Rename bannerBodyText to body in Notification object
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
e4c44fd1ed
commit
00c292733d
@ -767,7 +767,7 @@ export const Calendar = GObject.registerClass({
|
|||||||
export const NotificationMessage = GObject.registerClass(
|
export const NotificationMessage = GObject.registerClass(
|
||||||
class NotificationMessage extends MessageList.Message {
|
class NotificationMessage extends MessageList.Message {
|
||||||
_init(notification) {
|
_init(notification) {
|
||||||
super._init(notification.source, notification.title, notification.bannerBodyText);
|
super._init(notification.source, notification.title, notification.body);
|
||||||
this.setUseBodyMarkup(notification.bannerBodyMarkup);
|
this.setUseBodyMarkup(notification.bannerBodyMarkup);
|
||||||
|
|
||||||
this.notification = notification;
|
this.notification = notification;
|
||||||
@ -804,7 +804,7 @@ class NotificationMessage extends MessageList.Message {
|
|||||||
this.datetime = n.datetime;
|
this.datetime = n.datetime;
|
||||||
this.setIcon(this._getIcon());
|
this.setIcon(this._getIcon());
|
||||||
this.setTitle(n.title);
|
this.setTitle(n.title);
|
||||||
this.setBody(n.bannerBodyText);
|
this.setBody(n.body);
|
||||||
this.setUseBodyMarkup(n.bannerBodyMarkup);
|
this.setUseBodyMarkup(n.bannerBodyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ export const Notification = GObject.registerClass({
|
|||||||
this.isTransient = false;
|
this.isTransient = false;
|
||||||
this.privacyScope = PrivacyScope.USER;
|
this.privacyScope = PrivacyScope.USER;
|
||||||
this.forFeedback = false;
|
this.forFeedback = false;
|
||||||
this.bannerBodyText = null;
|
this.body = null;
|
||||||
this.bannerBodyMarkup = false;
|
this.bannerBodyMarkup = false;
|
||||||
this.sound = null;
|
this.sound = null;
|
||||||
this._soundPlayed = false;
|
this._soundPlayed = false;
|
||||||
@ -441,7 +441,7 @@ export const Notification = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.bannerBodyText = banner;
|
this.body = banner;
|
||||||
this.bannerBodyMarkup = params.bannerMarkup;
|
this.bannerBodyMarkup = params.bannerMarkup;
|
||||||
|
|
||||||
if (params.datetime)
|
if (params.datetime)
|
||||||
|
@ -140,8 +140,8 @@ const NotificationsBox = GObject.registerClass({
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
let body = '';
|
let body = '';
|
||||||
if (n.bannerBodyText) {
|
if (n.body) {
|
||||||
const bodyText = n.bannerBodyText.replace(/\n/g, ' ');
|
const bodyText = n.body.replace(/\n/g, ' ');
|
||||||
body = n.bannerBodyMarkup
|
body = n.bannerBodyMarkup
|
||||||
? bodyText
|
? bodyText
|
||||||
: GLib.markup_escape_text(bodyText, -1);
|
: GLib.markup_escape_text(bodyText, -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user