summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--displaymenu.c19
2 files changed, 15 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index a1052bfa..93402994 100644
--- a/HISTORY
+++ b/HISTORY
@@ -22,6 +22,7 @@ VDR Plugin 'skinflatplus' Revision History
- [add] imagecache for faster image loading
- [add] option MenuItemRecordingClearPercent set to 1 to clear the '%' in recording names (you have an cut icon to detect cutted recordings)
- [add] option MenuItemRecordingShowFolderDate to show the date in the folder item from the newest/oldest recording in that folder (0 = disable, 1 = newest recording date, 2 = oldest recording date)
+- [add] define DEBUGIMAGELOADTIME for debug output of imageloader time (search in cache, load from disk, scale)
2013-11-24: Version 0.1.0 - MegaV0lt Version
Special thanks to MegaV0lt@VDR-Portal for
diff --git a/displaymenu.c b/displaymenu.c
index f83a97c3..2be298d8 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -1245,7 +1245,7 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current
}
}
- if( WithDate && Event ) {
+ if( WithDate && Event && Selectable ) {
if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel )
w = fontSml->Width("XXX 99. ") + marginItem;
else
@@ -1268,17 +1268,17 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current
}
int imageHeight = fontHeight;
- if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel && Event ) {
+ if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel && Event && Selectable ) {
Top += fontHeight;
Left = LeftSecond;
imageHeight = fontSmlHeight;
menuPixmap->DrawText(cPoint(Left, Top), Event->GetTimeString(), ColorFg, ColorBg, fontSml);
Left += fontSml->Width( Event->GetTimeString() ) + marginItem;
- } else if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Event ){
+ } else if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Event && Selectable ){
imageHeight = fontHeight;
menuPixmap->DrawText(cPoint(Left, Top), Event->GetTimeString(), ColorFg, ColorBg, font);
Left += font->Width( Event->GetTimeString() ) + marginItem;
- } else if( Event ){
+ } else if( Event && Selectable ){
menuPixmap->DrawText(cPoint(Left, Top), Event->GetTimeString(), ColorFg, ColorBg, font);
Left += font->Width( Event->GetTimeString() ) + marginItem;
}
@@ -1297,7 +1297,7 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current
}
}
Left += imageHeight + marginItem;
- if( Event ) {
+ if( Event && Selectable ) {
if( Event->Vps() && (Event->Vps() - Event->StartTime()) ) {
img = imgLoader.LoadIcon("vps", imageHeight, imageHeight);
if( img ) {
@@ -1328,6 +1328,13 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current
menuPixmap->DrawText(cPoint(Left, Top), ShortText, ColorShortTextFg, ColorBg, font, menuItemWidth - Left - marginItem);
}
}
+ } else {
+ // extract date from Separator
+ std::string sep = Event->Title();
+ std::size_t found = sep.find(" -");
+ std::string date = sep.substr(found - 10, 10);
+
+ menuPixmap->DrawText(cPoint(Left, Top), date.c_str(), ColorFg, ColorBg, font, menuItemWidth - Left - marginItem);
}
sDecorBorder ib;
@@ -2349,6 +2356,8 @@ string cFlatDisplayMenu::xml_substring(string source, const char* str_start, con
}
const char * cFlatDisplayMenu::GetRecordingName(const cRecording *Recording, int Level, bool isFolder) {
+ if( !Recording )
+ return "";
std::string recNamePart;
std::string recName = Recording->Name();
try {