moviebrowser: clean up showMovieInfoMenu(), series menu outsourced

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6d1e5edc16
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-17 (Mon, 17 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-17 16:49:27 +02:00
committed by vanhofen
parent f50aaa1d2c
commit 5e38024819
2 changed files with 15 additions and 9 deletions

View File

@@ -3433,6 +3433,18 @@ void CMovieBrowser::initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* m
}
#define MAX_STRING 30
void CMovieBrowser::initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info)
{
SeriesMenu->addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
CKeyboardInput *serieUserInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, MAX_STRING); //TODO: hints
SeriesMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName, serieUserInput));
SeriesMenu->addItem(GenericMenuSeparatorLine);
for (unsigned int li = 0; li < m_vHandleSerienames.size(); li++)
SeriesMenu->addItem(new CMenuSelector(m_vHandleSerienames[li]->serieName.c_str(), true, movie_info->serieName));
}
int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
{
// init bookmark menu
@@ -3442,16 +3454,9 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
CIntInput bookEndIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.end, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
initBookMarkMenu(&bookmarkMenu, movie_info, &bookStartIntInput, &bookLastIntInput, &bookEndIntInput);
/********************************************************************/
/** serie******************************************************/
CKeyboardInput serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, 20);
// init series menu
CMenuWidget serieMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
serieMenu.addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
serieMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName,&serieUserInput));
serieMenu.addItem(GenericMenuSeparatorLine);
for (unsigned int li = 0; li < m_vHandleSerienames.size(); li++)
serieMenu.addItem(new CMenuSelector(m_vHandleSerienames[li]->serieName.c_str(), true, movie_info->serieName));
initSeriesMenu(&serieMenu, movie_info);
/********************************************************************/
/** update movie info ******************************************************/

View File

@@ -348,6 +348,7 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals
///// Menu ////////////////////////////////////
bool showMenu(bool calledExternally = false);
void initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* movie_info, CIntInput* BookStartIntInput, CIntInput* BookLastIntInput, CIntInput* BookEndIntInput);
void initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info);
int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2
int showMovieCutMenu(); // P2
int showStartPosSelectionMenu(void); // P2