messageTray: Remove the secondary icon from Notification
This was only used by the telepathy client, but after dropping the presense indicator this isn't used anymore. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
This commit is contained in:
parent
5f7e8d292d
commit
e89dea80d6
@ -333,9 +333,6 @@ export const NotificationApplicationPolicy = GObject.registerClass({
|
|||||||
// 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.
|
||||||
//
|
//
|
||||||
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
|
||||||
// is no fallback for this icon.
|
|
||||||
//
|
|
||||||
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
|
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
|
||||||
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
|
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
|
||||||
// the parameter is not present, then anything that looks like markup
|
// the parameter is not present, then anything that looks like markup
|
||||||
@ -401,7 +398,6 @@ export const Notification = GObject.registerClass({
|
|||||||
update(title, banner, params) {
|
update(title, banner, params) {
|
||||||
params = Params.parse(params, {
|
params = Params.parse(params, {
|
||||||
gicon: null,
|
gicon: null,
|
||||||
secondaryGIcon: null,
|
|
||||||
bannerMarkup: false,
|
bannerMarkup: false,
|
||||||
clear: false,
|
clear: false,
|
||||||
datetime: null,
|
datetime: null,
|
||||||
@ -421,9 +417,6 @@ export const Notification = GObject.registerClass({
|
|||||||
if (params.gicon || params.clear)
|
if (params.gicon || params.clear)
|
||||||
this.gicon = params.gicon;
|
this.gicon = params.gicon;
|
||||||
|
|
||||||
if (params.secondaryGIcon || params.clear)
|
|
||||||
this.secondaryGIcon = params.secondaryGIcon;
|
|
||||||
|
|
||||||
if (params.clear)
|
if (params.clear)
|
||||||
this.actions = [];
|
this.actions = [];
|
||||||
|
|
||||||
@ -518,7 +511,6 @@ export const NotificationBanner = GObject.registerClass({
|
|||||||
this._buttonBox = null;
|
this._buttonBox = null;
|
||||||
|
|
||||||
this._addActions();
|
this._addActions();
|
||||||
this._addSecondaryIcon();
|
|
||||||
|
|
||||||
this.notification.connectObject('activated', () => {
|
this.notification.connectObject('activated', () => {
|
||||||
// We hide all types of notifications once the user clicks on
|
// We hide all types of notifications once the user clicks on
|
||||||
@ -533,13 +525,11 @@ export const NotificationBanner = GObject.registerClass({
|
|||||||
super._onUpdated(n, clear);
|
super._onUpdated(n, clear);
|
||||||
|
|
||||||
if (clear) {
|
if (clear) {
|
||||||
this.setSecondaryActor(null);
|
|
||||||
this.setActionArea(null);
|
this.setActionArea(null);
|
||||||
this._buttonBox = null;
|
this._buttonBox = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._addActions();
|
this._addActions();
|
||||||
this._addSecondaryIcon();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_addActions() {
|
_addActions() {
|
||||||
@ -548,16 +538,6 @@ export const NotificationBanner = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_addSecondaryIcon() {
|
|
||||||
if (this.notification.secondaryGIcon) {
|
|
||||||
const icon = new St.Icon({
|
|
||||||
gicon: this.notification.secondaryGIcon,
|
|
||||||
x_align: Clutter.ActorAlign.END,
|
|
||||||
});
|
|
||||||
this.setSecondaryActor(icon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addButton(button, callback) {
|
addButton(button, callback) {
|
||||||
if (!this._buttonBox) {
|
if (!this._buttonBox) {
|
||||||
this._buttonBox = new St.BoxLayout({
|
this._buttonBox = new St.BoxLayout({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user