From db6c38a7728da3a9fdfb49b8f9deb965ba0a3258 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 20 Jun 2019 21:32:01 +0200 Subject: [PATCH] moviebrowser: clean up showMenu(), parental lock menu outsourced Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/10a97019a3c11dcc701df30eca81b8047e05a487 Author: Thilo Graf Date: 2019-06-20 (Thu, 20 Jun 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/moviebrowser/mb.cpp | 15 +++++++++------ src/gui/moviebrowser/mb.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 6eb2bf660..15c008ecd 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -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 **************************************************/ diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index e77d72ee1..90fd9e230 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -350,6 +350,7 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals void initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* movie_info, CIntInput* BookStartIntInput, CIntInput* BookLastIntInput, CIntInput* BookEndIntInput); void initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info); void initUpdateMovieInfoMenu(CMenuWidget *MovieInfoMenuUpdate); + void initParentalMenu(CMenuWidget *ParentalMenu); int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2 int showMovieCutMenu(); // P2 int showStartPosSelectionMenu(void); // P2