summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <kamel5 (at) gmx (dot) net>2018-03-08 14:16:33 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-01-27 11:30:14 +0100
commite476e0e8c07b3715ae123b4251dbab8800939d10 (patch)
tree42325c1942ae0843dcdaf98dddb1ee00b9d32ad5
parent881c95a61c066124fda197eb08d15c1d370d5d71 (diff)
downloadvdr-plugin-tvguide-e476e0e8c07b3715ae123b4251dbab8800939d10.tar.gz
vdr-plugin-tvguide-e476e0e8c07b3715ae123b4251dbab8800939d10.tar.bz2
Show inactive timer
-rw-r--r--epggrid.c28
-rw-r--r--epggrid.h3
2 files changed, 27 insertions, 4 deletions
diff --git a/epggrid.c b/epggrid.c
index 7a21834..80dbc8e 100644
--- a/epggrid.c
+++ b/epggrid.c
@@ -33,7 +33,6 @@ void cEpgGrid::SetViewportHeight() {
}
void cEpgGrid::PositionPixmap() {
- int x0, y0;
if (tvguideConfig.displayMode == eVertical) {
int x0 = column->getX();
int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
@@ -70,8 +69,13 @@ void cEpgGrid::SetTimer() {
hasTimer = true;
else
hasTimer = false;
+#if VDRVERSNUM >= 20301
+ } else if (event->HasTimer()) {
+ hasTimer = true;
+#else
} else if (column->HasTimer()) {
hasTimer = event->HasTimer();
+#endif
} else {
hasTimer = false;
}
@@ -105,6 +109,16 @@ void cEpgGrid::drawText() {
colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack);
else
colorTextBack = clrTransparent;
+/* if (hasSwitchTimer)
+ colorTextBack = theme.Color(clrButtonYellow);
+ if (hasTimer) {
+ LOCK_TIMERS_READ;
+ timer = Timers->GetMatch(event);
+ if (timer && timer->HasFlags(tfActive))
+ colorTextBack = theme.Color(clrButtonRed);
+ else
+ colorTextBack = theme.Color(clrButtonGreen);
+ }*/
if (tvguideConfig.displayMode == eVertical) {
if (Height()/geoManager.minutePixel < 6)
return;
@@ -139,8 +153,16 @@ void cEpgGrid::drawText() {
}
if (hasSwitchTimer)
drawIcon("Switch", theme.Color(clrButtonYellow));
- if (hasTimer)
- drawIcon("REC", theme.Color(clrButtonRed));
+ if (hasTimer) {
+ const cTimer *timer = NULL;
+ LOCK_TIMERS_READ;
+ timer = Timers->GetMatch(event);
+ if (timer)
+ if (timer->HasFlags(tfActive))
+ drawIcon("REC", theme.Color(clrButtonRed));
+ else
+ drawIcon("REC", theme.Color(clrButtonGreen));
+ }
}
void cEpgGrid::drawIcon(cString iconText, tColor color) {
diff --git a/epggrid.h b/epggrid.h
index 95f40ea..1333ef1 100644
--- a/epggrid.h
+++ b/epggrid.h
@@ -8,6 +8,7 @@
class cEpgGrid : public cGrid {
private:
+ const cTimer *timer;
const cEvent *event;
cTextWrapper *extText;
cString timeString;
@@ -29,4 +30,4 @@ public:
void debug();
};
-#endif //__TVGUIDE_EPGGRID_H \ No newline at end of file
+#endif //__TVGUIDE_EPGGRID_H