From 09ab849a042d67ed7e1cbd5e80fec8b1d49281d7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 16 Jun 2019 22:48:08 +0200 Subject: [PATCH] moviebrowser: clean up showMovieInfoMenu(), bookmark menu outsourced Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f8ad85202bca5f8cbb22dd19fe5b53db77d17216 Author: Thilo Graf Date: 2019-06-16 (Sun, 16 Jun 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/moviebrowser/mb.cpp | 35 +++++++++++++++++------------------ src/gui/moviebrowser/mb.h | 1 + 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 1dd72c718..0770d5adf 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3404,28 +3404,19 @@ void CMovieBrowser::showHelp(void) help.exec(); } -#define MAX_STRING 30 -int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) +void CMovieBrowser::initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* movie_info) { - /********************************************************************/ - /** MovieInfo menu ******************************************************/ - - /********************************************************************/ - /** bookmark ******************************************************/ - CIntInput bookStartIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.start, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); CIntInput bookLastIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.lastPlayStop, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); CIntInput bookEndIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.end, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); - CMenuWidget bookmarkMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); - - bookmarkMenu.addIntroItems(LOCALE_MOVIEBROWSER_BOOK_HEAD); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all", CRCInput::RC_red)); - bookmarkMenu.addItem(GenericMenuSeparatorLine); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, bookStartIntInput.getValue(), &bookStartIntInput)); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookEndIntInput)); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookLastIntInput)); - bookmarkMenu.addItem(GenericMenuSeparatorLine); + BookmarkMenu->addIntroItems(LOCALE_MOVIEBROWSER_BOOK_HEAD); + BookmarkMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all", CRCInput::RC_red)); + BookmarkMenu->addItem(GenericMenuSeparatorLine); + BookmarkMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, bookStartIntInput.getValue(), &bookStartIntInput)); + BookmarkMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookEndIntInput)); + BookmarkMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookLastIntInput)); + BookmarkMenu->addItem(GenericMenuSeparatorLine); for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++) { @@ -3442,8 +3433,16 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput->getValue(), pBookPosIntInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput->getValue(), pBookTypeIntInput)); - bookmarkMenu.addItem(new CMenuDForwarder("", true, pBookNameInput->getValue(), pBookItemMenu)); + BookmarkMenu->addItem(new CMenuDForwarder("", true, pBookNameInput->getValue(), pBookItemMenu)); } +} + +#define MAX_STRING 30 +int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) +{ + // int bookmark menu + CMenuWidget bookmarkMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); + initBookMarkMenu(&bookmarkMenu, movie_info); /********************************************************************/ /** serie******************************************************/ diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index 4fa027bf3..7498ff0cd 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -346,6 +346,7 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals ///// Menu //////////////////////////////////// bool showMenu(bool calledExternally = false); + void initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* movie_info); int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2 int showMovieCutMenu(); // P2 int showStartPosSelectionMenu(void); // P2