messageTray: Rename bannerBodyMarkup to useBodyMarkup in Notification object
I think the new name better reflects the effect of the property. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
00c292733d
commit
d63013f075
@ -768,7 +768,7 @@ export const NotificationMessage = GObject.registerClass(
|
||||
class NotificationMessage extends MessageList.Message {
|
||||
_init(notification) {
|
||||
super._init(notification.source, notification.title, notification.body);
|
||||
this.setUseBodyMarkup(notification.bannerBodyMarkup);
|
||||
this.setUseBodyMarkup(notification.useBodyMarkup);
|
||||
|
||||
this.notification = notification;
|
||||
this.datetime = notification.datetime;
|
||||
@ -805,7 +805,7 @@ class NotificationMessage extends MessageList.Message {
|
||||
this.setIcon(this._getIcon());
|
||||
this.setTitle(n.title);
|
||||
this.setBody(n.body);
|
||||
this.setUseBodyMarkup(n.bannerBodyMarkup);
|
||||
this.setUseBodyMarkup(n.useBodyMarkup);
|
||||
}
|
||||
|
||||
vfunc_clicked() {
|
||||
|
@ -409,7 +409,7 @@ export const Notification = GObject.registerClass({
|
||||
this.privacyScope = PrivacyScope.USER;
|
||||
this.forFeedback = false;
|
||||
this.body = null;
|
||||
this.bannerBodyMarkup = false;
|
||||
this.useBodyMarkup = false;
|
||||
this.sound = null;
|
||||
this._soundPlayed = false;
|
||||
this.actions = [];
|
||||
@ -442,7 +442,7 @@ export const Notification = GObject.registerClass({
|
||||
|
||||
this.title = title;
|
||||
this.body = banner;
|
||||
this.bannerBodyMarkup = params.bannerMarkup;
|
||||
this.useBodyMarkup = params.bannerMarkup;
|
||||
|
||||
if (params.datetime)
|
||||
this.datetime = params.datetime;
|
||||
|
@ -142,7 +142,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
let body = '';
|
||||
if (n.body) {
|
||||
const bodyText = n.body.replace(/\n/g, ' ');
|
||||
body = n.bannerBodyMarkup
|
||||
body = n.useBodyMarkup
|
||||
? bodyText
|
||||
: GLib.markup_escape_text(bodyText, -1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user