cleanup: Replace signal connections with virtual functions
Inheriting from actors allows to use virtual functions instead of signal connections for multiple cases, so just use them when possible. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
This commit is contained in:

committed by
Florian Müllner

parent
320df13b65
commit
55b57421dc
@ -71,11 +71,9 @@ var ListItem = GObject.registerClass({
|
||||
let labelBin = new St.Bin({ y_align: St.Align.MIDDLE,
|
||||
child: this._nameLabel });
|
||||
layout.add(labelBin);
|
||||
|
||||
this.connect('clicked', this._onClicked.bind(this));
|
||||
}
|
||||
|
||||
_onClicked() {
|
||||
vfunc_clicked() {
|
||||
this.emit('activate');
|
||||
this._app.activate();
|
||||
}
|
||||
|
Reference in New Issue
Block a user