Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] yaepg feature an event timer flag



I'm trying to add a feature to yaepg that shows a record icon in the
top right of the event box in the guide when it has a timer.

I have another idea that I will also try; Instead of using a record
icon, drawing a red horizontal line from startTime to stopTime.

I think it does not work if your are using start & stop margins other
than 0 and It currently flags the previous event instead of the actual
timer event, I have no idea why? Here is what I have done...

--- ./PLUGINS/src/yaepg-0.0.2/yaepg.c   2005-02-11 04:16:32.000000000 -0500
+++ ./PLUGINS/src/yaepg-0.0.2.1-mod/yaepg.c     2005-02-11
06:41:57.261342368 -0500
@@ -15,6 +15,7 @@
 static const tColor tint               = (tColor) 0xFF002850;
 static const tColor highlight          = (tColor) 0xFF505050;
 static const tColor lightgrey          = (tColor) 0xFFAAAAAA;
+static const tColor red                        = (tColor) 0xFFFF0066;

 #define fontChanBox                    fontYaepg
 #define fontTimeBox                    fontYaepg
@@ -114,6 +115,7 @@
 protected:
        bool            initialized;
        int             arrow;
+       bool            timerexists;

 public:
        cTextBox(void);
@@ -167,6 +169,7 @@

        initialized = true;
        arrow = 0;
+       timerexists = false;
 }

 cTextBox::~cTextBox()
@@ -213,6 +216,7 @@

        initialized = true;
        arrow = 0;
+       timerexists = false;
 }

 int
@@ -343,6 +347,19 @@
                DrawLine(width-2, height/2, width-10, 0, lightgrey);
                DrawLine(width-2, height/2, width-10, height, lightgrey);
        }
+       /* 
+        * Add timer exist mark.
+        */
+       if (timerexists) {
+               DrawLine(width-15, 5, width-15, 6, red);
+               DrawLine(width-16, 3, width-16, 8, red);
+               DrawLine(width-17, 3, width-17, 8, red);
+               DrawLine(width-18, 2, width-18, 9, red);
+               DrawLine(width-19, 2, width-19, 9, red);
+               DrawLine(width-20, 3, width-20, 8, red);
+               DrawLine(width-21, 3, width-21, 8, red);
+               DrawLine(width-22, 5, width-22, 6, red);
+       }

        destBmp->DrawBitmap(bx, by, *bitmap);

@@ -654,6 +671,7 @@
        arrow = arrowFlag;
        SetHLColor(highlight);
        SetText(1, e->Title());
+       timerexists = e->HasTimer();
 }

 cEventBox::~cEventBox()




Home | Main Index | Thread Index