diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 7ca96135f..f3bef00cc 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 @@ -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 @@ -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 2dd21602b..9c01a60f5 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 @@ -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 diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index 123687d45..830d4c4bc 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 cfbcba1a3..14b61e092 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 6fe0a3176..f2c26b254 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/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) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index c359b35fa..5624f5eac 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -820,6 +820,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 a84984de3..89de8df40 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -679,6 +679,7 @@ bool CFileBrowser::exec(const char * const dirname) } } else if (msg == NeutrinoMessages::STANDBY_ON || + msg == NeutrinoMessages::LEAVE_ALL || msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { @@ -958,6 +959,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/infoviewer.cpp b/src/gui/infoviewer.cpp index 38189394c..a5a0b0db8 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1350,16 +1350,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_AUDIO); + 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_SUBS); + infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_YELLOW); +#endif } return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) { @@ -1764,7 +1768,9 @@ void CInfoViewer::show_Data (bool calledFromEvent) frameBuffer->paintBackgroundBoxRel (BoxEndX - 108, posy, 112, height2); } #endif - infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_EPG); + 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 96cd28215..0b20cb897 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 @@ -212,36 +213,45 @@ 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_EPG: + 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(); if (mode == NeutrinoMessages::mode_ts) { - text = g_Locale->getText(LOCALE_EPGMENU_STREAMINFO); - } 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_AUDIO: + case CInfoViewerBB::BUTTON_GREEN: + pers = SNeutrinoSettings::P_MAIN_GREEN_BUTTON; 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) + if (mode == NeutrinoMessages::mode_ts) { + text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active); + 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()) { @@ -251,9 +261,16 @@ void CInfoViewerBB::getBBButtonInfo() } } break; - case CInfoViewerBB::BUTTON_SUBS: + 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(); + 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; @@ -261,9 +278,16 @@ 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: + pers = SNeutrinoSettings::P_MAIN_BLUE_BUTTON; 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; @@ -279,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 @@ -287,12 +313,18 @@ 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 0 + if ((i == CInfoViewerBB::BUTTON_YELLOW) && (g_RemoteControl->subChannels.empty())) { // no subchannels bbButtonInfo[i].paint = false; // bbButtonInfo[i].x = -1; // continue; } else +#else + if (!bbButtonInfo[i].active) + bbButtonInfo[i].paint = false; +#endif + else { count++; bbButtonInfo[i].paint = true; @@ -314,22 +346,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; @@ -346,10 +378,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; } } @@ -401,7 +433,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 }; diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 25b69f2e4..ee908e0d9 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_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}, @@ -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); @@ -492,7 +496,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); @@ -566,3 +570,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 b099956e3..a43067ead 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, @@ -114,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 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/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/lua_video.cpp b/src/gui/lua/lua_video.cpp index c1f7207b4..5dc90e6b4 100644 --- a/src/gui/lua/lua_video.cpp +++ b/src/gui/lua/lua_video.cpp @@ -61,6 +61,8 @@ void CLuaInstVideo::LuaVideoRegister(lua_State *L) { "zapitStopPlayBack", CLuaInstVideo::zapitStopPlayBack }, { "channelRezap", CLuaInstVideo::channelRezap }, { "createChannelIDfromUrl", CLuaInstVideo::createChannelIDfromUrl }, + { "getNeutrinoMode", CLuaInstVideo::getNeutrinoMode }, + { "setSinglePlay", CLuaInstVideo::setSinglePlay }, { "__gc", CLuaInstVideo::VideoDelete }, { NULL, NULL } }; @@ -114,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; @@ -186,6 +193,24 @@ 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::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 39edbe122..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() {}; }; @@ -54,6 +55,8 @@ 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 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.cpp b/src/gui/lua/luainstance.cpp index 51e1912b3..7cd56e294 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -280,10 +280,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 } }; @@ -310,7 +311,6 @@ static void set_lua_variables(lua_State *L) { NULL, 0 } }; - table_key curl_status[] = { { "OK", (lua_Integer)CLuaInstCurl::LUA_CURL_OK }, @@ -321,6 +321,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[] = { @@ -334,6 +351,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 4b4d0fe41..fe3654c0b 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -32,7 +32,7 @@ extern "C" { #if 0 #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 27 +#define LUA_API_VERSION_MINOR 32 #endif /* inspired by Steve Kemp http://www.steve.org.uk/ */ diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 9d2b82240..9741c4dd7 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 501ad01dd..897729fd6 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1170,6 +1170,7 @@ void CMoviePlayerGui::PlayFileLoop(void) } if (restore) FileTime.show(position); +#if 0 } else if (msg == CRCInput::RC_red) { bool restore = FileTime.IsVisible(); FileTime.kill(); @@ -1178,6 +1179,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) { @@ -1189,6 +1191,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"); @@ -1196,7 +1199,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) { @@ -1206,12 +1209,20 @@ 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 ) { + //maybe move FileTime.kill to Usermenu to simplify this call + bool restore = FileTime.IsVisible(); + FileTime.kill(); + CNeutrinoApp::getInstance()->usermenu.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"); 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 }; diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index fdbdbb765..ae6607a40 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -622,6 +622,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/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 67fa62c20..03317fd54 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -176,7 +176,7 @@ int CStreamInfo2::doSignalStrengthLoop () sprintf(currate, "%u", rate.short_average / 1000); g_Font[font_info]->RenderString(dx1, average_bitrate_pos, width/2, br_str, COL_INFOBAR_TEXT); g_Font[font_info]->RenderString(dx1+average_bitrate_offset+sw+10 , average_bitrate_pos, offset, avg_str, COL_INFOBAR_TEXT); - 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, currate, COL_INFOBAR_TEXT); } if (!mp) { @@ -268,12 +268,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(); @@ -419,7 +424,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); } @@ -448,7 +453,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; @@ -461,7 +466,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); @@ -479,7 +484,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) @@ -752,7 +757,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]; @@ -999,7 +1004,7 @@ void CStreamInfo2::showSNR () if (signalbox == NULL) { signalbox = new CSignalBox(sigBox_x, snr_y, 240, snr_h, frontend); - signalbox->setColorBody(COL_MENUHEAD_PLUS_0); + signalbox->setColorBody(COL_MENUCONTENT_PLUS_0); signalbox->setTextColor(COL_INFOBAR_TEXT); signalbox->doPaintBg(true); } 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/gui/user_menue.cpp b/src/gui/user_menue.cpp index 385cf47fc..7b1d72bb3 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -173,6 +173,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, ','); @@ -207,7 +209,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: @@ -222,17 +224,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: @@ -250,7 +252,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: @@ -389,12 +391,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: diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 5c3a3e691..a15888e58 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2857,6 +2857,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; @@ -3217,6 +3222,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 ); @@ -4196,8 +4205,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(); @@ -4332,7 +4342,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 ); 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); 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, 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. 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",