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
@ -630,7 +630,6 @@ var NMWirelessDialogItem = GObject.registerClass({
|
||||
can_focus: true,
|
||||
reactive: true });
|
||||
|
||||
this.connect('key-focus-in', () => this.emit('selected'));
|
||||
let action = new Clutter.ClickAction();
|
||||
action.connect('clicked', () => this.grab_key_focus());
|
||||
this.add_action(action);
|
||||
@ -659,6 +658,10 @@ var NMWirelessDialogItem = GObject.registerClass({
|
||||
this._sync();
|
||||
}
|
||||
|
||||
vfunc_key_focus_in() {
|
||||
this.emit('selected');
|
||||
}
|
||||
|
||||
_sync() {
|
||||
this._signalIcon.icon_name = this._getSignalIcon();
|
||||
}
|
||||
|
Reference in New Issue
Block a user