cleanup: Don't call method via a parent's prototype
We cannot disconnect a signal handler via the usual disconnect() as nm_device_disconnect() shadows the GObject method, but we can use g_signal_handler_disconnect(). https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626
This commit is contained in:
parent
e0457b6dc4
commit
1b31fd5afe
@ -331,11 +331,11 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
|
|||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
if (this._stateChangedId) {
|
if (this._stateChangedId) {
|
||||||
GObject.Object.prototype.disconnect.call(this._device, this._stateChangedId);
|
GObject.signal_handler_disconnect(this._device, this._stateChangedId);
|
||||||
this._stateChangedId = 0;
|
this._stateChangedId = 0;
|
||||||
}
|
}
|
||||||
if (this._activeConnectionChangedId) {
|
if (this._activeConnectionChangedId) {
|
||||||
GObject.Object.prototype.disconnect.call(this._device, this._activeConnectionChangedId);
|
GObject.signal_handler_disconnect(this._device, this._activeConnectionChangedId);
|
||||||
this._activeConnectionChangedId = 0;
|
this._activeConnectionChangedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1187,11 +1187,11 @@ var NMDeviceWireless = class {
|
|||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
if (this._activeApChangedId) {
|
if (this._activeApChangedId) {
|
||||||
GObject.Object.prototype.disconnect.call(this._device, this._activeApChangedId);
|
GObject.signal_handler_disconnect(this._device, this._activeApChangedId);
|
||||||
this._activeApChangedId = 0;
|
this._activeApChangedId = 0;
|
||||||
}
|
}
|
||||||
if (this._stateChangedId) {
|
if (this._stateChangedId) {
|
||||||
GObject.Object.prototype.disconnect.call(this._device, this._stateChangedId);
|
GObject.signal_handler_disconnect(this._device, this._stateChangedId);
|
||||||
this._stateChangedId = 0;
|
this._stateChangedId = 0;
|
||||||
}
|
}
|
||||||
if (this._strengthChangedId > 0) {
|
if (this._strengthChangedId > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user