IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
modal preferences page
$ergi0
post Mar 25 2013, 07:45
Post #1





Group: Members
Posts: 55
Joined: 16-February 04
From: Ukraine
Member No.: 12045



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
Go to the top of the page
+Quote Post
foosion
post Mar 25 2013, 11:17
Post #2





Group: FB2K Moderator (Donating)
Posts: 4439
Joined: 24-February 03
Member No.: 5153



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
Go to the top of the page
+Quote Post
$ergi0
post Mar 25 2013, 12:50
Post #3





Group: Members
Posts: 55
Joined: 16-February 04
From: Ukraine
Member No.: 12045



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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st October 2014 - 00:22