From 17fa5a2db45e66e4b0a38952cc8a0f0b791d431f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Mon, 9 Sep 2019 17:06:55 +0200 Subject: [PATCH] extensionPrefs: Connect to ExtensionStateChanged after building UI Since we manipulate parts of the UI (like the switch) in this signal handler, let's only connect it after setting up the UI. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/705 --- js/extensionPrefs/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 4125605b9..1a0783bdd 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -567,6 +567,10 @@ class ExtensionRow extends Gtk.ListBoxRow { this._extension = extension; this._prefsModule = null; + this.connect('destroy', this._onDestroy.bind(this)); + + this._buildUI(); + this._extensionStateChangedId = this._app.shellProxy.connectSignal( 'ExtensionStateChanged', (p, sender, [uuid, newState]) => { if (this.uuid !== uuid) @@ -577,10 +581,6 @@ class ExtensionRow extends Gtk.ListBoxRow { this._switch.state = state; this._switch.sensitive = this._canToggle(); }); - - this.connect('destroy', this._onDestroy.bind(this)); - - this._buildUI(); } get uuid() {