summaryrefslogtreecommitdiff
path: root/menu_searchresults.c
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2017-07-30 13:01:17 +0200
committerFrank Neumann <fnu@yavdr.org>2017-07-30 13:01:17 +0200
commit99d0b7b65fc20519d91c0debcbdf23f24f15fc24 (patch)
treec0184aec8e4cffeba626f572681a823596391a43 /menu_searchresults.c
parentc804b85247f2ae8e3ba412b2e266bc3fed51d1ae (diff)
downloadvdr-plugin-epgsearch-99d0b7b65fc20519d91c0debcbdf23f24f15fc24.tar.gz
vdr-plugin-epgsearch-99d0b7b65fc20519d91c0debcbdf23f24f15fc24.tar.bz2
Add icon for inactive timer.
Diffstat (limited to 'menu_searchresults.c')
-rw-r--r--menu_searchresults.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/menu_searchresults.c b/menu_searchresults.c
index 99c11bf..023cf8d 100644
--- a/menu_searchresults.c
+++ b/menu_searchresults.c
@@ -63,6 +63,7 @@ cMenuSearchResultsItem::cMenuSearchResultsItem(const cEvent *EventInfo, bool Epi
menuTemplate = MenuTemplate?MenuTemplate:cTemplFile::GetTemplateByName("MenuSearchResults");
search = Search;
inSwitchList = false;
+ timerActive = false;
Update(true);
}
@@ -75,14 +76,16 @@ bool cMenuSearchResultsItem::Update(bool Force)
eTimerMatch OldTimerMatch = timerMatch;
bool OldInSwitchList = inSwitchList;
+ bool OldtimerActive = timerActive;
bool hasMatch = false;
const cTimer* timer = NULL;
LOCK_TIMERS_READ;
if (event) timer = Timers->GetMatch(event, &timerMatch);
if (event) inSwitchList = (SwitchTimers.InSwitchList(event)!=NULL);
if (timer) hasMatch = true;
+ if (timer) timerActive = timer->HasFlags(tfActive);
- if (Force || timerMatch != OldTimerMatch || inSwitchList != OldInSwitchList)
+ if (Force || timerMatch != OldTimerMatch || inSwitchList != OldInSwitchList || timerActive != OldtimerActive)
{
char t[Utf8BufSize(2)]="",v[Utf8BufSize(2)]="",r[Utf8BufSize(2)]="";
char szStatus[Utf8BufSize(4)] = "";
@@ -90,7 +93,7 @@ bool cMenuSearchResultsItem::Update(bool Force)
{
if (!isUTF8)
{
- t[0] = event && hasMatch ? (timerMatch == tmFull) ? ((timer && timer->Recording())?ICON_REC:ICON_CLOCK) : ICON_CLOCK_HALF : ' ';
+ t[0] = event && hasMatch ? (timerMatch == tmFull) ? ((timer && timer->Recording()) ? ICON_REC : (timerActive ? ICON_CLOCK : ICON_TIMER_INACT)) : (timerActive ? ICON_CLOCK_HALF : ' ') : ' ';
t[1] = '\0';
v[0] = event && event->Vps() && (event->Vps() - event->StartTime()) ? ICON_VPS : ' ';
v[1] = '\0';
@@ -102,7 +105,7 @@ bool cMenuSearchResultsItem::Update(bool Force)
{
#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 96
#else
- sprintf(t, "%s", (event && hasMatch ? (timerMatch == tmFull) ? ((timer && timer->Recording())?ICON_REC_UTF8:ICON_CLOCK_UTF8) : ICON_CLOCK_HALF_UTF8 : " "));
+ sprintf(t, "%s", (event && hasMatch ? (timerMatch == tmFull) ? ((timer && timer->Recording()) ? ICON_REC_UTF8 : (timerActive ? ICON_CLOCK_UTF8 : ICON_TIMER_INACT_UTF8)) : (timerActive ? ICON_CLOCK_HALF_UTF8: " ") : " "));
sprintf(v, "%s", event && event->Vps() && (event->Vps() - event->StartTime()) ? ICON_VPS_UTF8 : " ");
sprintf(r, "%s", (event && event->IsRunning() ? ICON_RUNNING_UTF8 : " "));
#endif
@@ -110,7 +113,7 @@ bool cMenuSearchResultsItem::Update(bool Force)
}
else
{
- t[0] = event && hasMatch ? (timerMatch == tmFull) ? ((timer && timer->Recording())?'R':'T') : 't' : ' ';
+ t[0] = event && hasMatch ? (timerMatch == tmFull) ? ((timer && timer->Recording()) ? 'R' : (timerActive ? 'T' : 'i')) : (timerActive ? 't' :' ') : ' ';
t[1] = '\0';
v[0] = event && event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' ';
v[1] = '\0';