From 9e9d76134251a88423051e0960c5244601cbd5d9 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 27 Apr 2022 21:26:30 -0400 Subject: [PATCH] gi.Adw is always defined in fillPreferencesWindow --- panelManager.js | 14 +++----------- prefs.js | 14 ++++++-------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/panelManager.js b/panelManager.js index 4db92f7..899f792 100755 --- a/panelManager.js +++ b/panelManager.js @@ -336,8 +336,9 @@ var PanelManager = class { this.bind_property('opacity', view, 'opacity', GObject.BindingFlags.SYNC_CREATE); this.add_child(view); } else { - // todo exorcise this after the GS 42 release - view = new ProxySecondaryMonitorDisplay(i, + // No idea why atm, but we need the import at the top of this file and to use the + // full imports ns here, otherwise SecondaryMonitorDisplay can't be used ¯\_(ツ)_/¯ + view = new imports.ui.workspacesView.SecondaryMonitorDisplay(i, this._controls, this._scrollAdjustment, this._fitModeAdjustment, @@ -504,15 +505,6 @@ var PanelManager = class { }; -// No idea why atm, but we need the import at the top of this file and this -// "proxy" class, otherwise SecondaryMonitorDisplay can't be used ¯\_(ツ)_/¯ -var ProxySecondaryMonitorDisplay = GObject.registerClass({ -}, class ProxySecondaryMonitorDisplay extends imports.ui.workspacesView.SecondaryMonitorDisplay { - _init(...params) { - super._init(...params) - } -}); - // This class drives long-running icon animations, to keep them running in sync // with each other. var IconAnimator = class { diff --git a/prefs.js b/prefs.js index 78180f1..a250a4f 100644 --- a/prefs.js +++ b/prefs.js @@ -2464,15 +2464,13 @@ function fillPreferencesWindow(window) { let preferences = new Preferences(); let box = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL}); - if (imports.gi.Adw) { - // dummy page to prevent 'Extension did not provide any UI' - // error until we migrate to Adw - let dummyPage = new imports.gi.Adw.PreferencesPage() + // dummy page to prevent 'Extension did not provide any UI' + // error until we migrate to Adw + let dummyPage = new imports.gi.Adw.PreferencesPage() - box.append(new imports.gi.Adw.HeaderBar); - window.add(dummyPage); - window.visible_page = dummyPage - } + box.append(new imports.gi.Adw.HeaderBar); + window.add(dummyPage); + window.visible_page = dummyPage box.append(preferences.notebook); window.set_content(box);