mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
neutrino: unify modes handling; ...
remove double enum from CNeutrinoApp and move mostly used enum from NeutrinoMessages to new NeutrinoModes
Origin commit data
------------------
Branch: ni/coolstream
Commit: 028ec3cf3c
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-20 (Mon, 20 Nov 2017)
Origin message was:
------------------
- neutrino: unify modes handling; ...
remove double enum from CNeutrinoApp and move mostly used enum from NeutrinoMessages to new NeutrinoModes
------------------
This commit was generated by Migit
This commit is contained in:
@@ -941,7 +941,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
|
||||
showInfoFile();
|
||||
|
||||
// Radiotext
|
||||
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio || CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webradio)
|
||||
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_radio || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio)
|
||||
{
|
||||
if ((g_settings.radiotext_enable) && (!recordModeActive) && (!calledFromNumZap))
|
||||
showRadiotext();
|
||||
@@ -962,18 +962,18 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext)
|
||||
//define timeouts
|
||||
switch (mode)
|
||||
{
|
||||
case NeutrinoMessages::mode_radio:
|
||||
case NeutrinoMessages::mode_webradio:
|
||||
case NeutrinoModes::mode_radio:
|
||||
case NeutrinoModes::mode_webradio:
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] + timeout_ext);
|
||||
break;
|
||||
case NeutrinoMessages::mode_ts:
|
||||
case NeutrinoModes::mode_ts:
|
||||
if (CMoviePlayerGui::getInstance().IsAudioPlaying())
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MEDIA_AUDIO] + timeout_ext);
|
||||
else
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MEDIA_VIDEO] + timeout_ext);
|
||||
break;
|
||||
case NeutrinoMessages::mode_tv:
|
||||
case NeutrinoMessages::mode_webtv:
|
||||
case NeutrinoModes::mode_tv:
|
||||
case NeutrinoModes::mode_webtv:
|
||||
default:
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + timeout_ext);
|
||||
break;
|
||||
@@ -983,7 +983,7 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext)
|
||||
bool CInfoViewer::showLivestreamInfo()
|
||||
{
|
||||
CZapitChannel * cc = CZapit::getInstance()->GetCurrentChannel();
|
||||
bool web_mode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webradio);
|
||||
bool web_mode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio);
|
||||
if (web_mode && cc->getEpgID() == 0)
|
||||
{
|
||||
std::string livestreamInfo1 = "";
|
||||
@@ -1191,7 +1191,7 @@ void CInfoViewer::loop(bool show_dot)
|
||||
showRecordIcon (show_dot);
|
||||
show_dot = !show_dot;
|
||||
showInfoFile();
|
||||
if ((g_settings.radiotext_enable) && (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio))
|
||||
if ((g_settings.radiotext_enable) && (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_radio))
|
||||
showRadiotext();
|
||||
|
||||
infoViewerBB->showIcon_16_9();
|
||||
@@ -1214,7 +1214,7 @@ void CInfoViewer::loop(bool show_dot)
|
||||
CNeutrinoApp *neutrino = CNeutrinoApp::getInstance ();
|
||||
if ((msg == (neutrino_msg_t) g_settings.key_quickzap_up) || (msg == (neutrino_msg_t) g_settings.key_quickzap_down) || (msg == CRCInput::RC_0) || (msg == NeutrinoMessages::SHOW_INFOBAR)) {
|
||||
hideIt = false; // default
|
||||
if ((g_settings.radiotext_enable) && (neutrino->getMode() == NeutrinoMessages::mode_radio))
|
||||
if ((g_settings.radiotext_enable) && (neutrino->getMode() == NeutrinoModes::mode_radio))
|
||||
hideIt = true;
|
||||
|
||||
int rec_mode = CRecordManager::getInstance()->GetRecordMode();
|
||||
@@ -1641,7 +1641,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
showLivestreamInfo();
|
||||
infoViewerBB->showBBButtons(true /*paintFooter*/); // in case button text has changed
|
||||
}
|
||||
if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio))
|
||||
if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoModes::mode_radio))
|
||||
g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid);
|
||||
}
|
||||
return messages_return::handled;
|
||||
@@ -2454,7 +2454,7 @@ void CInfoViewer::showLcdPercentOver()
|
||||
{
|
||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1)
|
||||
{
|
||||
if (fileplay || NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()) {
|
||||
if (fileplay || NeutrinoModes::mode_ts == CNeutrinoApp::getInstance()->getMode()) {
|
||||
CVFD::getInstance()->showPercentOver(CMoviePlayerGui::getInstance().file_prozent);
|
||||
return;
|
||||
}
|
||||
@@ -2486,7 +2486,7 @@ void CInfoViewer::showLcdPercentOver()
|
||||
}
|
||||
CLCD::getInstance()->showPercentOver(runningPercent);
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if ((mode == NeutrinoMessages::mode_radio || mode == NeutrinoMessages::mode_tv))
|
||||
if ((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_tv))
|
||||
CVFD::getInstance()->setEPGTitle(info_CurrentNext.current_name);
|
||||
}
|
||||
}
|
||||
@@ -2494,7 +2494,7 @@ void CInfoViewer::showLcdPercentOver()
|
||||
void CInfoViewer::showLcdPercentOver ()
|
||||
{
|
||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) {
|
||||
if (fileplay || (NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode())) {
|
||||
if (fileplay || (NeutrinoModes::mode_ts == CNeutrinoApp::getInstance()->getMode())) {
|
||||
CVFD::getInstance ()->showPercentOver (CMoviePlayerGui::getInstance().file_prozent);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user