Skip to main content


Please be aware that much of the software linked to or mentioned on this forum is niche and therefore infrequently downloaded. Lots of anti-virus scanners and so-called malware detectors like to flag infrequently downloaded software as bad until it is either downloaded enough times, or its developer actually bothers with getting each individual release allow listed by every single AV vendor. You can do many people a great favor when encountering such a "problem" example by submitting them to your AV vendor for examination. For almost everything on this forum, it is a false positive.
Topic: modal preferences page (Read 1908 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

modal preferences page

i'm developing a plugin with simple preferences page
i have implemented classes
PreferencesPageInstance : public CDialogImpl<PreferencesPageInstance>, public preferences_page_instance {
PreferencesPage : public preferences_page_impl<PreferencesPageInstance> {
so everything works as supposed to: user goes to foobar preferences and finds my page there

the problem is i want to add a context menu item "setup and use my plugin" to spare user some time on finding my preferences page. i can't use this code
static_api_ptr_t<ui_control> uic;

cause it's not-blocking.

is there a way to show my preferences page as a modal dialog or wait until foobar preferences window is closed?


modal preferences page

Reply #1
No, that is not possible. You would need to create your own modal window for hosting your preferences page and use modal_dialog_scope.

However, the recommended way would be to keep everything modeless and display a message in your plugin, if it has not been configured yet. You could do this as a popup or embedded into the UI of your plugin. See for the example the album list plugin which displays a hint if the media library has not been configured yet.

modal preferences page

Reply #2
ok, i'll implement the dialog, just thought if there is a way to use the same code for the dialog and preferences page. i want functionality similar to converter plugin when user can set up configuration for the current run or to choose the last used

it seems there is no sense in keeping preferences page in this case

SimplePortal 1.0.0 RC1 © 2008-2021