From fe4f04cc08574e2ef5fd86a73c26ec479d5e337b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 25 Oct 2016 22:40:50 +0200 Subject: [PATCH] followscreenings: don't show menu if just one event is found Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/56e668ae952f57e3b036083e5377e33a9670c416 Author: vanhofen Date: 2016-10-25 (Tue, 25 Oct 2016) Origin message was: ------------------ - followscreenings: don't show menu if just one event is found ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/followscreenings.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/gui/followscreenings.cpp b/src/gui/followscreenings.cpp index 292878930..f8a63edf0 100644 --- a/src/gui/followscreenings.cpp +++ b/src/gui/followscreenings.cpp @@ -87,14 +87,12 @@ 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 0 - if (followlist.size() > 1) + if (!forwarders.empty()) forwarders[ix]->iconName_Info_right = ""; +#if 0 else ShowMsg(LOCALE_TIMER_EVENTREMOVED_TITLE, LOCALE_TIMER_EVENTREMOVED_MSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); -#else - forwarders[ix]->iconName_Info_right = ""; #endif return menu_return::RETURN_REPAINT; } @@ -108,14 +106,12 @@ 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 0 - if (followlist.size() > 1) + if (!forwarders.empty()) forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC; +#if 0 else ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); -#else - forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC; #endif return menu_return::RETURN_REPAINT; } @@ -152,12 +148,10 @@ void CFollowScreenings::show() getFollowScreenings(); -#if 0 if (followlist.size() == 1) { snprintf(actionstr, sizeof(actionstr), "%lu", followlist.front().startTime); exec(NULL, actionstr); } else { -#endif CMenuWidget m(LOCALE_EPGVIEWER_SELECT_SCREENING, NEUTRINO_ICON_SETTINGS); const char *icon = NEUTRINO_ICON_BUTTON_RED; neutrino_msg_t directKey = CRCInput::RC_red; @@ -180,8 +174,6 @@ void CFollowScreenings::show() } m.enableSaveScreen(true); m.exec(NULL, ""); -#if 0 } -#endif }