infoviewer: get rid of "gotTime" variable

It was set from EVT_TIMESET, which is no longer used, and can be
replaced easily by the (already used) "timeset" from sectionsd.
Races and locking can safely be ignored in this case.


Origin commit data
------------------
Branch: ni/coolstream
Commit: f107519131
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-23 (Sat, 23 Jan 2016)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2016-01-23 13:16:10 +01:00
parent acea6c1a9a
commit 0aa77127a3

View File

@@ -143,8 +143,6 @@ void CInfoViewer::Init()
recordModeActive = false;
is_visible = false;
showButtonBar = false;
//gotTime = g_Sectionsd->getIsTimeSet ();
gotTime = timeset;
virtual_zap_mode = false;
newfreq = true;
chanready = 1;
@@ -504,7 +502,7 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos)
if (!(info_CurrentNext.flags & (CSectionsdClient::epgflags::has_later | CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::not_broadcast))) {
neutrino_locale_t loc;
if (!gotTime)
if (!timeset)
loc = LOCALE_INFOVIEWER_WAITTIME;
else if (showButtonBar)
loc = LOCALE_INFOVIEWER_EPGWAIT;
@@ -535,8 +533,6 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe
showButtonBar = true;
fileplay = true;
reset_allScala();
if (!gotTime)
gotTime = timeset;
if (g_settings.radiotext_enable && g_Radiotext) {
g_Radiotext->RT_MsgShow = true;
@@ -691,8 +687,6 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
newfreq = true;
reset_allScala();
if (!gotTime)
gotTime = timeset;
if(!is_visible && !calledFromNumZap)
fader.StartFadeIn();
@@ -1431,7 +1425,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
infoViewerBB->showIcon_16_9 ();
return messages_return::handled;
} else if (msg == NeutrinoMessages::EVT_TIMESET) {
gotTime = true;
// gotTime = true;
return messages_return::handled;
}
#if 0
@@ -1744,7 +1738,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
int seit = (abs(jetzt - info_CurrentNext.current_zeit.startzeit) + 30) / 60;
int rest = (info_CurrentNext.current_zeit.dauer / 60) - seit;
runningPercent = 0;
if (!gotTime)
if (!timeset)
snprintf(runningRest, sizeof(runningRest), "%d %s", info_CurrentNext.current_zeit.dauer / 60, unit_short_minute);
else if (jetzt < info_CurrentNext.current_zeit.startzeit)
snprintf(runningRest, sizeof(runningRest), "%s %d %s", g_Locale->getText(LOCALE_WORD_IN), seit, unit_short_minute);
@@ -1800,7 +1794,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
(calledFromEvent && !(info_CurrentNext.flags & (CSectionsdClient::epgflags::has_next|CSectionsdClient::epgflags::has_current))))
{
// no EPG available
display_Info(g_Locale->getText(gotTime ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), NULL);
display_Info(g_Locale->getText(timeset ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), NULL);
/* send message. Parental pin check gets triggered on EPG events... */
/* clear old info in getEPG */
CSectionsdClient::CurrentNextInfo dummy;
@@ -1861,7 +1855,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
// no EPG available
ChanInfoY += height;
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (gotTime ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR_TEXT);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (timeset ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR_TEXT);
} else {
// irgendein EPG gefunden
int duration1Width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (runningRest);