moviebrowser: clean up showMenu(), parental lock menu outsourced

Origin commit data
------------------
Branch: ni/coolstream
Commit: 10a97019a3
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-20 (Thu, 20 Jun 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2019-06-20 21:32:01 +02:00
committed by vanhofen
parent 7170c0f21f
commit db6c38a772
2 changed files with 10 additions and 6 deletions

View File

@@ -3597,6 +3597,13 @@ void CMovieBrowser::changeBrowserHeight(CMenuForwarder* fw1, CMenuForwarder* fw2
fw2->paint();
}
void CMovieBrowser::initParentalMenu(CMenuWidget *ParentalMenu)
{
ParentalMenu->addIntroItems(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD);
ParentalMenu->addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED, (int*)(&m_parentalLock), MESSAGEBOX_PARENTAL_LOCK_OPTIONS, MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT, true));
ParentalMenu->addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_RATE_HEAD, (int*)(&m_settings.parentalLockAge), MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true));
}
bool CMovieBrowser::showMenu(bool calledExternally)
{
/* first clear screen */
@@ -3610,13 +3617,9 @@ bool CMovieBrowser::showMenu(bool calledExternally)
/********************************************************************/
/** options menu **************************************************/
/********************************************************************/
/** parental lock **************************************************/
// init parental lock menu
CMenuWidget parentalMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
parentalMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD);
parentalMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED, (int*)(&m_parentalLock), MESSAGEBOX_PARENTAL_LOCK_OPTIONS, MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT, true));
parentalMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_RATE_HEAD, (int*)(&m_settings.parentalLockAge), MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true));
initParentalMenu(&parentalMenu);
/********************************************************************/
/** optionsVerzeichnisse **************************************************/