From 5e38024819e9c57a62b287bd363442eea21c5cff Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 17 Jun 2019 16:49:27 +0200 Subject: [PATCH] moviebrowser: clean up showMovieInfoMenu(), series menu outsourced Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6d1e5edc168e6fd34973181de2ff6cda0e52f7e8 Author: Thilo Graf Date: 2019-06-17 (Mon, 17 Jun 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/moviebrowser/mb.cpp | 23 ++++++++++++++--------- src/gui/moviebrowser/mb.h | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 2a84b1b52..62daac936 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -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 ******************************************************/ diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index f878ffae2..da21bd36d 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -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