diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 1a0783bdd..552360080 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -578,7 +578,11 @@ class ExtensionRow extends Gtk.ListBoxRow { this._extension = ExtensionUtils.deserializeExtension(newState); let state = (this._extension.state == ExtensionState.ENABLED); + + GObject.signal_handler_block(this._switch, this._notifyActiveId); this._switch.state = state; + GObject.signal_handler_unblock(this._switch, this._notifyActiveId); + this._switch.sensitive = this._canToggle(); }); } @@ -646,7 +650,7 @@ class ExtensionRow extends Gtk.ListBoxRow { sensitive: this._canToggle(), state: this._extension.state === ExtensionState.ENABLED }); - this._switch.connect('notify::active', () => { + this._notifyActiveId = this._switch.connect('notify::active', () => { if (this._switch.active) this._app.shellProxy.EnableExtensionRemote(this.uuid); else