From 4c2826f420fa62f6fece439b24f350746451769b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 May 2017 15:26:20 +0200 Subject: [PATCH] movieplayer: make bisection jump period configurable Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/69e5cb286caee0aa2592eb879817cd309e213b23 Author: vanhofen Date: 2017-05-16 (Tue, 16 May 2017) Origin message was: ------------------ - movieplayer: make bisection jump period configurable ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/keybind_setup.cpp | 7 ++++--- src/gui/movieplayer.cpp | 4 ++-- src/neutrino.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 4027eebe5..0926595c4 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -516,9 +516,10 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye bindSettings_mplayer->addItem(GenericMenuSeparatorLine); //NI //NI - bisectional jumps - CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MOVIEPLAYER_BISECTION_JUMP, &g_settings.movieplayer_bisection_jump, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - mc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_BISECTION_JUMP); - bindSettings_mplayer->addItem(mc); + CMenuOptionNumberChooser* nc = new CMenuOptionNumberChooser(LOCALE_MOVIEPLAYER_BISECTION_JUMP, &g_settings.movieplayer_bisection_jump, true, 0, 10, this, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF); + nc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE)); + nc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_BISECTION_JUMP); + bindSettings_mplayer->addItem(nc); } void CKeybindSetup::showKeyBindMoviebrowserSetup(CMenuWidget *bindSettings_mbrowser) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index dde44218d..15611c12a 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1353,7 +1353,7 @@ void CMoviePlayerGui::PlayFileLoop(void) neutrino_msg_t lastmsg = 0; //NI //NI - bisectional jumps - int bisection_jump = 300; + int bisection_jump = g_settings.movieplayer_bisection_jump * 60; int bisection_loop = -1; int bisection_loop_max = 5; @@ -1639,7 +1639,7 @@ void CMoviePlayerGui::PlayFileLoop(void) if ((lastmsg == CRCInput::RC_page_up || lastmsg == CRCInput::RC_page_down) && (bisection_loop > -1 && bisection_loop <= bisection_loop_max)) bisection_jump /= 2; else - bisection_jump = 300; + bisection_jump = g_settings.movieplayer_bisection_jump * 60; bisection_loop = 0; jump = bisection_jump; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 702df0427..ad5f455bf 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -906,7 +906,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //Movie-Player g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); - g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 1); //NI + g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 5); //NI g_settings.youtube_dev_id = configfile.getString("youtube_dev_id","AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM"); //NI g_settings.youtube_enabled = configfile.getInt32("youtube_enabled", 1); g_settings.youtube_enabled = check_youtube_dev_id();