From 708a6ab5db2ea5ae4c89329ad7f8089a7f2211e7 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 13 Dec 2011 15:53:20 +0000 Subject: [PATCH] Fix movie start menu git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1967 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6b9f35947bc11c49a7cc98b5ad4e9219b04c662a Author: [CST] Focus Date: 2011-12-13 (Tue, 13 Dec 2011) ------------------ This commit was generated by Migit --- src/gui/moviebrowser.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 799d50cc8..87a2bc6b5 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -3082,7 +3082,6 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 startPosSelectionMenu.enableFade(false); startPosSelectionMenu.addIntroItems(LOCALE_MOVIEBROWSER_START_HEAD); - //startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_START_RECORD_START, true,NULL)); if(m_movieSelectionHandler->bookmarks.start != 0) { @@ -3095,7 +3094,7 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 position[menu_nr++] = m_movieSelectionHandler->bookmarks.lastPlayStop; } startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_START_RECORD_START, true,NULL)); - int sep_pos = menu_nr; + position[menu_nr++] = 0; for(int i =0 ; i < MI_MOVIE_BOOK_USER_MAX && menu_nr < MAX_NUMBER_OF_BOOKMARK_ITEMS; i++ ) { @@ -3107,7 +3106,6 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 position[menu_nr] = m_movieSelectionHandler->bookmarks.user[i].pos + m_movieSelectionHandler->bookmarks.user[i].length; snprintf(book[i], 19,"%5d min",position[menu_nr]/60); -TRACE("[mb] adding boomark menu N %d, position %d\n", menu_nr, position[menu_nr]); startPosSelectionMenu.addItem(new CMenuForwarderNonLocalized (m_movieSelectionHandler->bookmarks.user[i].name.c_str(), true, book[i])); menu_nr++; } @@ -3115,17 +3113,11 @@ TRACE("[mb] adding boomark menu N %d, position %d\n", menu_nr, position[menu_nr] startPosSelectionMenu.exec(NULL, "12345"); /* check what menu item was ok'd and set the appropriate play offset*/ - //result = startPosSelectionMenu.getSelected(); result = startPosSelectionMenu.getSelectedLine(); -printf("startPosSelectionMenu result %d\n", result); - if(result < 4)// select 2 for startPosSelectionMenu.addIntroItems(); - return -1; + result -= 4; // sub-text, separator, back, separator-line - //TRACE("[mb] selected bookmark %d\n", result); - if(result != 0 && result <= MAX_NUMBER_OF_BOOKMARK_ITEMS) + if(result >= 0 && result <= MAX_NUMBER_OF_BOOKMARK_ITEMS) { - result -= 4; - if(result > sep_pos) result--; pos = position[result]; } TRACE("[mb] selected bookmark %d position %d \n", result, pos);