- adzap: hide blue button if needed

This commit is contained in:
svenhoefer
2016-02-28 21:33:10 +01:00
parent 2fd298fa22
commit 4b104f0509

View File

@@ -242,6 +242,7 @@ void CAdZapMenu::Settings()
CChannelEventList evtlist; CChannelEventList evtlist;
CEitManager::getInstance()->getEventsServiceKey(channelId & 0xFFFFFFFFFFFFULL, evtlist); CEitManager::getInstance()->getEventsServiceKey(channelId & 0xFFFFFFFFFFFFULL, evtlist);
monitorLifeTime.tv_sec = 0; monitorLifeTime.tv_sec = 0;
bool show_monitor = false;
if (!evtlist.empty()) if (!evtlist.empty())
{ {
sort(evtlist.begin(), evtlist.end(), sortByDateTime); sort(evtlist.begin(), evtlist.end(), sortByDateTime);
@@ -253,6 +254,7 @@ void CAdZapMenu::Settings()
if ((u_int) eli->startTime + (u_int) eli->duration > (u_int) ts.tv_sec) if ((u_int) eli->startTime + (u_int) eli->duration > (u_int) ts.tv_sec)
{ {
monitorLifeTime.tv_sec = (uint) eli->startTime + eli->duration; monitorLifeTime.tv_sec = (uint) eli->startTime + eli->duration;
show_monitor = true;
Update(); Update();
break; break;
} }
@@ -278,7 +280,7 @@ void CAdZapMenu::Settings()
minute = LOCALE_ADZAP_MINUTES; minute = LOCALE_ADZAP_MINUTES;
} }
menu->setFooter(CAdZapMenuFooterButtons, CAdZapMenuFooterButtonCount); menu->setFooter(CAdZapMenuFooterButtons, CAdZapMenuFooterButtonCount - (show_monitor ? 0 : 1));
menu->exec(NULL, ""); menu->exec(NULL, "");
menu->hide(); menu->hide();
delete menu; delete menu;