mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Activate prefs dialog if already opened
This commit is contained in:
@@ -137,7 +137,20 @@ export default class DashToPanelExtension extends Extension {
|
||||
}
|
||||
|
||||
openPreferences() {
|
||||
if (SETTINGS.get_boolean('prefs-opened')) return
|
||||
if (SETTINGS.get_boolean('prefs-opened')) {
|
||||
let prefsWindow = global
|
||||
.get_window_actors()
|
||||
.map((wa) => wa.meta_window)
|
||||
.find(
|
||||
(w) =>
|
||||
w.title == 'Dash to Panel' &&
|
||||
w.wm_class == 'org.gnome.Shell.Extensions',
|
||||
)
|
||||
|
||||
if (prefsWindow) Main.activateWindow(prefsWindow)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
super.openPreferences()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user