messageTray: Remove support for titleMarkup, body, and bodyMarkup when updating
These features are unused.
This commit is contained in:
parent
13ce39058d
commit
30ff15ec0b
@ -337,18 +337,11 @@ Signals.addSignalMethods(NotificationPolicy.prototype);
|
|||||||
// convenience method addButton() for adding a button to the action
|
// convenience method addButton() for adding a button to the action
|
||||||
// area.
|
// area.
|
||||||
//
|
//
|
||||||
// @params can contain values for 'customContent', 'body', 'icon',
|
|
||||||
// 'titleMarkup', 'bannerMarkup', 'bodyMarkup', and 'clear'
|
|
||||||
// parameters.
|
|
||||||
//
|
|
||||||
// If @params contains a 'customContent' parameter with the value %true,
|
// If @params contains a 'customContent' parameter with the value %true,
|
||||||
// then @banner will not be shown in the body of the notification when the
|
// then @banner will not be shown in the body of the notification when the
|
||||||
// notification is expanded and calls to update() will not clear the content
|
// notification is expanded and calls to update() will not clear the content
|
||||||
// unless 'clear' parameter with value %true is explicitly specified.
|
// unless 'clear' parameter with value %true is explicitly specified.
|
||||||
//
|
//
|
||||||
// If @params contains a 'body' parameter, then that text will be added to
|
|
||||||
// the content area (as with addBody()).
|
|
||||||
//
|
|
||||||
// By default, the icon shown is the same as the source's.
|
// By default, the icon shown is the same as the source's.
|
||||||
// However, if @params contains a 'gicon' parameter, the passed in gicon
|
// However, if @params contains a 'gicon' parameter, the passed in gicon
|
||||||
// will be used.
|
// will be used.
|
||||||
@ -356,11 +349,10 @@ Signals.addSignalMethods(NotificationPolicy.prototype);
|
|||||||
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
||||||
// is no fallback for this icon.
|
// is no fallback for this icon.
|
||||||
//
|
//
|
||||||
// If @params contains a 'titleMarkup', 'bannerMarkup', or
|
// If @params contains 'bannerMarkup', with the value %true, then
|
||||||
// 'bodyMarkup' parameter with the value %true, then the corresponding
|
// the corresponding element is assumed to use pango markup. If the
|
||||||
// element is assumed to use pango markup. If the parameter is not
|
// parameter is not present for an element, then anything that looks
|
||||||
// present for an element, then anything that looks like markup in
|
// like markup in that element will appear literally in the output.
|
||||||
// that element will appear literally in the output.
|
|
||||||
//
|
//
|
||||||
// If @params contains a 'clear' parameter with the value %true, then
|
// If @params contains a 'clear' parameter with the value %true, then
|
||||||
// the content and the action area of the notification will be cleared.
|
// the content and the action area of the notification will be cleared.
|
||||||
@ -458,12 +450,9 @@ const Notification = new Lang.Class({
|
|||||||
// remove any additional actors/action buttons previously added.
|
// remove any additional actors/action buttons previously added.
|
||||||
update: function(title, banner, params) {
|
update: function(title, banner, params) {
|
||||||
params = Params.parse(params, { customContent: false,
|
params = Params.parse(params, { customContent: false,
|
||||||
body: null,
|
|
||||||
gicon: null,
|
gicon: null,
|
||||||
secondaryGIcon: null,
|
secondaryGIcon: null,
|
||||||
titleMarkup: false,
|
|
||||||
bannerMarkup: false,
|
bannerMarkup: false,
|
||||||
bodyMarkup: false,
|
|
||||||
clear: false,
|
clear: false,
|
||||||
soundName: null,
|
soundName: null,
|
||||||
soundFile: null });
|
soundFile: null });
|
||||||
@ -530,7 +519,7 @@ const Notification = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.title = title;
|
this.title = title;
|
||||||
title = title ? _fixMarkup(title.replace(/\n/g, ' '), params.titleMarkup) : '';
|
title = title ? _fixMarkup(title.replace(/\n/g, ' '), false) : '';
|
||||||
this._titleLabel.clutter_text.set_markup('<b>' + title + '</b>');
|
this._titleLabel.clutter_text.set_markup('<b>' + title + '</b>');
|
||||||
|
|
||||||
if (Pango.find_base_dir(title, -1) == Pango.Direction.RTL)
|
if (Pango.find_base_dir(title, -1) == Pango.Direction.RTL)
|
||||||
@ -563,9 +552,6 @@ const Notification = new Lang.Class({
|
|||||||
if (this.bannerBodyText && this.bannerBodyText.indexOf('\n') > -1)
|
if (this.bannerBodyText && this.bannerBodyText.indexOf('\n') > -1)
|
||||||
this._addBannerBody();
|
this._addBannerBody();
|
||||||
|
|
||||||
if (params.body)
|
|
||||||
this.addBody(params.body, params.bodyMarkup);
|
|
||||||
|
|
||||||
if (this._soundName != params.soundName ||
|
if (this._soundName != params.soundName ||
|
||||||
this._soundFile != params.soundFile) {
|
this._soundFile != params.soundFile) {
|
||||||
this._soundName = params.soundName;
|
this._soundName = params.soundName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user