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,9 +99,6 @@
font-weight: bold; font-weight: bold;
} }
// secondary container in title box
.message-secondary-bin {
// notification time stamp // notification time stamp
> .event-time { > .event-time {
@extend %caption; @extend %caption;
@ -112,7 +109,6 @@
&:rtl { text-align: left }; &:rtl { text-align: left };
} }
} }
}
// close button // close button

View File

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

View File

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