messageList: Remove secondary actor API from Message

The secondary actor isn't used for anything anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
This commit is contained in:
Julian Sparber 2024-01-26 15:18:44 +01:00 committed by Marge Bot
parent 15056527aa
commit 89c602cb62
3 changed files with 12 additions and 30 deletions

View File

@ -99,18 +99,14 @@
font-weight: bold;
}
// secondary container in title box
.message-secondary-bin {
// notification time stamp
> .event-time {
@extend %caption;
color: $insensitive_fg_color;
padding-bottom: to_em(1px);
// notification time stamp
> .event-time {
@extend %caption;
color: $insensitive_fg_color;
padding-bottom: to_em(1px);
&:ltr { text-align: right };
&:rtl { text-align: left };
}
&:ltr { text-align: right };
&:rtl { text-align: left };
}
}

View File

@ -409,12 +409,8 @@ export const Message = GObject.registerClass({
this.setTitle(title);
titleBox.add_child(this.titleLabel);
this._secondaryBin = new St.Bin({
style_class: 'message-secondary-bin',
x_expand: true, y_expand: true,
y_align: Clutter.ActorAlign.END,
});
titleBox.add_child(this._secondaryBin);
this._timeLabel = new TimeLabel();
titleBox.add_child(this._timeLabel);
this._closeButton = new St.Button({
style_class: 'message-close-button',
@ -450,21 +446,11 @@ export const Message = GObject.registerClass({
}
get datetime() {
if (this._secondaryBin.child instanceof TimeLabel)
return this._secondaryBin.child.datetime;
else
return null;
return this._timeLabel.datetime;
}
set datetime(datetime) {
if (!(this._secondaryBin.child instanceof TimeLabel))
this._secondaryBin.child = new TimeLabel();
this._secondaryBin.child.set({datetime});
}
setSecondaryActor(actor) {
this._secondaryBin.child = actor;
this._timeLabel.datetime = datetime;
}
setTitle(text) {

View File

@ -31,7 +31,7 @@ class MediaMessage extends MessageList.Message {
this.setIcon(this._icon);
// reclaim space used by unused elements
this._secondaryBin.hide();
this._timeLabel.hide();
this._closeButton.hide();
this._prevButton = this.addMediaControl('media-skip-backward-symbolic',