summaryrefslogtreecommitdiff
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
parentc804b85247f2ae8e3ba412b2e266bc3fed51d1ae (diff)
downloadvdr-plugin-epgsearch-99d0b7b65fc20519d91c0debcbdf23f24f15fc24.tar.gz
vdr-plugin-epgsearch-99d0b7b65fc20519d91c0debcbdf23f24f15fc24.tar.bz2
Add icon for inactive timer.
-rw-r--r--epgsearchtools.h2
-rw-r--r--menu_searchresults.c11
-rw-r--r--menu_searchresults.h1
-rw-r--r--menu_whatson.c11
-rw-r--r--menu_whatson.h1
5 files changed, 18 insertions, 8 deletions
diff --git a/epgsearchtools.h b/epgsearchtools.h
index 9b80473..7ad67f7 100644
--- a/epgsearchtools.h
+++ b/epgsearchtools.h
@@ -91,6 +91,7 @@ using std::string;
#define ICON_BAR_EMPTY 0x89
#define ICON_BAR_CLOSE 0x8A
#define ICON_VPS 0x93
+#define ICON_TIMER_INACT 0x95
// UTF-8 Icons
#define ICON_BAR_OPEN_UTF8 "\uE007"
@@ -102,6 +103,7 @@ using std::string;
#define ICON_CLOCK_HALF_UTF8 "\uE014"
#define ICON_RUNNING_UTF8 "\uE012"
#define ICON_VPS_UTF8 "\uE013"
+#define ICON_TIMER_INACT_UTF8 "\uE015"
#define CONTENT_DESCRIPTOR_MAX 255
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';
diff --git a/menu_searchresults.h b/menu_searchresults.h
index 36b8665..6bb7f62 100644
--- a/menu_searchresults.h
+++ b/menu_searchresults.h
@@ -52,6 +52,7 @@ class cMenuSearchResultsItem : public cOsdItem {
public:
eTimerMatch timerMatch;
bool inSwitchList;
+ bool timerActive;
const cEvent *event;
const cSearchExt* search;
const char *FileName(void) { return fileName; }
diff --git a/menu_whatson.c b/menu_whatson.c
index 2c85b10..7f7dab3 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -63,6 +63,7 @@ cMenuMyScheduleItem::cMenuMyScheduleItem(const cTimers *Timers, const cEvent *Ev
timerMatch = tmNone;
isRemote = false;
inSwitchList = false;
+ timerActive = false;
menuTemplate = MenuTemplate;
Update(Timers, true);
}
@@ -81,15 +82,17 @@ bool cMenuMyScheduleItem::Update(const cTimers* Timers, bool Force)
eTimerMatch OldTimerMatch = timerMatch;
bool OldIsRemote = isRemote;
bool OldInSwitchList = inSwitchList;
+ bool OldtimerActive = timerActive;
bool hasMatch = false;
const cTimer* timer = NULL;
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 (timer) isRemote = timer->Remote();
if (Force || timerMatch != OldTimerMatch || inSwitchList != OldInSwitchList
- || isRemote != OldIsRemote)
+ || isRemote != OldIsRemote || timerActive != OldtimerActive)
{
char szProgressPart[Utf8BufSize(12)] = "";
char szProgressPartT2S[12] = "";
@@ -159,7 +162,7 @@ bool cMenuMyScheduleItem::Update(const cTimers* Timers, 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 : ' ' ): ' ';
v[0] = event && event->Vps() && (event->Vps() - event->StartTime()) ? ICON_VPS : ' ';
r[0] = event && event->IsRunning() ? ICON_RUNNING : ' ';
}
@@ -167,7 +170,7 @@ bool cMenuMyScheduleItem::Update(const cTimers* Timers, 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
@@ -175,7 +178,7 @@ bool cMenuMyScheduleItem::Update(const cTimers* Timers, 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' : ' ') : ' ';
v[0] = event && event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' ';
r[0] = event && event->IsRunning() ? '*' : ' ';
}
diff --git a/menu_whatson.h b/menu_whatson.h
index 225056c..803b4bb 100644
--- a/menu_whatson.h
+++ b/menu_whatson.h
@@ -38,6 +38,7 @@ public:
eTimerMatch timerMatch;
bool isRemote;
bool inSwitchList;
+ bool timerActive;
cMenuTemplate* menuTemplate;
cMenuMyScheduleItem(const cTimers *Timers, const cEvent *Event, const cChannel *Channel = NULL, showMode ShowMode = showNow, cMenuTemplate* menuTemplate = NULL);