From 473af7b2eab2f1261e37e47d5c14af4e3b02dc61 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Mon, 14 Dec 2015 22:33:19 +0100 Subject: [PATCH 01/25] CLuaInstVideo: Add getNeutrinoMode() - Set Lua api version to 1.28 Example: video = video.new() if video.getNeutrinoMode() == NMODE.TS then messagebox.exec{title="Attention!", text="Movie player is busy.", buttons={ "ok" } } end --- src/gui/lua/lua_video.cpp | 7 +++++++ src/gui/lua/lua_video.h | 1 + src/gui/lua/luainstance.cpp | 19 ++++++++++++++++++- src/gui/lua/luainstance.h | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/gui/lua/lua_video.cpp b/src/gui/lua/lua_video.cpp index c1f7207b4..3515f01bd 100644 --- a/src/gui/lua/lua_video.cpp +++ b/src/gui/lua/lua_video.cpp @@ -61,6 +61,7 @@ void CLuaInstVideo::LuaVideoRegister(lua_State *L) { "zapitStopPlayBack", CLuaInstVideo::zapitStopPlayBack }, { "channelRezap", CLuaInstVideo::channelRezap }, { "createChannelIDfromUrl", CLuaInstVideo::createChannelIDfromUrl }, + { "getNeutrinoMode", CLuaInstVideo::getNeutrinoMode }, { "__gc", CLuaInstVideo::VideoDelete }, { NULL, NULL } }; @@ -186,6 +187,12 @@ int CLuaInstVideo::createChannelIDfromUrl(lua_State *L) return 1; } +int CLuaInstVideo::getNeutrinoMode(lua_State *L) +{ + lua_pushinteger(L, (lua_Integer)CNeutrinoApp::getInstance()->getMode()); + return 1; +} + int CLuaInstVideo::VideoDelete(lua_State *L) { CLuaVideo *D = VideoCheckData(L, 1); diff --git a/src/gui/lua/lua_video.h b/src/gui/lua/lua_video.h index 39edbe122..31df59778 100644 --- a/src/gui/lua/lua_video.h +++ b/src/gui/lua/lua_video.h @@ -54,6 +54,7 @@ class CLuaInstVideo static int zapitStopPlayBack(lua_State *L); static int channelRezap(lua_State *L); static int createChannelIDfromUrl(lua_State *L); + static int getNeutrinoMode(lua_State *L); static int VideoDelete(lua_State *L); static void videoFunctionDeprecated(lua_State *L, std::string oldFunc); diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index bfba9584f..d3de36800 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -307,7 +307,6 @@ static void set_lua_variables(lua_State *L) { NULL, 0 } }; - table_key curl_status[] = { { "OK", (lua_Integer)CLuaInstCurl::LUA_CURL_OK }, @@ -318,6 +317,23 @@ static void set_lua_variables(lua_State *L) { NULL, 0 } }; + table_key neutrino_mode[] = + { + { "UNKNOWN", (lua_Integer)CNeutrinoApp::mode_unknown }, + { "TV", (lua_Integer)CNeutrinoApp::mode_tv }, + { "RADIO", (lua_Integer)CNeutrinoApp::mode_radio }, + { "SCART", (lua_Integer)CNeutrinoApp::mode_scart }, + { "STANDBY", (lua_Integer)CNeutrinoApp::mode_standby }, + { "AUDIO", (lua_Integer)CNeutrinoApp::mode_audio }, + { "PIC", (lua_Integer)CNeutrinoApp::mode_pic }, + { "TS", (lua_Integer)CNeutrinoApp::mode_ts }, + { "OFF", (lua_Integer)CNeutrinoApp::mode_off }, + { "WEBTV", (lua_Integer)CNeutrinoApp::mode_webtv }, + { "MASK", (lua_Integer)CNeutrinoApp::mode_mask }, + { "NOREZAP", (lua_Integer)CNeutrinoApp::norezap }, + { NULL, 0 } + }; + /* list of environment variable arrays to be exported */ lua_envexport e[] = { @@ -331,6 +347,7 @@ static void set_lua_variables(lua_State *L) { "CC", ccomponents }, { "DYNFONT", dynfont }, { "CURL", curl_status }, + { "NMODE", neutrino_mode }, { NULL, NULL } }; diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index e2bf16a8d..1dd126c66 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -31,7 +31,7 @@ extern "C" { #include "luainstance_helpers.h" #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 27 +#define LUA_API_VERSION_MINOR 28 /* inspired by Steve Kemp http://www.steve.org.uk/ */ class CLuaInstance From ed26f2ea05a5151bbfe92e1f84748abd9edef5ce Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Mon, 14 Dec 2015 22:33:30 +0100 Subject: [PATCH 02/25] CLuaInstVideo: Add setSinglePlay() - When setSinglePlay() Neutrino returns after playing a movie immediately in the tv/radio modus back - Set Lua api version to 1.29 Example: video = video.new() video.setSinglePlay() video.PlayFile(...) --- src/gui/lua/lua_video.cpp | 20 +++++++++++++++++++- src/gui/lua/lua_video.h | 4 +++- src/gui/lua/luainstance.h | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/gui/lua/lua_video.cpp b/src/gui/lua/lua_video.cpp index 3515f01bd..5dc90e6b4 100644 --- a/src/gui/lua/lua_video.cpp +++ b/src/gui/lua/lua_video.cpp @@ -62,6 +62,7 @@ void CLuaInstVideo::LuaVideoRegister(lua_State *L) { "channelRezap", CLuaInstVideo::channelRezap }, { "createChannelIDfromUrl", CLuaInstVideo::createChannelIDfromUrl }, { "getNeutrinoMode", CLuaInstVideo::getNeutrinoMode }, + { "setSinglePlay", CLuaInstVideo::setSinglePlay }, { "__gc", CLuaInstVideo::VideoDelete }, { NULL, NULL } }; @@ -115,7 +116,12 @@ int CLuaInstVideo::PlayFile(lua_State *L) return 0; } - if (CMoviePlayerGui::getInstance().getBlockedFromPlugin() == false) + bool sp = false; + if (luaL_testudata(L, 1, LUA_CLASSNAME) == NULL) { + CLuaVideo *D = VideoCheckData(L, 1); + sp = D->singlePlay; + } + if ((sp == false) && (CMoviePlayerGui::getInstance().getBlockedFromPlugin() == false)) CMoviePlayerGui::getInstance().setBlockedFromPlugin(true); const char *title; @@ -193,6 +199,18 @@ int CLuaInstVideo::getNeutrinoMode(lua_State *L) return 1; } +int CLuaInstVideo::setSinglePlay(lua_State *L) +{ + bool mode = true; + int numargs = lua_gettop(L); + if (numargs > 1) + mode = _luaL_checkbool(L, 2); + + CLuaVideo *D = VideoCheckData(L, 1); + D->singlePlay = mode; + return 0; +} + int CLuaInstVideo::VideoDelete(lua_State *L) { CLuaVideo *D = VideoCheckData(L, 1); diff --git a/src/gui/lua/lua_video.h b/src/gui/lua/lua_video.h index 31df59778..f4ae6a216 100644 --- a/src/gui/lua/lua_video.h +++ b/src/gui/lua/lua_video.h @@ -23,7 +23,8 @@ class CLuaVideo { public: - CLuaVideo() {}; + bool singlePlay; + CLuaVideo() { singlePlay=false; }; ~CLuaVideo() {}; }; @@ -55,6 +56,7 @@ class CLuaInstVideo static int channelRezap(lua_State *L); static int createChannelIDfromUrl(lua_State *L); static int getNeutrinoMode(lua_State *L); + static int setSinglePlay(lua_State *L); static int VideoDelete(lua_State *L); static void videoFunctionDeprecated(lua_State *L, std::string oldFunc); diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 1dd126c66..2d21eb0c6 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -31,7 +31,7 @@ extern "C" { #include "luainstance_helpers.h" #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 28 +#define LUA_API_VERSION_MINOR 29 /* inspired by Steve Kemp http://www.steve.org.uk/ */ class CLuaInstance From e3fdcaec99d10bc0eb6f414ba3012999e3267197 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Mon, 14 Dec 2015 22:33:33 +0100 Subject: [PATCH 03/25] CLuaInstCCText::CCTextScroll: Add Parameter 'pages' - By pages parameter the number of pages can be specified to be scrolled - Set Lua api version to 1.30 Example: ct = ctext.new{...} ... ct:scroll{dir="down", pages=2}; --- src/gui/lua/lua_cc_text.cpp | 8 ++++++-- src/gui/lua/luainstance.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index e680a46b7..5f87e409e 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -215,15 +215,19 @@ int CLuaInstCCText::CCTextScroll(lua_State *L) std::string tmp = "true"; tableLookup(L, "dir", tmp); bool scrollDown = (tmp == "down" || tmp == "1"); + lua_Integer pages = 1; + tableLookup(L, "pages", pages); //get the textbox instance from lua object and use CTexBbox scroll methods CTextBox* ctb = m->ct->getCTextBoxObject(); if (ctb) { + if (pages == -1) + pages = ctb->getPages(); ctb->enableBackgroundPaint(true); if (scrollDown) - ctb->scrollPageDown(1); + ctb->scrollPageDown(pages); else - ctb->scrollPageUp(1); + ctb->scrollPageUp(pages); ctb->enableBackgroundPaint(false); } return 0; diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 2d21eb0c6..98fe6ea40 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -31,7 +31,7 @@ extern "C" { #include "luainstance_helpers.h" #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 29 +#define LUA_API_VERSION_MINOR 30 /* inspired by Steve Kemp http://www.steve.org.uk/ */ class CLuaInstance From c5bcbf490c65e3f6c3395fb5f3025209820551e0 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Tue, 15 Dec 2015 00:31:42 +0100 Subject: [PATCH 04/25] CLuaInstCurl::CurlDownload: Rework progress display - Set Lua api version to 1.31 --- src/gui/lua/lua_curl.cpp | 26 +++++++++++++++++++------- src/gui/lua/lua_curl.h | 7 +++++-- src/gui/lua/luainstance.h | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/gui/lua/lua_curl.cpp b/src/gui/lua/lua_curl.cpp index f25549af5..69d25ea17 100644 --- a/src/gui/lua/lua_curl.cpp +++ b/src/gui/lua/lua_curl.cpp @@ -83,9 +83,9 @@ size_t CLuaInstCurl::CurlWriteToString(void *ptr, size_t size, size_t nmemb, voi return size*nmemb; } -int CLuaInstCurl::CurlProgressFunc(void *p, double dltotal, double dlnow, double /*ultotal*/, double /*ulnow*/) +int CLuaInstCurl::CurlProgressFunc(void *p, curl_off_t dltotal, curl_off_t dlnow, curl_off_t /*ultotal*/, curl_off_t /*ulnow*/) { - if (dltotal <= 0.0) + if (dltotal == 0) return 0; struct progressData *_pgd = static_cast(p); @@ -98,15 +98,16 @@ int CLuaInstCurl::CurlProgressFunc(void *p, double dltotal, double dlnow, double curl_easy_getinfo(_pgd->curl, CURLINFO_SPEED_DOWNLOAD, &dlSpeed); curl_easy_getinfo(_pgd->curl, CURLINFO_RESPONSE_CODE, &responseCode); - double dlFragment = dlnow / dltotal; + uint32_t MUL = 0x7FFF; + uint32_t dlFragment = (dlnow * MUL) / dltotal; if (responseCode != 200) { dlFragment = 0; dlSpeed = 0; } int showDots = 50; - int dots = round(dlFragment * showDots); - printf(" %3.0f%% [", dlFragment * 100); + int dots = (dlFragment * showDots) / MUL; + printf(" %d%% [", (dlFragment * 100) / MUL); int i = 0; for (; i < dots-1; i++) printf("="); @@ -117,10 +118,16 @@ int CLuaInstCurl::CurlProgressFunc(void *p, double dltotal, double dlnow, double for (; i < showDots; i++) printf(" "); printf("] speed: %.03f KB/sec \r", dlSpeed/1024); fflush(stdout); - return 0; } +#if LIBCURL_VERSION_NUM < 0x072000 +int CLuaInstCurl::CurlProgressFunc_old(void *p, double dltotal, double dlnow, double ultotal, double ulnow) +{ + return CurlProgressFunc(p, (curl_off_t)dltotal, (curl_off_t)dlnow, (curl_off_t)ultotal, (curl_off_t)ulnow); +} +#endif + int CLuaInstCurl::CurlDownload(lua_State *L) { /* @@ -275,10 +282,15 @@ Example: progressData pgd; if (!silent) { - curl_easy_setopt(curl_handle, CURLOPT_PROGRESSFUNCTION, CLuaInstCurl::CurlProgressFunc); pgd.curl = curl_handle; pgd.last_dlnow = -1; +#if LIBCURL_VERSION_NUM >= 0x072000 + curl_easy_setopt(curl_handle, CURLOPT_XFERINFOFUNCTION, CLuaInstCurl::CurlProgressFunc); + curl_easy_setopt(curl_handle, CURLOPT_XFERINFODATA, &pgd); +#else + curl_easy_setopt(curl_handle, CURLOPT_PROGRESSFUNCTION, CLuaInstCurl::CurlProgressFunc_old); curl_easy_setopt(curl_handle, CURLOPT_PROGRESSDATA, &pgd); +#endif } char cerror[CURL_ERROR_SIZE]; diff --git a/src/gui/lua/lua_curl.h b/src/gui/lua/lua_curl.h index 67b00eec4..26eccb93a 100644 --- a/src/gui/lua/lua_curl.h +++ b/src/gui/lua/lua_curl.h @@ -29,7 +29,7 @@ class CLuaCurl struct progressData { CURL *curl; - double last_dlnow; + curl_off_t last_dlnow; }; class CLuaInstCurl @@ -52,7 +52,10 @@ class CLuaInstCurl static CLuaCurl *CurlCheckData(lua_State *L, int n); static int CurlNew(lua_State *L); static size_t CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data); - static int CurlProgressFunc(void *p, double dltotal, double dlnow, double ultotal, double ulnow); +#if LIBCURL_VERSION_NUM < 0x072000 + static int CurlProgressFunc_old(void *p, double dltotal, double dlnow, double ultotal, double ulnow); +#endif + static int CurlProgressFunc(void *p, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow); static int CurlDownload(lua_State *L); static int CurlDelete(lua_State *L); }; diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 98fe6ea40..5a96eed88 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -31,7 +31,7 @@ extern "C" { #include "luainstance_helpers.h" #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 30 +#define LUA_API_VERSION_MINOR 31 /* inspired by Steve Kemp http://www.steve.org.uk/ */ class CLuaInstance From fae6c5eb4ca8f41d5d2567d584094644f58faf1e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 08:22:29 +0100 Subject: [PATCH 05/25] - deutsch.lokale: fix timeshift_pause translation --- data/locale/deutsch.locale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index d5a7569b8..9faf785c1 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1239,7 +1239,7 @@ menu.hint_record_timer Konfigurieren Sie Optionen für Timer-Aufnahmen menu.hint_record_timeshift Konfigurieren Sie Optionen für Timeshift-Aufnahmen menu.hint_record_timeshift_auto Stellen Sie die Zeit in Sekunden ein, nach der Timeshift nach dem Umschalten automatisch startet menu.hint_record_timeshift_delete Wählen Sie, ob nach Beenden von Timeshift die Timeshift-Aufnahmen gelöscht werden -menu.hint_record_timeshift_pause Wenn diese Option aktiviert ist, lässt sich Timeshift durch die Pause-Taste auf der Fernbedienung aktivieren +menu.hint_record_timeshift_pause Wenn diese Option aktiviert ist, pausiert eine Timeshift-Aufnahme direkt nach dem Start menu.hint_record_timeshift_temp Wenn diese Option deaktiviert ist, wird Timeshift direkt als Aufnahme gestartet menu.hint_record_zap Bei aktiver Option wird bereits mit der Ankündigung der Aufnahme auf den aufzunehmenden Sender umgeschalten menu.hint_record_zap_pre_time Stellen Sie eine Vorlaufzeit in Minuten für den Umschalt-Timer ein From ab7e3956df4a927e3896b797ebacff6383cddcb6 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 14 Dec 2015 08:23:46 +0100 Subject: [PATCH 06/25] - infoviewer_bb: fix display of red button in movieplayer mode --- src/gui/infoviewer_bb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 7fd11a085..08a0fd7e4 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -223,6 +223,7 @@ void CInfoViewerBB::getBBButtonInfo() mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts) { text = g_Locale->getText(LOCALE_EPGMENU_STREAMINFO); + active = true; } else { text = CUserMenu::getUserMenuButtonName(0, active); if (!text.empty()) From 168c3832d0dc2ba12aabbd1d95fec01299a0a7a2 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 08:26:16 +0100 Subject: [PATCH 07/25] - keybind-setup: fix assignable keys for movieplayer; ... ...timeshift isn't a movieplayer key. --- src/gui/keybind_setup.cpp | 12 ++++++++---- src/gui/keybind_setup.h | 4 +--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 158a19bde..6d4d4b326 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -190,11 +190,9 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] = {LOCALE_MPKEY_TIME, &g_settings.mpkey_time, LOCALE_MENU_HINT_KEY_MPTIME }, {LOCALE_MPKEY_BOOKMARK, &g_settings.mpkey_bookmark, LOCALE_MENU_HINT_KEY_MPBOOKMARK }, {LOCALE_MPKEY_GOTO, &g_settings.mpkey_goto, NONEXISTANT_LOCALE}, - //{LOCALE_MPKEY_NEXT3DMODE, &g_settings.mpkey_next3dmode, NONEXISTANT_LOCALE}, {LOCALE_MPKEY_NEXT_REPEAT_MODE, &g_settings.mpkey_next_repeat_mode, NONEXISTANT_LOCALE}, - //{LOCALE_MPKEY_VTXT, &g_settings.mpkey_vtxt, NONEXISTANT_LOCALE}, - {LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, LOCALE_MENU_HINT_KEY_MPTIMESHIFT }, {LOCALE_MPKEY_PLUGIN, &g_settings.mpkey_plugin, LOCALE_MENU_HINT_KEY_MPPLUGIN }, + {LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, LOCALE_MENU_HINT_KEY_MPTIMESHIFT }, {LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, LOCALE_MENU_HINT_KEY_UNLOCK}, {LOCALE_EXTRA_KEY_HELP, &g_settings.key_help, NONEXISTANT_LOCALE}, {LOCALE_EXTRA_KEY_NEXT43MODE, &g_settings.key_next43mode, NONEXISTANT_LOCALE}, @@ -412,6 +410,12 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings) mf->setHint("", LOCALE_MENU_HINT_KEY_SPECIAL_ACTIVE); bindSettings->addItem(mf); + bindSettings->addItem(new CMenuSeparator()); + + // timeshift + mf = new CMenuForwarder(key_settings[NKEY_TIMESHIFT].keydescription, true, keychooser[NKEY_TIMESHIFT]->getKeyName(), keychooser[NKEY_TIMESHIFT]); + mf->setHint("", key_settings[NKEY_TIMESHIFT].hint); + bindSettings->addItem(mf); // unlock mf = new CMenuForwarder(key_settings[NKEY_UNLOCK].keydescription, true, keychooser[NKEY_UNLOCK]->getKeyName(), keychooser[NKEY_UNLOCK]); mf->setHint("", key_settings[NKEY_UNLOCK].hint); @@ -490,7 +494,7 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye { bindSettings_mplayer->addIntroItems(LOCALE_MAINMENU_MOVIEPLAYER); - for (int i = MPKEY_REWIND; i < MPKEY_PLUGIN; i++) { + for (int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++) { CMenuForwarder * mf = new CMenuForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]); mf->setHint("", key_settings[i].hint); bindSettings_mplayer->addItem(mf); diff --git a/src/gui/keybind_setup.h b/src/gui/keybind_setup.h index b099956e3..4e3785f1a 100644 --- a/src/gui/keybind_setup.h +++ b/src/gui/keybind_setup.h @@ -75,11 +75,9 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver MPKEY_TIME, MPKEY_BOOKMARK, MPKEY_GOTO, - //MPKEY_NEXT3DMODE, MPKEY_NEXT_REPEAT_MODE, - //MPKEY_VTXT, - NKEY_TIMESHIFT, MPKEY_PLUGIN, + NKEY_TIMESHIFT, NKEY_UNLOCK, NKEY_HELP, NKEY_NEXT43MODE, From ad3a2f701b1a85f8ea40a3af28cccb55c9b20431 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 08:31:30 +0100 Subject: [PATCH 08/25] - streaminfo: show movieplayer as source, when no webtv is running --- src/gui/streaminfo2.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 55f8e9304..4d3a592d1 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -273,12 +273,17 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) int y1; int xd = w/4; - std::string tname(g_Locale->getText(LOCALE_STREAMINFO_SIGNAL)); - tname += ": "; - if (mp) - tname += g_Locale->getText(LOCALE_WEBTV_HEAD); - else - tname += to_string(1 + frontend->getNumber()) + ": " + frontend->getName(); + std::string tname(g_Locale->getText(LOCALE_STREAMINFO_SIGNAL)); + tname += ": "; + if (mp) + { + if (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webtv) + tname += g_Locale->getText(LOCALE_WEBTV_HEAD); + else + tname += g_Locale->getText(LOCALE_MAINMENU_MOVIEPLAYER); + } + else + tname += to_string(1 + frontend->getNumber()) + ": " + frontend->getName(); #if 0 int tuner = 1 + frontend->getNumber(); From e22d2d8a4511b82f85b59b666036ece2fd1717b9 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 08:33:22 +0100 Subject: [PATCH 09/25] - keybind_setup/locale: timeshift isn't a movieplayer key --- data/locale/deutsch.locale | 2 +- data/locale/english.locale | 2 +- data/locale/nederlands.locale | 2 +- data/locale/slovak.locale | 2 +- data/locale/unmaintained/czech.locale | 2 +- data/locale/unmaintained/polski.locale | 2 +- src/gui/keybind_setup.cpp | 2 +- src/system/locals.h | 2 +- src/system/locals_intern.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 9faf785c1..5dd719f07 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1079,7 +1079,6 @@ menu.hint_key_mprewind Weisen Sie eine Taste zum Zurückspulen in ihren Aufnahme menu.hint_key_mpstop Weisen Sie eine Taste zum Beenden der Wiedergabe zu menu.hint_key_mpsubtitle Weisen Sie eine Taste für die Untertitel-Auswahl zu menu.hint_key_mptime Weisen Sie eine Taste für die Restzeitanzeige ihrer Aufnahmen zu -menu.hint_key_mptimeshift Weisen Sie eine Taste für das Starten von Timeshift zu menu.hint_key_pagedown Weisen Sie eine Taste für das Herunterblättern zu menu.hint_key_pageup Weisen Sie eine Taste für das Hochblättern zu menu.hint_key_pic_mode_active Die Taste für das Bildschirmformat deaktivieren/aktivieren @@ -1100,6 +1099,7 @@ menu.hint_key_sort Weisen Sie eine Taste für das Sortieren in der Kanalliste zu menu.hint_key_special_active Deaktivieren oder aktivieren einiger Sondertasten menu.hint_key_subchanneldown Weisen Sie eine Taste für das Zurückschalten in den Unterkanälen zu menu.hint_key_subchannelup Weisen Sie eine Taste für das Weiterschalten in den Unterkanälen zu +menu.hint_key_timeshift Weisen Sie eine Taste für das Starten von Timeshift zu menu.hint_key_transponder Weisen Sie eine Taste für das Anzeigen der Transponder in der Kanalliste zu menu.hint_key_tvradiomode Wählen Sie eine Taste für das Umschalten zwischen TV- und Radio-Modus menu.hint_key_unlock Weisen Sie eine Taste zum Entriegeln zu, \nbetätigen Sie die Taste 'Rot' für 5 Sekunden diff --git a/data/locale/english.locale b/data/locale/english.locale index 4c2aba343..228f638af 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1081,7 +1081,6 @@ menu.hint_key_mprewind Assign button to rewind record playback menu.hint_key_mpstop Assign button to stop record/file playback menu.hint_key_mpsubtitle Assign button to show subtitle selection menu.hint_key_mptime Assign button to show play time\nleft time -menu.hint_key_mptimeshift Assign button to start timeshift menu.hint_key_pagedown Assign button to show next items page menu.hint_key_pageup Assign button to show previous items page menu.hint_key_pic_mode_active Disable/enable key for the screen format @@ -1102,6 +1101,7 @@ menu.hint_key_sort Assign button to change channel list sort order menu.hint_key_special_active Disable or enable some special keys menu.hint_key_subchanneldown Assign button for fast switch\n to previous subchannel menu.hint_key_subchannelup Assign button for fast switch\n to next subchannel +menu.hint_key_timeshift Assign button to start timeshift menu.hint_key_transponder Assign button to show channel list\nfor current transponder menu.hint_key_tvradiomode Assign button to switch TV <> Radio mode menu.hint_key_unlock Assign button to unlock box if locked\nTo unlock press 'red', then in next 5 seconds this key diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index 0a5bf6e68..4556a00f2 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -1027,7 +1027,6 @@ menu.hint_key_mprewind Knop toewijzen voor het terugspoelen van een opname menu.hint_key_mpstop Knop toewijzen voor het stoppen van het afspelen/opnemen van een opname. menu.hint_key_mpsubtitle Toewijzen knop om ondertitelselectie te tonen menu.hint_key_mptime Knop toewijzen voor de weergave van de resterende afspeeltijd -menu.hint_key_mptimeshift Knop toewijzen voor het starten van de timeshift functie menu.hint_key_pagedown Knop toewijzen voor de pagina weergave van het volgende item menu.hint_key_pageup Knop toewijzen voor de pagina weergaven van het vorige item menu.hint_key_pic_mode_active Deactiveer/activeer toets voor het scherm formaat @@ -1048,6 +1047,7 @@ menu.hint_key_sort Knop toewijzen voor het veranderen van de sorteer orde van uw menu.hint_key_special_active Uitschakelen of inschakelen van speciale toetsen menu.hint_key_subchanneldown Knop toewijzen om snel te \nschakelen naar het vorige subkanaal menu.hint_key_subchannelup Knop toewijzen om snel te \nschakelen naar het volgende subkanaal +menu.hint_key_timeshift Knop toewijzen voor het starten van de timeshift functie menu.hint_key_transponder Knop toewijzen voor de weergave van\n de kanalenlijst op de huidige transponder menu.hint_key_tvradiomode Knop toewijzen voor het schakelen tussen Radio en TV menu.hint_key_unlock Knop toewijzen voor het ontgrendelen van de ontvanger.\nOm te ontgrendelen drukt u eerst op de rode toets \ngevolgd door de door u gedefinieerde toets (binnen 5 seconden). diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index 0196d3bcb..46ca0c03b 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -1081,7 +1081,6 @@ menu.hint_key_mprewind Priradenie klávesy pre pretáčanie vzad nahrávky menu.hint_key_mpstop Priradenie klávesy pre zastavenie nahrávky menu.hint_key_mpsubtitle Priradenie klávesy pre zobrazenie titulkov menu.hint_key_mptime Priradenie klávesy pre zobrazenie časov nahrávky -menu.hint_key_mptimeshift Priradenie klávesy pre spustenie časového posunu menu.hint_key_pagedown Priradenie klávesy pre zobrazenie nasledujúcej strany položiek menu.hint_key_pageup Priradenie klávesy pre zobrazenie predchádzajúcej strany položiek menu.hint_key_pic_mode_active Povolenie/zakázanie klávesy pre zmenu formátu obrazu @@ -1102,6 +1101,7 @@ menu.hint_key_sort Priradenie klávesy pre zmenu triedenia zoznamu kanálov menu.hint_key_special_active Povolenie/zakázanie niektorých špeciálnych kláves menu.hint_key_subchanneldown Priradenie klávesy pre rýchlu zmenu\n do predchádzajúceho subkanálu menu.hint_key_subchannelup Priradenie klávesy pre rýchlu zmenu\n do nasledujúceho subkanálu +menu.hint_key_timeshift Priradenie klávesy pre spustenie časového posunu menu.hint_key_transponder Priradenie klávesy pre zobrazenie zoznamu kanálov\nz aktuálneho transpondéra menu.hint_key_tvradiomode Priradenie klávesy pre zmenu TV <> Rádio režimu menu.hint_key_unlock Priradenie klávesy pre odomknutie poľa ak je zamknuté\nPre odomknutie stlačiť 'RED', potom počas 5 sekúnd to tlačítko diff --git a/data/locale/unmaintained/czech.locale b/data/locale/unmaintained/czech.locale index 476d13d77..11e1e557d 100644 --- a/data/locale/unmaintained/czech.locale +++ b/data/locale/unmaintained/czech.locale @@ -1044,7 +1044,6 @@ menu.hint_key_mprewind Přiřazení klávesy pro přetáčení vzad nahrávky menu.hint_key_mpstop Přiřazení klávesy pro zastavení nahrávky menu.hint_key_mpsubtitle Přiřazení klávesy pro zobrazení titulků menu.hint_key_mptime Přiřazení klávesy pro zobrazení časů nahrávky -menu.hint_key_mptimeshift Přiřazení klávesy pro spuštění časového posunu menu.hint_key_pagedown Přiřazení klávesy pro zobrazení následující strany položek menu.hint_key_pageup Přiřazení klávesy pro zobrazení předchozí strany položek menu.hint_key_pic_mode_active Povolení/zakázání klávesy pro změnu formátu obrazu @@ -1065,6 +1064,7 @@ menu.hint_key_sort Přiřazení klávesy pro změnu třídění seznamu kanálů menu.hint_key_special_active Povolení/zákaz některých speciálních kláves menu.hint_key_subchanneldown Přiřazení klávesy pro rychlou změnu \ndo předchozího subkanálu menu.hint_key_subchannelup Přiřazení klávesy pro rychlou změnu \ndo následujícího subkanálu +menu.hint_key_timeshift Přiřazení klávesy pro spuštění časového posunu menu.hint_key_transponder Přiřazení tlačítka pro zobrazení seznamu kanálů \nz aktuálního transpondéru menu.hint_key_tvradiomode Přiřazení tlačítka pro změnu TV <> Rádio režimu menu.hint_key_unlock Přiřazení klávesy pro odemknutí pole pokud je zamčené \nPro odemčení stisknout 'RED', pak během 5 vteřin toto tlačítko diff --git a/data/locale/unmaintained/polski.locale b/data/locale/unmaintained/polski.locale index d98f24acd..080a1a984 100644 --- a/data/locale/unmaintained/polski.locale +++ b/data/locale/unmaintained/polski.locale @@ -1045,7 +1045,6 @@ menu.hint_key_mprewind Assign button to rewind record playback menu.hint_key_mpstop Assign button to stop record/file playback menu.hint_key_mpsubtitle Assign button to show subtitle selection menu.hint_key_mptime Assign button to show play time\nleft time -menu.hint_key_mptimeshift Assign button to start timeshift menu.hint_key_pagedown Assign button to show next items page menu.hint_key_pageup Assign button to show previous items page menu.hint_key_pic_mode_active Disable/enable key for the screen format @@ -1066,6 +1065,7 @@ menu.hint_key_sort Assign button to change channel list sort order menu.hint_key_special_active Disable or enable some special keys menu.hint_key_subchanneldown Assign button for fast switch\n to previous subchannel menu.hint_key_subchannelup Assign button for fast switch\n to next subchannel +menu.hint_key_timeshift Assign button to start timeshift menu.hint_key_transponder Assign button to show channel list\nfor current transponder menu.hint_key_tvradiomode Assign button to switch TV <> Radio mode menu.hint_key_unlock Assign button to unlock box if locked\nTo unlock press 'red', then in next 5 seconds this key diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 6d4d4b326..a267981fb 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -192,7 +192,7 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] = {LOCALE_MPKEY_GOTO, &g_settings.mpkey_goto, NONEXISTANT_LOCALE}, {LOCALE_MPKEY_NEXT_REPEAT_MODE, &g_settings.mpkey_next_repeat_mode, NONEXISTANT_LOCALE}, {LOCALE_MPKEY_PLUGIN, &g_settings.mpkey_plugin, LOCALE_MENU_HINT_KEY_MPPLUGIN }, - {LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, LOCALE_MENU_HINT_KEY_MPTIMESHIFT }, + {LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, LOCALE_MENU_HINT_KEY_TIMESHIFT }, {LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, LOCALE_MENU_HINT_KEY_UNLOCK}, {LOCALE_EXTRA_KEY_HELP, &g_settings.key_help, NONEXISTANT_LOCALE}, {LOCALE_EXTRA_KEY_NEXT43MODE, &g_settings.key_next43mode, NONEXISTANT_LOCALE}, diff --git a/src/system/locals.h b/src/system/locals.h index 90d0f0c7a..8c1d22bbe 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1108,7 +1108,6 @@ typedef enum LOCALE_MENU_HINT_KEY_MPSTOP, LOCALE_MENU_HINT_KEY_MPSUBTITLE, LOCALE_MENU_HINT_KEY_MPTIME, - LOCALE_MENU_HINT_KEY_MPTIMESHIFT, LOCALE_MENU_HINT_KEY_PAGEDOWN, LOCALE_MENU_HINT_KEY_PAGEUP, LOCALE_MENU_HINT_KEY_PIC_MODE_ACTIVE, @@ -1129,6 +1128,7 @@ typedef enum LOCALE_MENU_HINT_KEY_SPECIAL_ACTIVE, LOCALE_MENU_HINT_KEY_SUBCHANNELDOWN, LOCALE_MENU_HINT_KEY_SUBCHANNELUP, + LOCALE_MENU_HINT_KEY_TIMESHIFT, LOCALE_MENU_HINT_KEY_TRANSPONDER, LOCALE_MENU_HINT_KEY_TVRADIOMODE, LOCALE_MENU_HINT_KEY_UNLOCK, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index b8591696b..03d79eacf 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1108,7 +1108,6 @@ const char * locale_real_names[] = "menu.hint_key_mpstop", "menu.hint_key_mpsubtitle", "menu.hint_key_mptime", - "menu.hint_key_mptimeshift", "menu.hint_key_pagedown", "menu.hint_key_pageup", "menu.hint_key_pic_mode_active", @@ -1129,6 +1128,7 @@ const char * locale_real_names[] = "menu.hint_key_special_active", "menu.hint_key_subchanneldown", "menu.hint_key_subchannelup", + "menu.hint_key_timeshift", "menu.hint_key_transponder", "menu.hint_key_tvradiomode", "menu.hint_key_unlock", From 7ccb57548b223d2a2e016547d6c9da3c141cb1e5 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 13:53:04 +0100 Subject: [PATCH 10/25] - infoviewer_bb: rename infobar buttons --- src/gui/infoviewer.cpp | 6 +++--- src/gui/infoviewer_bb.cpp | 40 +++++++++++++++++++-------------------- src/gui/infoviewer_bb.h | 8 ++++---- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index b3305e04e..28e85454c 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1348,7 +1348,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) } else if (msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS) { if ((*(t_channel_id *) data) == current_channel_id) { if (is_visible && showButtonBar) - infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_AUDIO); + infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_GREEN); if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); } @@ -1356,7 +1356,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) } else if (msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES) { if ((*(t_channel_id *) data) == current_channel_id) { if (is_visible && showButtonBar) - infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_SUBS); + infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_YELLOW); } return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) { @@ -1757,7 +1757,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) frameBuffer->paintBackgroundBoxRel (BoxEndX - 108, posy, 112, height2); } #endif - infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_EPG); + infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_RED); } if ((info_CurrentNext.flags & CSectionsdClient::epgflags::not_broadcast) || diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 08a0fd7e4..af412c077 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -217,7 +217,7 @@ void CInfoViewerBB::getBBButtonInfo() bool active; std::string text, icon; switch (i) { - case CInfoViewerBB::BUTTON_EPG: + case CInfoViewerBB::BUTTON_RED: icon = NEUTRINO_ICON_BUTTON_RED; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); @@ -233,7 +233,7 @@ void CInfoViewerBB::getBBButtonInfo() text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); } break; - case CInfoViewerBB::BUTTON_AUDIO: + case CInfoViewerBB::BUTTON_GREEN: icon = NEUTRINO_ICON_BUTTON_GREEN; frameBuffer->getIconSize(icon.c_str(), &w, &h); text = CUserMenu::getUserMenuButtonName(1, active); @@ -252,7 +252,7 @@ void CInfoViewerBB::getBBButtonInfo() } } break; - case CInfoViewerBB::BUTTON_SUBS: + case CInfoViewerBB::BUTTON_YELLOW: icon = NEUTRINO_ICON_BUTTON_YELLOW; frameBuffer->getIconSize(icon.c_str(), &w, &h); text = CUserMenu::getUserMenuButtonName(2, active); @@ -262,7 +262,7 @@ void CInfoViewerBB::getBBButtonInfo() if (text.empty()) text = g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME); break; - case CInfoViewerBB::BUTTON_FEAT: + case CInfoViewerBB::BUTTON_BLUE: icon = NEUTRINO_ICON_BUTTON_BLUE; frameBuffer->getIconSize(icon.c_str(), &w, &h); text = CUserMenu::getUserMenuButtonName(3, active); @@ -288,7 +288,7 @@ void CInfoViewerBB::getBBButtonInfo() bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; int br = 0, count = 0; for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { - if ((i == CInfoViewerBB::BUTTON_SUBS) && (g_RemoteControl->subChannels.empty())) { // no subchannels + if ((i == CInfoViewerBB::BUTTON_YELLOW) && (g_RemoteControl->subChannels.empty())) { // no subchannels bbButtonInfo[i].paint = false; // bbButtonInfo[i].x = -1; // continue; @@ -315,22 +315,22 @@ void CInfoViewerBB::getBBButtonInfo() } bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; - bbButtonInfo[CInfoViewerBB::BUTTON_EPG].x = bbButtonMaxX; - bbButtonInfo[CInfoViewerBB::BUTTON_FEAT].x = minX - bbButtonInfo[CInfoViewerBB::BUTTON_FEAT].w; + bbButtonInfo[CInfoViewerBB::BUTTON_RED].x = bbButtonMaxX; + bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].x = minX - bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].w; - int x1 = bbButtonInfo[CInfoViewerBB::BUTTON_EPG].x + bbButtonInfo[CInfoViewerBB::BUTTON_EPG].w; - int rest = bbButtonInfo[CInfoViewerBB::BUTTON_FEAT].x - x1; + int x1 = bbButtonInfo[CInfoViewerBB::BUTTON_RED].x + bbButtonInfo[CInfoViewerBB::BUTTON_RED].w; + int rest = bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].x - x1; if (Btns < 4) { - rest -= bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].w; - bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].x = x1 + rest / 2; + rest -= bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w; + bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x = x1 + rest / 2; } else { - rest -= bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].w + bbButtonInfo[CInfoViewerBB::BUTTON_SUBS].w; + rest -= bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w + bbButtonInfo[CInfoViewerBB::BUTTON_YELLOW].w; rest = rest / 3; - bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].x = x1 + rest; - bbButtonInfo[CInfoViewerBB::BUTTON_SUBS].x = bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].x + - bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].w + rest; + bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x = x1 + rest; + bbButtonInfo[CInfoViewerBB::BUTTON_YELLOW].x = bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x + + bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w + rest; } #endif bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; @@ -347,10 +347,10 @@ void CInfoViewerBB::getBBButtonInfo() } } else { printf("[infoviewer_bb:%s#%d: count <= 0???\n", __func__, __LINE__); - bbButtonInfo[BUTTON_EPG].x = bbButtonMaxX; - bbButtonInfo[BUTTON_AUDIO].x = bbButtonMaxX + step; - bbButtonInfo[BUTTON_SUBS].x = bbButtonMaxX + 2*step; - bbButtonInfo[BUTTON_FEAT].x = bbButtonMaxX + 3*step; + bbButtonInfo[BUTTON_RED].x = bbButtonMaxX; + bbButtonInfo[BUTTON_GREEN].x = bbButtonMaxX + step; + bbButtonInfo[BUTTON_YELLOW].x = bbButtonMaxX + 2*step; + bbButtonInfo[BUTTON_BLUE].x = bbButtonMaxX + 3*step; } } @@ -402,7 +402,7 @@ void CInfoViewerBB::showBBButtons(const int modus) } } - if (modus == CInfoViewerBB::BUTTON_AUDIO) + if (modus == CInfoViewerBB::BUTTON_GREEN) showIcon_DD(); for (i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index 513775256..03c752eec 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -50,10 +50,10 @@ class CInfoViewerBB enum { // The order of icons from left to right. Here nothing changes! - BUTTON_EPG = 0, - BUTTON_AUDIO = 1, - BUTTON_SUBS = 2, - BUTTON_FEAT = 3, + BUTTON_RED = 0, + BUTTON_GREEN = 1, + BUTTON_YELLOW = 2, + BUTTON_BLUE = 3, BUTTON_MAX = 4 }; From 4c7cea95e9b93a2b05e36d2aa00f3ce02fadfe62 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 23:04:04 +0100 Subject: [PATCH 11/25] - infoviewer_bb: use key-assignment from movieplayer --- src/gui/infoviewer_bb.cpp | 35 ++++++++++++++++++++++++++++------- src/gui/keybind_setup.cpp | 14 ++++++++++++++ src/gui/keybind_setup.h | 1 + 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index af412c077..83f8988b2 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -45,6 +45,7 @@ #include #include +#include "gui/keybind_setup.h" #include #include #include @@ -222,16 +223,16 @@ void CInfoViewerBB::getBBButtonInfo() frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts) { - text = g_Locale->getText(LOCALE_EPGMENU_STREAMINFO); - active = true; - } else { - text = CUserMenu::getUserMenuButtonName(0, active); + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active); if (!text.empty()) break; - text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title; - if (text.empty()) - text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); } + text = CUserMenu::getUserMenuButtonName(0, active); + if (!text.empty()) + break; + text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title; + if (text.empty()) + text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); break; case CInfoViewerBB::BUTTON_GREEN: icon = NEUTRINO_ICON_BUTTON_GREEN; @@ -240,6 +241,12 @@ void CInfoViewerBB::getBBButtonInfo() mode = CNeutrinoApp::getInstance()->getMode(); if (!text.empty() && mode < NeutrinoMessages::mode_audio) break; + mode = CNeutrinoApp::getInstance()->getMode(); + if (mode == NeutrinoMessages::mode_ts) { + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); + if (!text.empty()) + break; + } text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title; if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD)) text = ""; @@ -255,6 +262,12 @@ void CInfoViewerBB::getBBButtonInfo() case CInfoViewerBB::BUTTON_YELLOW: icon = NEUTRINO_ICON_BUTTON_YELLOW; frameBuffer->getIconSize(icon.c_str(), &w, &h); + mode = CNeutrinoApp::getInstance()->getMode(); + if (mode == NeutrinoMessages::mode_ts) { + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active); + if (!text.empty()) + break; + } text = CUserMenu::getUserMenuButtonName(2, active); if (!text.empty()) break; @@ -265,6 +278,12 @@ void CInfoViewerBB::getBBButtonInfo() case CInfoViewerBB::BUTTON_BLUE: icon = NEUTRINO_ICON_BUTTON_BLUE; frameBuffer->getIconSize(icon.c_str(), &w, &h); + mode = CNeutrinoApp::getInstance()->getMode(); + if (mode == NeutrinoMessages::mode_ts) { + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active); + if (!text.empty()) + break; + } text = CUserMenu::getUserMenuButtonName(3, active); if (!text.empty()) break; @@ -288,12 +307,14 @@ void CInfoViewerBB::getBBButtonInfo() bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; int br = 0, count = 0; for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { +#if 0 if ((i == CInfoViewerBB::BUTTON_YELLOW) && (g_RemoteControl->subChannels.empty())) { // no subchannels bbButtonInfo[i].paint = false; // bbButtonInfo[i].x = -1; // continue; } else +#endif { count++; bbButtonInfo[i].paint = true; diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index a267981fb..59b8f18a6 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -568,3 +568,17 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* d } return false; } + +const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bool &active) +{ + active = false; + for (unsigned int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++) + { + if ((uint32_t)*key_settings[i].keyvalue_p == (unsigned int)key) + { + active = true; + return g_Locale->getText(key_settings[i].keydescription); + } + } + return ""; +} diff --git a/src/gui/keybind_setup.h b/src/gui/keybind_setup.h index 4e3785f1a..a43067ead 100644 --- a/src/gui/keybind_setup.h +++ b/src/gui/keybind_setup.h @@ -112,6 +112,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver ~CKeybindSetup(); int exec(CMenuTarget* parent, const std::string & actionKey); bool changeNotify(const neutrino_locale_t OptionName, void * data); + static const char *getMoviePlayerButtonName(const neutrino_msg_t key, bool &active); }; #endif From 0dd22ffd5d7a0c5eb3866fa20acd06f32e58d276 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 14:08:00 +0100 Subject: [PATCH 12/25] - movieplayer: allow usermenu, when colorkeys not assigned --- src/gui/movieplayer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 62e43d07e..bb5a61b19 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1142,6 +1142,7 @@ void CMoviePlayerGui::PlayFileLoop(void) } if (restore) FileTime.show(position); +#if 0 } else if (msg == CRCInput::RC_red) { bool restore = FileTime.IsVisible(); FileTime.kill(); @@ -1150,6 +1151,7 @@ void CMoviePlayerGui::PlayFileLoop(void) if (restore) FileTime.show(position); update_lcd = true; +#endif } else if (msg == NeutrinoMessages::SHOW_EPG) { handleMovieBrowser(NeutrinoMessages::SHOW_EPG, position); } else if (msg == (neutrino_msg_t) g_settings.key_screenshot) { @@ -1178,6 +1180,16 @@ void CMoviePlayerGui::PlayFileLoop(void) makeScreenShot(false, true); } else if (msg == CRCInput::RC_sat) { //FIXME do nothing ? + } else if (msg == CRCInput::RC_red || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow || msg == CRCInput::RC_blue ) { + bool restore = FileTime.IsVisible(); + FileTime.kill(); + + CUserMenu u; + u.showUserMenu(msg); + + if (restore) + FileTime.show(position); + update_lcd = true; } else { if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) { printf("CMoviePlayerGui::PlayFile: neutrino handleMsg messages_return::cancel_all\n"); From 25e1f5bc9eaa94e54ad8407bf811e854c8ef1804 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 16:48:01 +0100 Subject: [PATCH 13/25] - user_menue: disable some items in movieplayer mode --- src/gui/user_menue.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index 96a3338e0..2ac1658c2 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -172,6 +172,8 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) else menu->addItem(GenericMenuSeparator); + bool _mode_ts = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_ts; + std::string itemstr_last("1"); std::vector items = ::split(g_settings.usermenu[button]->items, ','); @@ -206,7 +208,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) if (g_settings.recording_type == RECORDING_OFF) break; keyhelper.get(&key,&icon,CRCInput::RC_green); - menu_item = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, neutrino, "tsmoviebrowser", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, !_mode_ts, NULL, neutrino, "tsmoviebrowser", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); break; case SNeutrinoSettings::ITEM_TIMERLIST: @@ -221,17 +223,17 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) break; case SNeutrinoSettings::ITEM_EPG_SUPER: keyhelper.get(&key,&icon,CRCInput::RC_green); - menu_item = new CMenuDForwarder(LOCALE_EPGMENU_EPGPLUS , true, NULL, new CEPGplusHandler, "-1", key, icon); + menu_item = new CMenuDForwarder(LOCALE_EPGMENU_EPGPLUS, !_mode_ts, NULL, new CEPGplusHandler, "-1", key, icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); break; case SNeutrinoSettings::ITEM_EPG_LIST: keyhelper.get(&key,&icon,CRCInput::RC_red); - menu_item = new CMenuDForwarder(LOCALE_EPGMENU_EVENTLIST , true, NULL, new CEventListHandler, "-1", key, icon); + menu_item = new CMenuDForwarder(LOCALE_EPGMENU_EVENTLIST, !_mode_ts, NULL, new CEventListHandler, "-1", key, icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); break; case SNeutrinoSettings::ITEM_EPG_INFO: keyhelper.get(&key,&icon,CRCInput::RC_yellow); - menu_item = new CMenuDForwarder(LOCALE_EPGMENU_EVENTINFO , true, NULL, new CEPGDataHandler, "-1", key, icon); + menu_item = new CMenuDForwarder(LOCALE_EPGMENU_EVENTINFO, !_mode_ts, NULL, new CEPGDataHandler, "-1", key, icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); break; case SNeutrinoSettings::ITEM_EPG_MISC: @@ -249,7 +251,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) } case SNeutrinoSettings::ITEM_AUDIO_SELECT: keyhelper.get(&key,&icon); - menu_item = new CMenuDForwarder(LOCALE_AUDIOSELECTMENUE_HEAD, true, NULL, new CAudioSelectMenuHandler, "-1", key,icon); + menu_item = new CMenuDForwarder(LOCALE_AUDIOSELECTMENUE_HEAD, !_mode_ts, NULL, new CAudioSelectMenuHandler, "-1", key,icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); break; case SNeutrinoSettings::ITEM_SUBCHANNEL: @@ -388,12 +390,12 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) #endif case SNeutrinoSettings::ITEM_YOUTUBE: keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, true, NULL, neutrino, "ytplayback", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, !_mode_ts, NULL, neutrino, "ytplayback", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); break; case SNeutrinoSettings::ITEM_FILEPLAY: keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, neutrino, "fileplayback", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, !_mode_ts, NULL, neutrino, "fileplayback", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY); break; case SNeutrinoSettings::ITEM_AUDIOPLAY: From 8c9c98b3c95928b3449ba0f940a54ecbe0eb814d Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 17:08:56 +0100 Subject: [PATCH 14/25] - locale: smoother locals for movieplayer keys --- data/locale/deutsch.locale | 4 ++-- data/locale/english.locale | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 5dd719f07..39a287ea3 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1749,8 +1749,8 @@ movieplayer.tshelp8 ca. 5 Minuten zurück movieplayer.tshelp9 ca. 5 Minuten vor movieplayer.tsplayback TS Abspielen movieplayer.ytplayback Youtube-Feed Wiedergabe -mpkey.audio Audiotrack -mpkey.bookmark Speichere Lesezeichen +mpkey.audio Tonspuren +mpkey.bookmark Markierungen mpkey.forward Vorlauf mpkey.goto Zeiteingabe mpkey.next_repeat_mode Nächster Wiederholungs-Modus diff --git a/data/locale/english.locale b/data/locale/english.locale index 228f638af..80e2fe0b2 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1751,11 +1751,11 @@ movieplayer.tshelp8 approx. 5 minutes back movieplayer.tshelp9 skip approx. 5 minutes movieplayer.tsplayback Play TS movieplayer.ytplayback Youtube videoplayer -mpkey.audio Audio track -mpkey.bookmark save bookmark +mpkey.audio Audiotracks +mpkey.bookmark Bookmarks mpkey.forward Forward mpkey.goto Enter playtime -mpkey.next_repeat_mode next repeat mode +mpkey.next_repeat_mode Next repeat mode mpkey.pause Pause mpkey.play Play mpkey.plugin Movieplayer plugin From 22ad11ce7754a23171068ba0e8bad8d58368fa75 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 23:05:43 +0100 Subject: [PATCH 15/25] - movieplayer: change default key for bookmark menu --- src/neutrino.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 32e043dfb..bb52830eb 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4184,7 +4184,7 @@ void CNeutrinoApp::loadKeys(const char * fname) g_settings.mpkey_play = tconfig.getInt32( "mpkey.play", CRCInput::RC_play ); g_settings.mpkey_audio = tconfig.getInt32( "mpkey.audio", CRCInput::RC_green ); g_settings.mpkey_time = tconfig.getInt32( "mpkey.time", CRCInput::RC_timeshift ); - g_settings.mpkey_bookmark = tconfig.getInt32( "mpkey.bookmark", CRCInput::RC_blue ); + g_settings.mpkey_bookmark = tconfig.getInt32( "mpkey.bookmark", CRCInput::RC_yellow ); g_settings.mpkey_plugin = tconfig.getInt32( "mpkey.plugin", (unsigned int)CRCInput::RC_nokey ); g_settings.mpkey_subtitle = tconfig.getInt32( "mpkey.subtitle", CRCInput::RC_sub ); From a50bd5bb97fb250fc04f22482bc258b44dad3c5b Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 19:01:07 +0100 Subject: [PATCH 16/25] - infoviewer_bb: fix text for green button in movieplayer mode --- src/gui/infoviewer_bb.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 83f8988b2..6acc46d08 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -237,19 +237,18 @@ void CInfoViewerBB::getBBButtonInfo() case CInfoViewerBB::BUTTON_GREEN: icon = NEUTRINO_ICON_BUTTON_GREEN; frameBuffer->getIconSize(icon.c_str(), &w, &h); - text = CUserMenu::getUserMenuButtonName(1, active); - mode = CNeutrinoApp::getInstance()->getMode(); - if (!text.empty() && mode < NeutrinoMessages::mode_audio) - break; mode = CNeutrinoApp::getInstance()->getMode(); if (mode == NeutrinoMessages::mode_ts) { text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); - if (!text.empty()) + if (text != g_Locale->getText(LOCALE_MPKEY_AUDIO)) break; } + text = CUserMenu::getUserMenuButtonName(1, active); + if (!text.empty() && (mode == NeutrinoMessages::mode_tv || mode == NeutrinoMessages::mode_radio)) + break; text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title; - if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD)) - text = ""; + if (text != g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD)) + break; if ((mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) && !CMoviePlayerGui::getInstance().timeshift) { text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName(); } else if (!g_RemoteControl->current_PIDs.APIDs.empty()) { From 6fc8fb2bee91a2c46a350ac56c905ccaacbecef8 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 23:07:53 +0100 Subject: [PATCH 17/25] - movieplayer: change usermenu call; use existing instance --- src/gui/movieplayer.cpp | 6 ++---- src/neutrino.h | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index bb5a61b19..7c7995cab 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1181,12 +1181,10 @@ void CMoviePlayerGui::PlayFileLoop(void) } else if (msg == CRCInput::RC_sat) { //FIXME do nothing ? } else if (msg == CRCInput::RC_red || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow || msg == CRCInput::RC_blue ) { + //maybe move FileTime.kill to Usermenu to simplify this call bool restore = FileTime.IsVisible(); FileTime.kill(); - - CUserMenu u; - u.showUserMenu(msg); - + CNeutrinoApp::getInstance()->usermenu.showUserMenu(msg); if (restore) FileTime.show(position); update_lcd = true; diff --git a/src/neutrino.h b/src/neutrino.h index 192b794be..bb39e8322 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -77,7 +77,6 @@ private: CConfigFile configfile; CScanSettings scanSettings; CPersonalizeGui personalize; - CUserMenu usermenu; int network_dhcp; int network_automatic_start; @@ -156,6 +155,8 @@ public: norezap = 0x100 }; + CUserMenu usermenu; + void saveSetup(const char * fname); int loadSetup(const char * fname); void loadKeys(const char * fname = NULL); From a52a0e6c1beac7adc99b336995ada4247a60f2c3 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 20:34:23 +0100 Subject: [PATCH 18/25] - infoviewer: do always show all buttons; enable is controlled by usermenu --- src/gui/infoviewer.cpp | 6 ++++++ src/gui/infoviewer_bb.cpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 28e85454c..90c9add6b 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1347,16 +1347,20 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) if (is_visible) showRecordIcon(true); } else if (msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS) { if ((*(t_channel_id *) data) == current_channel_id) { +#if 0 if (is_visible && showButtonBar) infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_GREEN); +#endif if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); } return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES) { if ((*(t_channel_id *) data) == current_channel_id) { +#if 0 if (is_visible && showButtonBar) infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_YELLOW); +#endif } return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) { @@ -1758,6 +1762,8 @@ void CInfoViewer::show_Data (bool calledFromEvent) } #endif infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_RED); + infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_GREEN); + infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_YELLOW); } if ((info_CurrentNext.flags & CSectionsdClient::epgflags::not_broadcast) || diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 6acc46d08..3fcafb868 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -313,7 +313,11 @@ void CInfoViewerBB::getBBButtonInfo() // continue; } else +#else + if (!bbButtonInfo[i].active) + bbButtonInfo[i].paint = false; #endif + else { count++; bbButtonInfo[i].paint = true; From 47eb2e27ec2432eda40b4758ab89b737764adc57 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 20:59:55 +0100 Subject: [PATCH 19/25] - infoviewer_bb: don't paint deactivated buttons --- src/gui/infoviewer_bb.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 3fcafb868..3760a7530 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -213,12 +213,14 @@ void CInfoViewerBB::getBBButtonInfo() bbButtonMaxX = g_InfoViewer->ChanInfoX; int bbButtonMaxW = 0; int mode = NeutrinoMessages::mode_unknown; + int pers = -1; for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { int w = 0, h = 0; bool active; std::string text, icon; switch (i) { case CInfoViewerBB::BUTTON_RED: + pers = SNeutrinoSettings::P_MAIN_RED_BUTTON; icon = NEUTRINO_ICON_BUTTON_RED; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); @@ -235,6 +237,7 @@ void CInfoViewerBB::getBBButtonInfo() text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); break; case CInfoViewerBB::BUTTON_GREEN: + pers = SNeutrinoSettings::P_MAIN_GREEN_BUTTON; icon = NEUTRINO_ICON_BUTTON_GREEN; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); @@ -259,6 +262,7 @@ void CInfoViewerBB::getBBButtonInfo() } break; case CInfoViewerBB::BUTTON_YELLOW: + pers = SNeutrinoSettings::P_MAIN_YELLOW_BUTTON; icon = NEUTRINO_ICON_BUTTON_YELLOW; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); @@ -275,6 +279,7 @@ void CInfoViewerBB::getBBButtonInfo() text = g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME); break; case CInfoViewerBB::BUTTON_BLUE: + pers = SNeutrinoSettings::P_MAIN_BLUE_BUTTON; icon = NEUTRINO_ICON_BUTTON_BLUE; frameBuffer->getIconSize(icon.c_str(), &w, &h); mode = CNeutrinoApp::getInstance()->getMode(); @@ -298,6 +303,8 @@ void CInfoViewerBB::getBBButtonInfo() bbButtonInfo[i].h = h; bbButtonInfo[i].text = text; bbButtonInfo[i].icon = icon; + if (pers > -1 && (g_settings.personalize[pers] != CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED)) + active = false; bbButtonInfo[i].active = active; } // Calculate position/size of buttons From 736343d35b7b65239fa4b098c76f19ae82a2689e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Dec 2015 22:18:12 +0100 Subject: [PATCH 20/25] - neutrino: press tv/radio key to return to plain tv/radio --- src/gui/audioplayer.cpp | 1 + src/gui/filebrowser.cpp | 2 ++ src/gui/moviebrowser.cpp | 1 + src/gui/movieplayer.cpp | 1 + src/gui/pictureviewer.cpp | 1 + src/gui/upnpbrowser.cpp | 2 ++ src/neutrino.cpp | 9 +++++++++ src/neutrinoMessages.h | 1 + 8 files changed, 18 insertions(+) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 3227be9b4..23d8bdc3a 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -819,6 +819,7 @@ int CAudioPlayerGui::show() else if (msg == NeutrinoMessages::RECORD_START || msg == NeutrinoMessages::ZAPTO || msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || ((msg == NeutrinoMessages::SLEEPTIMER) && !data)) { diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 1829e30b6..fa2485457 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -678,6 +678,7 @@ bool CFileBrowser::exec(const char * const dirname) } } else if (msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { @@ -957,6 +958,7 @@ bool CFileBrowser::playlist_manager(CFileList &playlist, unsigned int playing) loop = false; } else if (msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 82c02eee2..7136c71eb 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1091,6 +1091,7 @@ int CMovieBrowser::exec(const char* path) //FIXME do nothing ? } else if (msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 7c7995cab..0fea9a14b 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1163,6 +1163,7 @@ void CMoviePlayerGui::PlayFileLoop(void) CNeutrinoApp::getInstance()->handleMsg(msg, data); } else if (msg == NeutrinoMessages::ZAPTO || msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || ((msg == NeutrinoMessages::SLEEPTIMER) && !data) ) { // Exit for Record/Zapto Timers printf("CMoviePlayerGui::PlayFile: ZAPTO etc..\n"); diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 3b98f59ad..07c8d979e 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -621,6 +621,7 @@ int CPictureViewerGui::show() else if (msg == NeutrinoMessages::RECORD_START || msg == NeutrinoMessages::ZAPTO || msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index d38eb3b78..d7cc5de49 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -530,6 +530,7 @@ void CUpnpBrowserGui::selectDevice() else if (msg == NeutrinoMessages::RECORD_START || msg == NeutrinoMessages::ZAPTO || msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { @@ -841,6 +842,7 @@ bool CUpnpBrowserGui::selectItem(std::string id) else if (msg == NeutrinoMessages::RECORD_START || msg == NeutrinoMessages::ZAPTO || msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { diff --git a/src/neutrino.cpp b/src/neutrino.cpp index bb52830eb..5c1b16d2e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2795,6 +2795,11 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) g_RCInput->postMsg(NeutrinoMessages::SHUTDOWN, 0); return messages_return::cancel_all | messages_return::handled; } + else if ((msg == CRCInput::RC_tv) || (msg == CRCInput::RC_radio)) { + if (data == 0) + g_RCInput->postMsg(NeutrinoMessages::LEAVE_ALL, 0); + return messages_return::cancel_all | messages_return::handled; + } else if (msg == (neutrino_msg_t) g_settings.key_power_off /*CRCInput::RC_standby*/) { if (data == 0) { neutrino_msg_t new_msg; @@ -3153,6 +3158,10 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) g_RCInput->clearRCMsg(); return messages_return::handled; } + else if( msg == NeutrinoMessages::LEAVE_ALL ) { + g_RCInput->clearRCMsg(); + return messages_return::handled; + } else if( msg == NeutrinoMessages::STANDBY_ON ) { if( mode != mode_standby ) { standbyMode( true ); diff --git a/src/neutrinoMessages.h b/src/neutrinoMessages.h index 2de01b397..65519c02f 100644 --- a/src/neutrinoMessages.h +++ b/src/neutrinoMessages.h @@ -74,6 +74,7 @@ struct NeutrinoMessages { REBOOT = CRCInput::RC_Messages + 21, RELOAD_SETUP = CRCInput::RC_Messages + 22, SHOW_MAINMENU = CRCInput::RC_Messages + 23, + LEAVE_ALL = CRCInput::RC_Messages + 24, EVT_VOLCHANGED = CRCInput::RC_Events + 1, EVT_MUTECHANGED = CRCInput::RC_Events + 2, From 109f3e5d9cc4994e3c14895e9e89ba36f9f51e33 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 15 Dec 2015 09:05:21 +0100 Subject: [PATCH 21/25] - yWeb: add locale for timer type --- src/nhttpd/web/languages/Deutsch | 1 + src/nhttpd/web/languages/English | 1 + 2 files changed, 2 insertions(+) diff --git a/src/nhttpd/web/languages/Deutsch b/src/nhttpd/web/languages/Deutsch index 5355382c4..8f5cf6c27 100644 --- a/src/nhttpd/web/languages/Deutsch +++ b/src/nhttpd/web/languages/Deutsch @@ -519,6 +519,7 @@ live.timer_edit.standby=Standby live.timer_edit.plugin=Plugin live.timer_edit.rec_dir=Aufnahmeverzeichnis live.timer_edit.description=Beschreibung +live.timer_edit.type=Typ =========== LIVE Timer Sync live.timer-sync.get_timer=Timer holen. diff --git a/src/nhttpd/web/languages/English b/src/nhttpd/web/languages/English index 5d8d454a8..f5fbe84f1 100644 --- a/src/nhttpd/web/languages/English +++ b/src/nhttpd/web/languages/English @@ -522,6 +522,7 @@ live.timer_edit.standby=Standby live.timer_edit.plugin=Plugin live.timer_edit.rec_dir=Recordind directory live.timer_edit.description=Description +live.timer_edit.type=Type =========== LIVE Timer Sync live.timer-sync.get_timer=Get timer. From e4de37f1bba3bbdf5d0050d683c24226839f1a62 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Tue, 15 Dec 2015 09:57:53 +0100 Subject: [PATCH 22/25] CMoviePlayerGui: Send PLUGIN_PLAYSTATE_LEAVE_ALL to plugin... ...when tv/radio button are pressed on remote control - Set Lua api version to 1.32 --- src/gui/lua/luainstance.cpp | 9 +++++---- src/gui/lua/luainstance.h | 2 +- src/gui/movieplayer.cpp | 4 ++-- src/gui/movieplayer.h | 9 +++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index d3de36800..a0fe82396 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -277,10 +277,11 @@ static void set_lua_variables(lua_State *L) table_key playstate[] = { - { "NORMAL", CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL }, - { "STOP", CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP }, - { "NEXT", CMoviePlayerGui::PLUGIN_PLAYSTATE_NEXT }, - { "PREV", CMoviePlayerGui::PLUGIN_PLAYSTATE_PREV }, + { "NORMAL", CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL }, + { "STOP", CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP }, + { "NEXT", CMoviePlayerGui::PLUGIN_PLAYSTATE_NEXT }, + { "PREV", CMoviePlayerGui::PLUGIN_PLAYSTATE_PREV }, + { "LEAVE_ALL", CMoviePlayerGui::PLUGIN_PLAYSTATE_LEAVE_ALL }, { NULL, 0 } }; diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 5a96eed88..96e52714e 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -31,7 +31,7 @@ extern "C" { #include "luainstance_helpers.h" #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 31 +#define LUA_API_VERSION_MINOR 32 /* inspired by Steve Kemp http://www.steve.org.uk/ */ class CLuaInstance diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 0fea9a14b..b028a27f8 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1171,7 +1171,7 @@ void CMoviePlayerGui::PlayFileLoop(void) menu_ret = menu_return::RETURN_EXIT_ALL; playstate = CMoviePlayerGui::STOPPED; - keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP; + keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_LEAVE_ALL; ClearQueue(); g_RCInput->postMsg(msg, data); } else if (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER) { @@ -1194,7 +1194,7 @@ void CMoviePlayerGui::PlayFileLoop(void) printf("CMoviePlayerGui::PlayFile: neutrino handleMsg messages_return::cancel_all\n"); menu_ret = menu_return::RETURN_EXIT_ALL; playstate = CMoviePlayerGui::STOPPED; - keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP; + keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_LEAVE_ALL; ClearQueue(); } else if (msg <= CRCInput::RC_MaxRC ) { diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 2adda1ae0..ba1f2fadf 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -69,10 +69,11 @@ class CMoviePlayerGui : public CMenuTarget enum { - PLUGIN_PLAYSTATE_NORMAL = 0, - PLUGIN_PLAYSTATE_STOP = 1, - PLUGIN_PLAYSTATE_NEXT = 2, - PLUGIN_PLAYSTATE_PREV = 3 + PLUGIN_PLAYSTATE_NORMAL = 0, + PLUGIN_PLAYSTATE_STOP = 1, + PLUGIN_PLAYSTATE_NEXT = 2, + PLUGIN_PLAYSTATE_PREV = 3, + PLUGIN_PLAYSTATE_LEAVE_ALL = 4 }; enum repeat_mode_enum { REPEAT_OFF = 0, REPEAT_TRACK = 1, REPEAT_ALL = 2 }; From 9b2aec781c10c9cc798d449430a00b8584f04f1f Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 15 Dec 2015 12:05:53 +0100 Subject: [PATCH 23/25] - streaminfo: align background color; thx to max_10 --- src/gui/streaminfo2.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 4d3a592d1..14b20e61e 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -185,7 +185,7 @@ int CStreamInfo2::doSignalStrengthLoop () g_Font[font_info]->RenderString(dx1 , average_bitrate_pos, offset+10, tmp_str, COL_INFOBAR_TEXT); sprintf(currate, "%5llu.%02llu", rate.short_average / 1000ULL, rate.short_average % 1000ULL); - frameBuffer->paintBoxRel (dx1 + average_bitrate_offset , average_bitrate_pos -dheight, sw, dheight, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBoxRel (dx1 + average_bitrate_offset , average_bitrate_pos -dheight, sw, dheight, COL_MENUCONTENT_PLUS_0); g_Font[font_info]->RenderString (dx1 + average_bitrate_offset , average_bitrate_pos, sw - 10, currate, COL_INFOBAR_TEXT); @@ -429,7 +429,7 @@ void CStreamInfo2::SignalRenderStr(unsigned int value, int _x, int _y) char str[30]; int fw = g_Font[font_small]->getWidth(); fw *=(fw>17)?5:6; - frameBuffer->paintBoxRel(_x, _y - sheight + 5, fw, sheight -1, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBoxRel(_x, _y - sheight + 5, fw, sheight -1, COL_MENUCONTENT_PLUS_0); sprintf(str,"%6u",value); g_Font[font_small]->RenderString(_x, _y + 5, fw, str, COL_INFOBAR_TEXT); } @@ -458,7 +458,7 @@ void CStreamInfo2::paint (int /*mode*/) CVFD::getInstance ()->setMode (CVFD::MODE_MENU_UTF8, head_string); // paint backround, title pig, etc. - frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUCONTENT_PLUS_0); g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD_TEXT); ypos += hheight; @@ -471,7 +471,7 @@ void CStreamInfo2::paint (int /*mode*/) } else { // -- small PIG, small signal graph // -- paint backround, title pig, etc. - frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUCONTENT_PLUS_0); // -- paint large signal graph paint_signal_fe_box (x, y, width, height-100); @@ -489,7 +489,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) yypos = ypos; if(box_h > 0) - frameBuffer->paintBoxRel (0, ypos, box_width, box_h, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBoxRel (0, ypos, box_width, box_h, COL_MENUCONTENT_PLUS_0); CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel(); if(!channel) @@ -762,7 +762,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos) unsigned short i; int box_width = width*2/3-10; if (box_h2 > ypos+(iheight*2)) - frameBuffer->paintBox(0, ypos+(iheight*2), box_width, box_h2, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBox(0, ypos+(iheight*2), box_width, box_h2, COL_MENUCONTENT_PLUS_0); std::string casys[NUM_CAIDS]={"Irdeto:","Betacrypt:","Seca:","Viaccess:","Nagra:","Conax: ","Cryptoworks:","Videoguard:","EBU:","XCrypt:","PowerVU:"}; bool caids[NUM_CAIDS]; @@ -997,7 +997,7 @@ void CStreamInfo2::showSNR () if (signalbox == NULL) { signalbox = new CSignalBox(x + 10, yypos, 240, 50, frontend); - signalbox->setColorBody(COL_MENUHEAD_PLUS_0); + signalbox->setColorBody(COL_MENUCONTENT_PLUS_0); signalbox->setTextColor(COL_INFOBAR_TEXT); signalbox->doPaintBg(true); } From 72efa20dfafa6e090e2eb4ea271a2cb764b71e21 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 15 Dec 2015 17:20:34 +0300 Subject: [PATCH 24/25] neutrino.cpp: try to fix stopping by signal while playback in progress --- src/neutrino.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 5c1b16d2e..905ce3f57 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4062,8 +4062,9 @@ void stop_daemons(bool stopall, bool for_flash) videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)0); } - CZapit::getInstance()->Stop(); delete &CMoviePlayerGui::getInstance(); + + CZapit::getInstance()->Stop(); printf("zapit shutdown done\n"); if (!for_flash) { CVFD::getInstance()->Clear(); From 4b7b43f028ca7d933b4c9865d39f3f7400448a94 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 15 Dec 2015 17:03:14 +0100 Subject: [PATCH 25/25] fix compil use good oprator --- lib/libconfigfile/configfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libconfigfile/configfile.cpp b/lib/libconfigfile/configfile.cpp index 27ee51be4..a85e75e34 100644 --- a/lib/libconfigfile/configfile.cpp +++ b/lib/libconfigfile/configfile.cpp @@ -55,7 +55,7 @@ bool CConfigFile::loadConfig(const char * const filename, char _delimiter) { std::ifstream configFile(filename); - if (configFile != NULL) + if (configFile.good()) { std::string s; clear(); @@ -97,7 +97,7 @@ bool CConfigFile::saveConfig(const char * const filename, char _delimiter) unlink(tmpname.c_str()); std::fstream configFile(tmpname.c_str(), std::ios::out); - if (configFile != NULL) + if (configFile.good()) { std::cout << "[ConfigFile] saving " << filename << std::endl; for (ConfigDataMap::const_iterator it = configData.begin(); it != configData.end(); ++it)