mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- followscreenings: fix CFollowScreenings::FOLLOWSCREENINGS_ALWAYS
* add enumeration for a better readability Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -92,7 +92,7 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK
|
|||||||
if (i->eventType == CTimerd::TIMER_RECORD) {
|
if (i->eventType == CTimerd::TIMER_RECORD) {
|
||||||
if (channel_id == i->channel_id && e->startTime == i->epg_starttime) {
|
if (channel_id == i->channel_id && e->startTime == i->epg_starttime) {
|
||||||
Timer.removeTimerEvent(i->eventID);
|
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 = "";
|
forwarders[ix]->iconName_Info_right = "";
|
||||||
#if 0
|
#if 0
|
||||||
else
|
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) {
|
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 ...
|
//FIXME -- no error handling, but this shouldn't happen ...
|
||||||
} else {
|
} 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;
|
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,
|
ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG,
|
||||||
CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
|
CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
@@ -156,11 +156,12 @@ void CFollowScreenings::show()
|
|||||||
|
|
||||||
getFollowScreenings();
|
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);
|
snprintf(actionstr, sizeof(actionstr), "%lu", followlist.front().startTime);
|
||||||
exec(NULL, actionstr);
|
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);
|
CMenuWidget m(LOCALE_EPGVIEWER_SELECT_SCREENING, NEUTRINO_ICON_SETTINGS);
|
||||||
const char *icon = NEUTRINO_ICON_BUTTON_RED;
|
const char *icon = NEUTRINO_ICON_BUTTON_RED;
|
||||||
|
@@ -62,6 +62,7 @@ class CFollowScreenings : public CMenuTarget
|
|||||||
{
|
{
|
||||||
FOLLOWSCREENINGS_OFF = 0,
|
FOLLOWSCREENINGS_OFF = 0,
|
||||||
FOLLOWSCREENINGS_ON = 1,
|
FOLLOWSCREENINGS_ON = 1,
|
||||||
|
FOLLOWSCREENINGS_ALWAYS = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
CFollowScreenings(const t_channel_id Channel_id, time_t Starttime, time_t Stoptime, const std::string &Title, uint64_t EpgID=0,
|
CFollowScreenings(const t_channel_id Channel_id, time_t Starttime, time_t Stoptime, const std::string &Title, uint64_t EpgID=0,
|
||||||
|
@@ -177,9 +177,9 @@ const CMenuOptionChooser::keyval END_OF_RECORDING[END_OF_RECORDING_COUNT] =
|
|||||||
|
|
||||||
const CMenuOptionChooser::keyval timer_followscreenings_options[] =
|
const CMenuOptionChooser::keyval timer_followscreenings_options[] =
|
||||||
{
|
{
|
||||||
{0, LOCALE_OPTIONS_OFF},
|
{CFollowScreenings::FOLLOWSCREENINGS_OFF , LOCALE_OPTIONS_OFF },
|
||||||
{1, LOCALE_OPTIONS_ON},
|
{CFollowScreenings::FOLLOWSCREENINGS_ON , LOCALE_OPTIONS_ON },
|
||||||
{2, LOCALE_OPTIONS_ALWAYS}
|
{CFollowScreenings::FOLLOWSCREENINGS_ALWAYS , LOCALE_OPTIONS_ALWAYS}
|
||||||
};
|
};
|
||||||
size_t timer_followscreenings_options_count = sizeof(timer_followscreenings_options)/sizeof(CMenuOptionChooser::keyval);
|
size_t timer_followscreenings_options_count = sizeof(timer_followscreenings_options)/sizeof(CMenuOptionChooser::keyval);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user