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