From ae79dffff4ffa3d56f740da09a669157e0e4c656 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 17 Nov 2016 18:45:59 +0100 Subject: [PATCH] src/gui/moviebrowser/mb.cpp fix bookmark Menu Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/531ab8f8188d6b82400742b2f19293d224216635 Author: Jacek Jendrzej Date: 2016-11-17 (Thu, 17 Nov 2016) --- src/gui/moviebrowser/mb.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index b0a5b7d74..37b3d9dbe 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3165,9 +3165,8 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++) { - std::string bookmark_user_name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); - if (!movie_info->bookmarks.user[li].name.empty()) - bookmark_user_name = movie_info->bookmarks.user[li].name; + if (movie_info->bookmarks.user[li].name.empty()) + movie_info->bookmarks.user[li].name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); CKeyboardInput *pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, &movie_info->bookmarks.user[li].name, 20, NULL, NULL, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO2); CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); @@ -3175,11 +3174,11 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CMenuWidget* pBookItemMenu = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, NEUTRINO_ICON_MOVIEPLAYER); pBookItemMenu->addItem(GenericMenuSeparator); - pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, bookmark_user_name.c_str(), pBookNameInput)); + pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[li].name, pBookNameInput)); 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(bookmark_user_name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu)); + bookmarkMenu.addItem(new CMenuDForwarder("", true, pBookNameInput->getValue(), pBookItemMenu)); } /********************************************************************/