I am not sure if I found a bug or if I am doing something wrong if someone could please share a light on me.
I am updating my gnome extensions to start using the Quick Settings instead of the “Popup Menu”.
The problem is when I change my menu type in the settings or I turn off and on the extension.
Basically if I make my extension call for the second time PanelMenu.Button.setMenu and I pass the QuickSettingsMenu I will have an error when opening my modal dialog.
It looks like you might be trying to replace the popup menu of a panel indicator, while the Quick Settings menu is a part of the shared menu which includes Wi-Fi and so on.
It may be helpful for you to review the examples on gjs.guide, in particular the Quick Settings: System Indicator example. If you’re not interested in putting your extension in the shared Quick Settings menu, there’s no need to change your menu in the panel.
Sorry, I’m not sure if I can help with that. The extension you linked was a prototype of the current Quick Settings menu, so I’m not sure that code will work anymore without some modification.
Considering the amount of items and submenus you plan on supporting, you might consider just using a modal dialog instead of a popup menu. Otherwise, @fmuellner may have some better perspective.
Quick Settings was a relatively isolated feature, so an extension was a good way to develop the code and get quick design feedback, without designers having to build gnome-shell itself from git.
The extension was never published on extensions.gnome.org, and the code has been completely abandoned since the implementation moved into gnome-shell proper.
If you want to implement a 2nd quick-settings-like menu, use the components from js/ui/quickSettings.js in gnome-shell, not some dead extension code.
I am using components from quickSettings.js already .
I found a work around, not sure if is the best but for what I see it’s not affecting anything and everything continues working fine and this time I don’t have errors after disabling and enabling the application.