mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
infobar timout: add member to get current timeout modes
Avoids multiple code in some source files.
Origin commit data
------------------
Branch: ni/coolstream
Commit: e0be304aef
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-04-10 (Tue, 10 Apr 2018)
Origin message was:
------------------
infobar timout: add member to get current timeout modes
Avoids multiple code in some source files.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1427,11 +1427,7 @@ int CChannelList::numericZap(int key)
|
||||
|
||||
CZapitChannel* chan = getChannel(chn);
|
||||
if (doZap) {
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (
|
||||
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.timing[SNeutrinoSettings::HANDLING_INFOBAR] == 0) ||
|
||||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.timing[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] == 0)
|
||||
)
|
||||
if (!g_InfoViewer->hasTimeout())
|
||||
g_InfoViewer->killTitle();
|
||||
|
||||
if(chan && SameTP(chan)) {
|
||||
@@ -1553,11 +1549,7 @@ void CChannelList::virtual_zap_mode(bool up)
|
||||
g_InfoViewer->resetSwitchMode(); //disable virtual_zap_mode
|
||||
|
||||
if (doZap) {
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (
|
||||
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.timing[SNeutrinoSettings::HANDLING_INFOBAR] == 0) ||
|
||||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.timing[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] == 0)
|
||||
)
|
||||
if (!g_InfoViewer->hasTimeout())
|
||||
g_InfoViewer->killTitle();
|
||||
|
||||
if(channel && SameTP(channel))
|
||||
|
@@ -2551,3 +2551,13 @@ void CInfoViewer::ecmInfoBox_hide()
|
||||
ecmInfoBox = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool CInfoViewer::hasTimeout()
|
||||
{
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
bool ret = (
|
||||
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR] != 0) ||
|
||||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] != 0)
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
|
@@ -223,5 +223,6 @@ class CInfoViewer
|
||||
uint32_t getUpdateTimer(void) { return lcdUpdateTimer; }
|
||||
inline t_channel_id get_current_channel_id(void) { return current_channel_id; }
|
||||
void ResetModules();
|
||||
bool hasTimeout();
|
||||
};
|
||||
#endif
|
||||
|
@@ -3083,11 +3083,7 @@ void CNeutrinoApp::RealRun()
|
||||
else if( ( msg == CRCInput::RC_help ) || ( msg == CRCInput::RC_info) ||
|
||||
( msg == NeutrinoMessages::SHOW_INFOBAR ) )
|
||||
{
|
||||
bool enabled_by_timing = (
|
||||
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR] != 0) ||
|
||||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] != 0)
|
||||
);
|
||||
bool show_info = ((msg != NeutrinoMessages::SHOW_INFOBAR) || (g_InfoViewer->is_visible || enabled_by_timing));
|
||||
bool show_info = ((msg != NeutrinoMessages::SHOW_INFOBAR) || (g_InfoViewer->is_visible || g_InfoViewer->hasTimeout()));
|
||||
|
||||
// turn on LCD display
|
||||
CVFD::getInstance()->wake_up();
|
||||
|
Reference in New Issue
Block a user