I'm not the developer of the yaepghd plugin, but I had a deeper look at the source code. Many things of the record dialog have already been implemented, but the record dialog isn't called anywhere in the source code. So I think this done intentionally. I implemented a small patch, that adds the possibility to set timer with the red button without any record dialog. The patch attached contains also some other minor improvements from other authors. If you have questions concerning the patch, you can ask at vdr-portal.de http://www.vdr-portal.de/board/thread.php?threadid=83864&threadview=0&page=3 (even it's a German forum, you will get answers in English ;) ). > I have been trying out the yaepghd plugin. It looks very impressive > but the record dialog appears to be disabled. Does anyone know if this > has been intentionally disabled or is only partially implemented? > > There has been no development activity on this plugin for about > 9 months now. > > > > > > _______________________________________________ > vdr mailing list > vdr@xxxxxxxxxxx > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
diff -NaurwB yaepghdorig/po/de_DE.po yaepghdpatched/po/de_DE.po --- yaepghdorig/po/de_DE.po 2009-11-09 20:00:46.000000000 +0100 +++ yaepghdpatched/po/de_DE.po 2009-11-09 20:26:29.000000000 +0100 @@ -6,9 +6,9 @@ msgstr "" "Project-Id-Version: Yaepghd 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2009-01-30 20:42+0200\n" -"PO-Revision-Date: 2009-01-28 10:51+0200\n" -"Last-Translator: Klaus Schmidinger <kls@xxxxxxxxxx>\n" +"POT-Creation-Date: 2009-10-18 22:24+0200\n" +"PO-Revision-Date: 2009-10-15 22:58+0100\n" +"Last-Translator: Tomas Saxer <tsaxer@xxxxxx>\n" "Language-Team: <vdr@xxxxxxxxxxx>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" @@ -17,14 +17,15 @@ msgid "No Info" msgstr "Keine Daten verf�" -msgid "Screenshot" -msgstr "" +#, fuzzy +msgid "Timer" +msgstr "Zeit-Format" msgid "Page up" -msgstr "" +msgstr "Seite hoch" msgid "Page down" -msgstr "" +msgstr "Seite runter" msgid "Once" msgstr "Sobald" @@ -54,10 +55,10 @@ msgstr "" msgid "Up" -msgstr "" +msgstr "Hoch" msgid "Down" -msgstr "" +msgstr "Runter" msgid "Manual" msgstr "" @@ -83,6 +84,9 @@ msgid "Channel order" msgstr "" +msgid "Channel number" +msgstr "" + msgid "Yet another EPG in HD" msgstr "" diff -NaurwB yaepghdorig/po/fi_FI.po yaepghdpatched/po/fi_FI.po --- yaepghdorig/po/fi_FI.po 2009-11-09 20:00:46.000000000 +0100 +++ yaepghdpatched/po/fi_FI.po 2009-11-09 20:26:29.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Yaepghd 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2009-01-30 20:42+0200\n" +"POT-Creation-Date: 2009-10-18 22:24+0200\n" "PO-Revision-Date: 2009-01-28 10:51+0200\n" "Last-Translator: Rolf Ahrenberg <rahrenbe@xxxxxxxxx>\n" "Language-Team: <vdr@xxxxxxxxxxx>\n" @@ -18,8 +18,9 @@ msgid "No Info" msgstr "Ei tietoja" -msgid "Screenshot" -msgstr "Ota kuva" +#, fuzzy +msgid "Timer" +msgstr "Kellonajan esitysmuoto" msgid "Page up" msgstr "Sivu ylös" @@ -84,8 +85,15 @@ msgid "Channel order" msgstr "Kanavajärjetys" +#, fuzzy +msgid "Channel number" +msgstr "Kanavajärjetys" + msgid "Yet another EPG in HD" msgstr "Vaihtoehtoinen ohjelmaopas" msgid "YaepgHD" msgstr "Ohjelmaopas (YaepgHD)" + +#~ msgid "Screenshot" +#~ msgstr "Ota kuva" diff -NaurwB yaepghdorig/yaepghd.c yaepghdpatched/yaepghd.c --- yaepghdorig/yaepghd.c 2009-11-09 20:00:46.000000000 +0100 +++ yaepghdpatched/yaepghd.c 2009-10-21 12:40:41.000000000 +0200 @@ -24,6 +24,8 @@ #include <vdr/osd.h> #include <vdr/device.h> #include <vdr/thread.h> +#include <vdr/player.h> +#include <vdr/timers.h> #ifndef YAEPGHDVERSNUM #error "You must apply the yaepghd patch for VDR!" @@ -36,6 +38,7 @@ /** * Macros */ +#define WO__MSG_RECDLG #ifdef DEBUG #define ASSERT assert @@ -70,6 +73,7 @@ #define GRID_TIME_FONT THEME_FONT("gridTimeFont") #define GRID_DATE_FONT THEME_FONT("gridDateFont") #define EVENT_TITLE_FONT THEME_FONT("eventTitleFont") +#define EVENT_INFO_FONT THEME_FONT("eventInfoFont") #define EVENT_TIME_FONT THEME_FONT("eventTimeFont") #define EVENT_DESC_FONT THEME_FONT("eventDescFont") #define EVENT_DATE_FONT THEME_FONT("eventDateFont") @@ -81,6 +85,7 @@ #define GRID_DATE_COLOR THEME_COLOR("gridDateColor") #define GRID_SEP_COLOR THEME_COLOR("gridSepColor") #define EVENT_TITLE_COLOR THEME_COLOR("eventTitleColor") +#define EVENT_INFO_COLOR THEME_COLOR("eventInfoColor") #define EVENT_TIME_COLOR THEME_COLOR("eventTimeColor") #define EVENT_DESC_COLOR THEME_COLOR("eventDescColor") #define EVENT_DATE_COLOR THEME_COLOR("eventDateColor") @@ -90,6 +95,7 @@ #define GRID_TIME_GEOM THEME_GEOM("gridTimeGeom") #define GRID_DATE_GEOM THEME_GEOM("gridDateGeom") #define EVENT_TITLE_GEOM THEME_GEOM("eventTitleGeom") +#define EVENT_INFO_GEOM THEME_GEOM("eventInfoGeom") #define EVENT_TIME_GEOM THEME_GEOM("eventTimeGeom") #define EVENT_DESC_GEOM THEME_GEOM("eventDescGeom") #define EVENT_DATE_GEOM THEME_GEOM("eventDateGeom") @@ -156,6 +162,7 @@ static int iChannelChange = CHANNEL_CHANGE_MANUAL; static int iTimeFormat = TIME_FORMAT_12H; static int iChannelOrder = CHANNEL_ORDER_DOWN; +static int iChannelNumber = false; static std::string sThemeName = "default"; static std::string sThemeDir = ""; @@ -272,6 +279,7 @@ AddElement("gridTimeFont", THEME_FONT); AddElement("gridDateFont", THEME_FONT); AddElement("eventTitleFont", THEME_FONT); + AddElement("eventInfoFont", THEME_FONT); AddElement("eventTimeFont", THEME_FONT); AddElement("eventDescFont", THEME_FONT); AddElement("eventDateFont", THEME_FONT); @@ -283,6 +291,7 @@ AddElement("gridTimeColor", THEME_COLOR); AddElement("gridDateColor", THEME_COLOR); AddElement("eventTitleColor", THEME_COLOR); + AddElement("eventInfoColor", THEME_COLOR); AddElement("eventTimeColor", THEME_COLOR); AddElement("eventDescColor", THEME_COLOR); AddElement("eventDateColor", THEME_COLOR); @@ -292,6 +301,7 @@ AddElement("gridTimeGeom", THEME_GEOM); AddElement("gridDateGeom", THEME_GEOM); AddElement("eventTitleGeom", THEME_GEOM); + AddElement("eventInfoGeom", THEME_GEOM); AddElement("eventTimeGeom", THEME_GEOM); AddElement("eventDescGeom", THEME_GEOM); AddElement("eventDateGeom", THEME_GEOM); @@ -765,6 +775,12 @@ *s-- = '\0'; } + /* Remove newlines in descriptions */ + char *newlineText = tokText; + strreplace(newlineText, '\n', ' '); + + + /* Break text up into lines */ char *line, *nextLine = tokText; @@ -1334,9 +1350,9 @@ chanInfo[i].nameBox.FgColor(GRID_CHAN_COLOR); chanInfo[i].nameBox.BgColor(clrTransparent); chanInfo[i].nameBox.Flags((eTextFlags)(TBOX_VALIGN_LEFT | TBOX_HALIGN_CENTER)); - chanInfo[i].nameBox.X(geom.x + (geom.w / 2)); + chanInfo[i].nameBox.X(geom.x); // + (geom.w / 2)); chanInfo[i].nameBox.Y(geom.y + ROUND((float)i * (chanRowHeight + (float)horizSpace))); - chanInfo[i].nameBox.W(geom.w / 2); + chanInfo[i].nameBox.W(geom.w); // / 2); chanInfo[i].nameBox.H(ROUND(chanRowHeight)); chanInfo[i].nameBox.Generate(); @@ -1354,7 +1370,7 @@ YAEPG_INFO("Drawing grid channels at (%d %d)", geom.x, geom.y); for (int i = 0; i < (int)chanInfo.size(); i++) { - chanInfo[i].numBox.Draw(bmp); + //chanInfo[i].numBox.Draw(bmp); chanInfo[i].nameBox.Draw(bmp); } } @@ -1460,12 +1476,8 @@ void cYaepgGridDate::UpdateTime(time_t _t) { - struct tm locTime; - + sprintf(dateStr,"%s", *DateString(_t)); t = _t; - localtime_r(&t, &locTime); - snprintf(dateStr, sizeof(dateStr), "%s %d/%d", - *WeekDayName((locTime.tm_wday + 6) % 6), locTime.tm_mon, locTime.tm_mday); Generate(); } @@ -1551,6 +1563,68 @@ box.Draw(bmp); } + + + + +/* + ***************************************************************************** + * cYaepgEventInfo + ***************************************************************************** + */ +class cYaepgEventInfo { +private: + tGeom geom; + const cEvent *event; + cYaepgTextBox box; + +public: + cYaepgEventInfo(const cEvent *_event); + void UpdateEvent(const cEvent *_event) { event = _event; Generate(); } + void Generate(void); + void Draw(cBitmap *bmp); +}; + +cYaepgEventInfo::cYaepgEventInfo(const cEvent *_event) : + event(_event) +{ + geom = EVENT_INFO_GEOM; + Generate(); +} + +static const char *TimerMatchChars = " tT"; + +void +cYaepgEventInfo::Generate(void) +{ + int timerMatch=tmNone; + Timers.GetMatch(event, &timerMatch); + char t = TimerMatchChars[timerMatch]; + char v = event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' '; + char r = event->SeenWithin(30) && event->IsRunning() ? '*' : ' '; + cString buffer; + buffer = cString::sprintf("%c %c %c", t, v, r); + + box.Text(buffer); + box.Font(EVENT_INFO_FONT); + box.FgColor(EVENT_INFO_COLOR); + box.BgColor(clrTransparent); + box.Flags((eTextFlags)(TBOX_VALIGN_LEFT | TBOX_HALIGN_BOTTOM | TBOX_WRAP)); + box.X(geom.x); + box.Y(geom.y); + box.W(geom.w); + box.H(geom.h); + box.Generate(); +} + +void +cYaepgEventInfo::Draw(cBitmap *bmp) +{ + YAEPG_INFO("Drawing event info at (%d %d)", geom.x, geom.y); + + box.Draw(bmp); +} + /* ***************************************************************************** * cYaepgEventTime @@ -1822,7 +1896,7 @@ }; const char *cYaepgHelpBar::helpStrs[4] = { - trNOOP("Screenshot"), + trNOOP("Timer"), trNOOP("Page up"), trNOOP("Page down"), trVDR("Button$Switch") @@ -1843,7 +1917,7 @@ for (int i = 0; i < 4; i++) { boxes[i].Text(tr(helpStrs[i])); boxes[i].Font(GRID_EVENT_FONT); - boxes[i].FgColor(GRID_EVENT_COLOR); + boxes[i].FgColor(EVENT_TITLE_COLOR); boxes[i].BgColor(clrTransparent); boxes[i].Flags((eTextFlags)(TBOX_VALIGN_LEFT | TBOX_HALIGN_CENTER)); boxes[i].X(geom.x + (i * boxWidth) + dotDiam); @@ -1868,9 +1942,6 @@ } for (int i = 0; i < 4; i++) { - bmp->DrawEllipse(dots[i].x1, dots[i].y1, - dots[i].x2, dots[i].y2, - dots[i].color); boxes[i].Draw(bmp); } } @@ -2488,11 +2559,15 @@ cYaepgGridTime *gridTime; cYaepgGridDate *gridDate; cYaepgEventTitle *eventTitle; + cYaepgEventInfo *eventInfo; cYaepgEventTime *eventTime; cYaepgEventDesc *eventDesc; cYaepgEventDate *eventDate; cYaepgTimeLine *timeLine; cYaepgHelpBar *helpBar; + #ifndef WO__MSG_RECDLG + cYaepgHelpBar *helpBar; + #endif public: cYaepghd(void); @@ -2506,6 +2581,7 @@ void UpdateEvent(const cEvent *newEvent); void MoveCursor(eCursorDir dir); void SwitchToCurrentChannel(bool closeVidWin = false); + void AddDelTimer(void); void Draw(void); }; @@ -2523,11 +2599,20 @@ gridTime(NULL), gridDate(NULL), eventTitle(NULL), + eventInfo(NULL), eventTime(NULL), eventDesc(NULL), eventDate(NULL), timeLine(NULL), + #ifndef WO__MSG_RECDLG + helpBar(NULL), + recDlg(NULL) +#else helpBar(NULL) +#endif + + + { memset(&mainWin, 0, sizeof(mainWin)); chanVec.clear(); @@ -2543,6 +2628,7 @@ delete gridDate; delete timeLine; delete eventTitle; + delete eventInfo; delete eventTime; delete eventDesc; delete eventDate; @@ -2605,6 +2691,7 @@ timeLine = new cYaepgTimeLine(t); const cEvent *e = gridEvents->Event(); eventTitle = new cYaepgEventTitle(e); + eventInfo = new cYaepgEventInfo(e); eventTime = new cYaepgEventTime(e); eventDesc = new cYaepgEventDesc(e); eventDate = new cYaepgEventDate(); @@ -2613,6 +2700,35 @@ Draw(); } +void +cYaepghd::AddDelTimer(void) + { + const cEvent *event=gridEvents->Event(); + int timerMatch; + cTimer *ti; + ti=Timers.GetMatch(event, &timerMatch); + if (timerMatch==tmFull) + { + if (ti) + { + isyslog("deleting timer %s", *ti->ToDescr()); + Timers.Del(ti); + Timers.SetModified(); + eventInfo->UpdateEvent(event); + } + } + else + { + cTimer *timer = new cTimer(event); + Timers.Add(timer); + Timers.SetModified(); + isyslog("timer %s added (active)", *timer->ToDescr()); + eventInfo->UpdateEvent(event); + } + } + + + eOSState cYaepghd::ProcessKey(eKeys key) { @@ -2657,8 +2773,12 @@ else state = osEnd; break; + + + case kRed: - cDevice::PrimaryDevice()->GrabImageFile("yaepghd.jpg", true, 256, -1, -1); + AddDelTimer(); + needsRedraw = true; state = osContinue; break; case kGreen: @@ -2683,6 +2803,9 @@ state = osContinue; // -12 hours break; + + + case k0 ... k9: if (directChan || (key != k0)) { directChan = ((directChan * 10) + ((key & ~k_Repeat) - k0)) % 100000; @@ -2852,8 +2975,10 @@ } event = newEvent; eventTitle->UpdateEvent(event); + eventInfo->UpdateEvent(event); eventTime->UpdateEvent(event); eventDesc->UpdateEvent(event); + } void @@ -2933,6 +3058,7 @@ gridDate->Draw(mainBmp); timeLine->Draw(mainBmp); eventTitle->Draw(mainBmp); + eventInfo->Draw(mainBmp); eventTime->Draw(mainBmp); eventDesc->Draw(mainBmp); eventDate->Draw(mainBmp); @@ -2954,6 +3080,7 @@ int iNewChannelChange; int iNewTimeFormat; int iNewChannelOrder; + int iNewChannelNumber; int iNewThemeIndex; char **themes; int numThemes; @@ -2977,6 +3104,7 @@ iChannelChange = iNewChannelChange; iTimeFormat = iNewTimeFormat; iChannelOrder = iNewChannelOrder; + iChannelNumber = iNewChannelNumber; sThemeName = themes[iNewThemeIndex]; SetupStore("HideMenuEntry", iHideMenuEntry); @@ -2984,6 +3112,7 @@ SetupStore("ChannelChange", iChannelChange); SetupStore("TimeFormat", iTimeFormat); SetupStore("ChannelOrder", iChannelOrder); + SetupStore("ChannelNumber", iChannelNumber); SetupStore("Theme", sThemeName.c_str()); } @@ -3022,6 +3151,7 @@ Add(new cMenuEditStraItem (tr("Channel change"), &iNewChannelChange, CHANNEL_CHANGE_COUNT, CH_CHANGE_MODES)); Add(new cMenuEditStraItem (tr("Time format"), &iNewTimeFormat, TIME_FORMAT_COUNT, TIME_FORMATS)); Add(new cMenuEditStraItem (tr("Channel order"), &iNewChannelOrder, CHANNEL_ORDER_COUNT, CH_ORDER_FORMATS)); + Add(new cMenuEditBoolItem (tr("Channel number"), &iNewChannelNumber)); Add(new cMenuEditStraItem (trVDR("Setup.OSD$Theme"), &iNewThemeIndex, numThemes, themes)); } @@ -3172,6 +3302,7 @@ else if (!strcasecmp(Name, "ChannelChange")) { iChannelChange = atoi(Value); } else if (!strcasecmp(Name, "TimeFormat")) { iTimeFormat = atoi(Value); } else if (!strcasecmp(Name, "ChannelOrder")) { iChannelOrder = atoi(Value); } + else if (!strcasecmp(Name, "ChannelNumber")) { iChannelNumber = atoi(Value); } else if (!strcasecmp(Name, "Theme")) { Utf8Strn0Cpy(themeName, Value, sizeof(themeName)); sThemeName = themeName; } else { return false; }
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr