mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
dbusServices/extensions: Override destroy() method
Some extensions try to destroy the provided dialog, so they can instead show the preferences in an alternative way. Unfortunately that is undetectable from the Extensions service, which still thinks the dialog is open, and will therefore block other prefs dialogs. Try to steer extensions away from that anti-pattern (or at the very least switch to `close()` which doesn't break) by overriding the window's destroy() method and show an extension error instead. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7435 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3209>
This commit is contained in:
parent
db490dbaf7
commit
1e882ba8dc
1 changed files with 5 additions and 0 deletions
|
|
@ -58,6 +58,11 @@ export const ExtensionPrefsDialog = GObject.registerClass({
|
|||
});
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this._showErrorPage(
|
||||
new Error('destroy() breaks tracking open dialogs, use close() if you must'));
|
||||
}
|
||||
|
||||
_showErrorPage(e) {
|
||||
while (this.visible_page)
|
||||
this.remove(this.visible_page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue