- followscreenings: fix CFollowScreenings::FOLLOWSCREENINGS_ALWAYS

* add enumeration for a better readability

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-05-30 10:11:39 +02:00
committed by Thilo Graf
parent 67b4fec5a6
commit 752e2171c7
3 changed files with 10 additions and 8 deletions

View File

@@ -92,7 +92,7 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK
if (i->eventType == CTimerd::TIMER_RECORD) {
if (channel_id == i->channel_id && e->startTime == i->epg_starttime) {
Timer.removeTimerEvent(i->eventID);
if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == 2 /*always*/))
if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == FOLLOWSCREENINGS_ALWAYS))
forwarders[ix]->iconName_Info_right = "";
#if 0
else
@@ -113,9 +113,9 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK
e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true) == -1) {
//FIXME -- no error handling, but this shouldn't happen ...
} else {
if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == 2 /*always*/))
if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == FOLLOWSCREENINGS_ALWAYS))
forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC;
else if (g_settings.timer_followscreenings != 2 /*always*/)
else if (g_settings.timer_followscreenings != FOLLOWSCREENINGS_ALWAYS) //NI
ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG,
CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
return menu_return::RETURN_REPAINT;
@@ -156,11 +156,12 @@ void CFollowScreenings::show()
getFollowScreenings();
if (followlist.size() == 1 && g_settings.timer_followscreenings < 2 /*always*/) {
if (followlist.size() == 1 && g_settings.timer_followscreenings != FOLLOWSCREENINGS_ALWAYS)
{
snprintf(actionstr, sizeof(actionstr), "%lu", followlist.front().startTime);
exec(NULL, actionstr);
}
else if (followlist.size() > 1)
else if (followlist.size() > 1 || g_settings.timer_followscreenings == FOLLOWSCREENINGS_ALWAYS)
{
CMenuWidget m(LOCALE_EPGVIEWER_SELECT_SCREENING, NEUTRINO_ICON_SETTINGS);
const char *icon = NEUTRINO_ICON_BUTTON_RED;