Skip to main content

Topic: modal preferences page (Read 1556 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • $ergi0
  • [*][*]
modal preferences page
hi
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;
uic->show_preferences(PreferencesPage::pp_guid);

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?

thanks

  • foosion
  • [*][*][*][*][*]
  • Moderator
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.
http://foosion.foobar2000.org/ - my components for foobar2000

  • $ergi0
  • [*][*]
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
thanks