diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-04-23 11:18:14 +0200 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-04-23 11:18:14 +0200 |
commit | 501b4664a5daf783503afb56b1eb13694509b20c (patch) | |
tree | 7ad2f3eb6037f884e875b737900549b2e5790fab | |
parent | d00a91a96cdf5a65ab149a4467c4cb46129d9d40 (diff) | |
download | skin-flatplus-501b4664a5daf783503afb56b1eb13694509b20c.tar.gz skin-flatplus-501b4664a5daf783503afb56b1eb13694509b20c.tar.bz2 |
complete rewrite multiline content, tvscraper support
-rw-r--r-- | HISTORY | 9 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | baserender.c | 222 | ||||
-rw-r--r-- | baserender.h | 26 | ||||
-rw-r--r-- | complexcontent.c | 295 | ||||
-rw-r--r-- | complexcontent.h | 172 | ||||
-rw-r--r-- | config.c | 84 | ||||
-rw-r--r-- | config.h | 28 | ||||
-rw-r--r-- | displaymenu.c | 695 | ||||
-rw-r--r-- | displaymenu.h | 25 | ||||
-rw-r--r-- | po/de_DE.po | 32 | ||||
-rw-r--r-- | setup.c | 10 |
12 files changed, 1187 insertions, 415 deletions
@@ -2,11 +2,18 @@ VDR Plugin 'skinflatplus' Revision History --------------------------------------- 2014-XX-XX: Version 0.3.0 +- [fix] use only current Event in extraevent display in displaychannel - [fix] SetRecording border with deleteresume.patch - [fix] recording menu with cutted recordings an % -- [update] channel logo in wide format (like 3PO or creimer logos) +- [update] channel logo in wide format (like 3PO or Copperhead logos) +- [update] complete rewrite multiline content +- [add] show reruns in epg info (lent code from nopacity, thanks!) - [add] TVScraper support + - show poster images of movies and series + - show actor images +- [add] plugin settings for TVScraper - [add] more options to show disk usage (not show; timer & recording menu; always on the menu; always show) +- [add] horizontal line and group icon in SetItemEvent for group channels 2014-25-03: Version 0.2.1 - [fix] epgsearch progessbar in SetItemEvent, if epg start time is after now (2 minutes tolerance) @@ -73,7 +73,7 @@ LIBS += $(shell pkg-config --libs Magick++) ### The object files (add further files here): -OBJS = config.o setup.o imagecache.o imagescaler.o imagemagickwrapper.o imageloader.o baserender.o displaychannel.o displaymenu.o displaymessage.o \ +OBJS = config.o setup.o imagecache.o imagescaler.o imagemagickwrapper.o imageloader.o baserender.o complexcontent.o displaychannel.o displaymenu.o displaymessage.o \ displayreplay.o displaytracks.o displayvolume.o flat.o $(PLUGIN).o ### The main target: @@ -139,7 +139,7 @@ install-decors: install-icons: mkdir -p $(DESTDIR)$(PLGRESDIR)/icons cp -r icons/* $(DESTDIR)$(PLGRESDIR)/icons - + install: install-lib install-i18n install-themes install-icons install-decors dist: $(I18Npo) clean diff --git a/baserender.c b/baserender.c index 5e3b7ed3..e6dce06f 100644 --- a/baserender.c +++ b/baserender.c @@ -2,6 +2,7 @@ #include "flat.h" #include <vdr/menu.h> #include "services/epgsearch.h" +#include "services/tvscraper.h" cFlatBaseRender::cFlatBaseRender(void) { font = cFont::CreateFont(Setup.FontOsd, Setup.FontOsdSize ); @@ -35,6 +36,7 @@ cFlatBaseRender::cFlatBaseRender(void) { buttonsPixmap = NULL; messagePixmap = NULL; contentPixmap = NULL; + contentEpgImagePixmap = NULL; progressBarPixmap = NULL; progressBarPixmapBg = NULL; decorPixmap = NULL; @@ -48,8 +50,7 @@ cFlatBaseRender::~cFlatBaseRender(void) { delete fontSml; delete fontFixed; - if( osd ) - { + if( osd ) { if( topBarPixmap ) osd->DestroyPixmap(topBarPixmap); if( buttonsPixmap ) @@ -68,6 +69,8 @@ cFlatBaseRender::~cFlatBaseRender(void) { osd->DestroyPixmap(topBarIconPixmap); if( topBarIconBGPixmap ) osd->DestroyPixmap(topBarIconBGPixmap); + if( contentEpgImagePixmap ) + osd->DestroyPixmap(contentEpgImagePixmap); delete osd; } @@ -517,221 +520,6 @@ void cFlatBaseRender::MessageClear(void) { DecorBorderRedrawAll(); } -void cFlatBaseRender::ContentCreate(int Left, int Top, int Width, int Height, int FontType) { - contentHasScrollbar = false; - contentShown = false; - contentFontType = FontType; - - contentLeft = Left; - contentTop = Top; - contentWidth = Width; - contentHeight = Height; - int lines = ContentVisibleLines(); - - if( contentFontType == 0 ) - contentHeight = lines * fontHeight; - else if( contentFontType == 1 ) - contentHeight = lines * fontFixedHeight; - else if( contentFontType == 2 ) - contentHeight = lines * fontSmlHeight; - -} - -void cFlatBaseRender::ContentSet(const char *Text, tColor ColorFg, tColor ColorBg) { - if( contentFontType == 0 ) - contentWrapper.Set(Text, font, contentWidth - marginItem*2); - else if( contentFontType == 1 ) - contentWrapper.Set(Text, fontFixed, contentWidth - marginItem*2); - else if( contentFontType == 2 ) - contentWrapper.Set(Text, fontSml, contentWidth - marginItem*2); - - contentColorFg = ColorFg; - contentColorBg = ColorBg; - - int contentWrapperHeight = 0; - if( contentFontType == 0 ) { - contentWrapperHeight = (contentWrapper.Lines()+1) * fontHeight; - contentTextHeight = (contentWrapper.Lines()) * fontHeight + marginItem; - } else if( contentFontType == 1 ) { - contentWrapperHeight = (contentWrapper.Lines()+1) * fontFixedHeight; - contentTextHeight = (contentWrapper.Lines()) * fontFixedHeight + marginItem; - } else if( contentFontType == 2 ) { - contentWrapperHeight = (contentWrapper.Lines()+1) * fontSmlHeight; - contentTextHeight = (contentWrapper.Lines()) * fontSmlHeight + marginItem; - } - - if( contentWrapperHeight > contentHeight ) { - contentDrawPortHeight = contentWrapperHeight; - contentHasScrollbar = true; - } else { - contentDrawPortHeight = contentHeight; - contentHasScrollbar = false; - } - - if( contentPixmap ) - osd->DestroyPixmap(contentPixmap); - - contentPixmap = osd->CreatePixmap(2, cRect(contentLeft, contentTop, contentWidth, contentHeight), - cRect(0, 0, contentWidth, contentDrawPortHeight)); - - if( Config.MenuContentFullSize || contentHasScrollbar ) { - contentPixmap->Fill(contentColorBg); - } else { - contentPixmap->Fill(clrTransparent); - contentPixmap->DrawRectangle(cRect(0, 0, contentWidth, contentTextHeight), contentColorBg); - } - - contentDraw(); - contentShown = true; -} - -bool cFlatBaseRender::ContentWillItBeScrollable(int Width, int Height, const char *Text, int FontType) { - cTextWrapper wrapper; - if( FontType == 0 ) - wrapper.Set(Text, font, Width - marginItem*2); - else if( FontType == 1 ) - wrapper.Set(Text, fontFixed, Width - marginItem*2); - else if( FontType == 2 ) - wrapper.Set(Text, fontSml, Width - marginItem*2); - - int VisibleLines = 0; - if( FontType == 0 ) - VisibleLines = Height / fontHeight; - else if( FontType == 1 ) - VisibleLines = Height / fontFixedHeight; - else if( FontType == 2 ) - VisibleLines = Height / fontSmlHeight; - - if( wrapper.Lines() > 0 && wrapper.Lines() > VisibleLines ) - return true; - - return false; -} - -bool cFlatBaseRender::ContentScrollable(void) { - return contentHasScrollbar; -} - -int cFlatBaseRender::ContentGetHeight(void) { - return contentHeight; -} - -int cFlatBaseRender::ContentGetTextHeight(void) { - return contentTextHeight; -} - -double cFlatBaseRender::ScrollbarSize(void) { - return (double)contentHeight / (double)contentDrawPortHeight; -} - -int cFlatBaseRender::ContentScrollTotal(void) { - return contentWrapper.Lines(); -} - -int cFlatBaseRender::ContentScrollOffset(void) { - double offset; - int h = 0; - if( contentFontType == 0 ) - h = fontHeight; - else if( contentFontType == 1 ) - h = fontFixedHeight; - else if( contentFontType == 2 ) - h = fontSmlHeight; - - if ( ((-1)*contentPixmap->DrawPort().Point().Y() + contentHeight + h) > contentDrawPortHeight) { - offset = (double)1 - ScrollbarSize(); - //dsyslog("1 offset %f h %d return %d", offset, h, (int)(ContentScrollTotal() * offset)); - } else { - offset = (double)((-1)*contentPixmap->DrawPort().Point().Y()) / (double)((-1)*contentPixmap->DrawPort().Point().Y() + contentHeight); - //dsyslog("2 offset %f h %d return %d", offset, h, (int)(ContentScrollTotal() * offset)); - //dsyslog("contentHeight %d Y %d", contentHeight, contentPixmap->DrawPort().Point().Y()); - //dsyslog("contentDrawPortHeight %d Y %d", contentDrawPortHeight, contentPixmap->DrawPort().Point().Y()); - } - - return ContentScrollTotal() * offset; -} - -int cFlatBaseRender::ContentVisibleLines(void) { - if( contentFontType == 0 ) - return contentHeight / fontHeight; - else if( contentFontType == 1 ) - return contentHeight / fontFixedHeight; - else if( contentFontType == 2 ) - return contentHeight / fontSmlHeight; - return 0; -} - -bool cFlatBaseRender::ContentScroll(bool Up, bool Page) { - int aktHeight = contentPixmap->DrawPort().Point().Y(); - int totalHeight = contentPixmap->DrawPort().Height(); - int screenHeight = contentPixmap->ViewPort().Height(); - int lineHeight = 0; - - if( contentFontType == 0 ) - lineHeight = fontHeight; - else if( contentFontType == 1 ) - lineHeight = fontFixedHeight; - else if( contentFontType == 2 ) - lineHeight = fontSmlHeight; - - bool scrolled = false; - if( Up ) { - if( Page ) { - int newY = aktHeight + screenHeight; - if( newY > 0 ) - newY = 0; - contentPixmap->SetDrawPortPoint(cPoint(0, newY)); - scrolled = true; - } else { - if( aktHeight < 0 ) { - contentPixmap->SetDrawPortPoint(cPoint(0, aktHeight + lineHeight)); - scrolled = true; - } - } - } else { - if( Page ) { - int newY = aktHeight - screenHeight; - if( (-1)*newY > totalHeight - screenHeight ) - newY = (-1)*(totalHeight - screenHeight); - contentPixmap->SetDrawPortPoint(cPoint(0, newY)); - scrolled = true; - } else { - if( totalHeight - ((-1)*aktHeight + lineHeight) > screenHeight ) { - contentPixmap->SetDrawPortPoint(cPoint(0, aktHeight - lineHeight)); - scrolled = true; - } - } - } - return scrolled; -} - -bool cFlatBaseRender::ContentIsShown(void) { - return contentShown; -} - -void cFlatBaseRender::ContentClear(void) { - if( contentPixmap ) - contentPixmap->Fill(clrTransparent); - contentShown = false; -} - -void cFlatBaseRender::contentDraw(void) { - int linesText = contentWrapper.Lines(); - int currentHeight = 0; - for (int i=0; i < linesText; i++) { - if( contentFontType == 0 ) { - currentHeight = (i)*fontHeight; - contentPixmap->DrawText(cPoint(marginItem, currentHeight), contentWrapper.GetLine(i), contentColorFg, contentColorBg, font, contentWidth - marginItem*2); - } else if( contentFontType == 1 ) { - currentHeight = (i)*fontFixedHeight; - contentPixmap->DrawText(cPoint(marginItem, currentHeight), contentWrapper.GetLine(i), contentColorFg, contentColorBg, fontFixed, contentWidth - marginItem*2); - } else if( contentFontType == 2 ) { - currentHeight = (i)*fontSmlHeight; - contentPixmap->DrawText(cPoint(marginItem, currentHeight), contentWrapper.GetLine(i), contentColorFg, contentColorBg, fontSml, contentWidth - marginItem*2); - } - } -} - void cFlatBaseRender::ProgressBarCreate(int Left, int Top, int Width, int Height, int MarginHor, int MarginVer, tColor ColorFg, tColor ColorBarFg, tColor ColorBg, int Type, bool SetBackground, bool isSignal) { progressBarTop = Top; progressBarWidth = Width; diff --git a/baserender.h b/baserender.h index 59079879..dfe53e83 100644 --- a/baserender.h +++ b/baserender.h @@ -83,20 +83,27 @@ class cFlatBaseRender // Mehrzeiliger Content mit Scrollbalken cPixmap *contentPixmap; + cPixmap *contentEpgImagePixmap; int contentLeft, contentTop, contentHeight, contentWidth; int contentDrawPortHeight; // gesamthöhe des Textes int contentTextHeight; bool contentHasScrollbar; bool contentShown; int contentFontType; + int contentEventType; + int contentEventHeight; + int contentEventPosterWidth, contentEventPosterHeight; tColor contentColorFg, contentColorBg; cTextWrapper contentWrapper; + cTextWrapper contentWrapperPoster; + const cEvent *contentEvent; cPixmap *decorPixmap; std::list<sDecorBorder> Borders; // for clear specific Borders (clear only MenuItems and not TopBar) void contentDraw(void); + void contentEventDraw(void); double ScrollbarSize(void); void ProgressBarDrawMark(int posMark, int posMarkLast, int posCurrent, bool Start, bool isCurrent); @@ -152,25 +159,6 @@ class cFlatBaseRender void ScrollbarDraw(cPixmap *Pixmap, int Left, int Top, int Height, int Total, int Offset, int Shown, bool CanScrollUp, bool CanScrollDown); int ScrollBarWidth(void); - /* int FontType - * 0 = NormalFont - * 1 = FixedFont - * 2 = SmallFont - */ - - void ContentCreate(int Left, int Top, int Width, int Height, int FontType); - void ContentSet(const char *Text, tColor ColorFg, tColor ColorBg); - bool ContentIsShown(void); - bool ContentScrollable(void); - bool ContentWillItBeScrollable(int Width, int Height, const char *Text, int FontType); - int ContentScrollTotal(void); - int ContentScrollOffset(void); - int ContentVisibleLines(void); - int ContentGetHeight(void); - int ContentGetTextHeight(void); - bool ContentScroll(bool Up, bool Page); - void ContentClear(void); - void DecorBorderDraw(int Left, int Top, int Width, int Height, int Size, int Type, tColor ColorFg, tColor ColorBg, int From = 0, bool Store = true); void DecorBorderClear(int Left, int Top, int Width, int Height, int Size); void DecorBorderClearAll(void); diff --git a/complexcontent.c b/complexcontent.c new file mode 100644 index 00000000..621f00da --- /dev/null +++ b/complexcontent.c @@ -0,0 +1,295 @@ +#include "complexcontent.h" + +cComplexContent::cComplexContent() { + Osd = NULL; + Pixmap = NULL; + PixmapImage = NULL; + isShown = false; + isScrollingActive = true; +} + +cComplexContent::cComplexContent(cOsd *osd, int scrollSize) { + Osd = osd; + ScrollSize = scrollSize; + + Pixmap = NULL; + PixmapImage = NULL; + isShown = false; + isScrollingActive = true; +} + +cComplexContent::~cComplexContent() { +} + +void cComplexContent::Clear(void) { + //dsyslog("cComplexContent::Clear"); + isShown = false; + Contents.clear(); + if( Osd ) { + if( Pixmap != NULL ) { + Osd->DestroyPixmap(Pixmap); + Pixmap = NULL; + } + if( PixmapImage != NULL ) { + Osd->DestroyPixmap(PixmapImage); + PixmapImage = NULL; + } + } +} + +void cComplexContent::CreatePixmaps(bool fullFillBackground) { + CalculateDrawPortHeight(); + FullFillBackground = fullFillBackground; + + if( !Osd ) + return; + if( Pixmap != NULL ) { + Osd->DestroyPixmap(Pixmap); + Pixmap = NULL; + } + if( PixmapImage != NULL ) { + Osd->DestroyPixmap(PixmapImage); + PixmapImage = NULL; + } + + cRect PositionDraw; + PositionDraw.SetLeft(0); + PositionDraw.SetTop(0); + PositionDraw.SetWidth(Position.Width()); + if( FullFillBackground && DrawPortHeight < Position.Height() ) + PositionDraw.SetHeight(Position.Height()); + else + PositionDraw.SetHeight(DrawPortHeight); + + Pixmap = Osd->CreatePixmap(1, Position, PositionDraw); + PixmapImage = Osd->CreatePixmap(2, Position, PositionDraw); + + if( FullFillBackground ) { + Pixmap->Fill(ColorBg); + } else { + Pixmap->DrawRectangle(cRect(0, 0, Position.Width(), ContentHeight(false)), ColorBg); + } + + PixmapImage->Fill(clrTransparent); +} + +void cComplexContent::CalculateDrawPortHeight(void) { + DrawPortHeight = 0; + std::vector<cSimpleContent>::iterator it; + for( it = Contents.begin(); it != Contents.end(); it++) { + if( (*it).GetBottom() > DrawPortHeight ) + DrawPortHeight = (*it).GetBottom(); + } + DrawPortHeight = ScrollTotal() * ScrollSize; +} + +int cComplexContent::BottomContent(void) { + int bottom = 0; + std::vector<cSimpleContent>::iterator it; + for( it = Contents.begin(); it != Contents.end(); it++) { + if( (*it).GetBottom() > bottom ) + bottom = (*it).GetBottom(); + } + return bottom; +} + +int cComplexContent::ContentHeight( bool Full ) { + if( Full ) + return Height(); + if( DrawPortHeight > Height() ) + return Height(); + + return DrawPortHeight; +} + +bool cComplexContent::Scrollable(int height) { + CalculateDrawPortHeight(); + + int total, shown; + total = ScrollTotal(); + if( height == 0 ) + height = Position.Height(); + shown = ceil( (double)height / (double)ScrollSize); + if( total > shown ) + return true; + + return false; +} + +void cComplexContent::AddText(const char *text, bool multiline, cRect position, tColor colorFg, tColor colorBg, cFont *font, int textWidth, int textHeight, int textAlignment ) { + Contents.push_back( cSimpleContent() ); + Contents.back().SetText(text, multiline, position, colorFg, colorBg, font, textWidth, textHeight, textAlignment); +} + +void cComplexContent::AddImage(cImage *image, cRect position) { + Contents.push_back( cSimpleContent() ); + Contents.back().SetImage(image, position); +} + +void cComplexContent::AddImageWithFloatedText(cImage *image, int imageAlignment, const char *text, cRect textPos, tColor colorFg, tColor colorBg, cFont *font, int textWidth, int textHeight, int textAlignment) { + int TextWidthLeft = Position.Width() - image->Width() - 10 - textPos.Left(); + + cTextWrapper WrapperFloat; + WrapperFloat.Set(text, font, TextWidthLeft); + int FloatLines = ceil((double)image->Height() / (double)ScrollSize); + int Lines = WrapperFloat.Lines(); + + if( Lines < FloatLines ) { + cRect FloatedTextPos; + FloatedTextPos.SetLeft(textPos.Left()); + FloatedTextPos.SetTop(textPos.Top()); + FloatedTextPos.SetWidth( TextWidthLeft ); + FloatedTextPos.SetHeight(textPos.Height()); + + AddText(text, true, FloatedTextPos, colorFg, colorBg, font, textWidth, textHeight, textAlignment); + + cRect ImagePos; + ImagePos.SetLeft(textPos.Left() + TextWidthLeft + 5); + ImagePos.SetTop(textPos.Top()); + ImagePos.SetWidth( image->Width() ); + ImagePos.SetHeight( image->Height() ); + + AddImage(image, ImagePos); + } else { + int NumChars = 0; + for( int i = 0; i < Lines && i <= FloatLines; i++) { + NumChars += strlen(WrapperFloat.GetLine(i)); + } + + char *FloatedText; + FloatedText = new char[NumChars+1]; + memset(FloatedText, '\0', NumChars+1); + strncpy(FloatedText, text, NumChars); + + char *SecondText; + SecondText = new char[strlen(text) - NumChars + 2]; + memset(SecondText, '\0', strlen(text) - NumChars + 2); + strncpy(SecondText, text+NumChars, strlen(text) - NumChars); + + cRect FloatedTextPos; + FloatedTextPos.SetLeft(textPos.Left()); + FloatedTextPos.SetTop(textPos.Top()); + FloatedTextPos.SetWidth( TextWidthLeft ); + FloatedTextPos.SetHeight(textPos.Height()); + + cRect SecondTextPos; + SecondTextPos.SetLeft(textPos.Left()); + SecondTextPos.SetTop(textPos.Top() + FloatLines * ScrollSize ); + SecondTextPos.SetWidth( textPos.Width() ); + SecondTextPos.SetHeight( textPos.Height() ); + + AddText(FloatedText, true, FloatedTextPos, colorFg, colorBg, font, textWidth, textHeight, textAlignment); + AddText(SecondText, true, SecondTextPos, colorFg, colorBg, font, textWidth, textHeight, textAlignment); + + cRect ImagePos; + ImagePos.SetLeft(textPos.Left() + TextWidthLeft + 5); + ImagePos.SetTop(textPos.Top()); + ImagePos.SetWidth( image->Width() ); + ImagePos.SetHeight( image->Height() ); + + AddImage(image, ImagePos); + + delete[] FloatedText; + delete[] SecondText; + } +} + +void cComplexContent::AddRect(cRect position, tColor colorBg) { + Contents.push_back( cSimpleContent() ); + Contents.back().SetRect(position, colorBg); +} + +void cComplexContent::Draw() { + isShown = true; + std::vector<cSimpleContent>::iterator it; + for( it = Contents.begin(); it != Contents.end(); it++) { + if( (*it).GetContentType() == CT_Image ) + (*it).Draw(PixmapImage); + else + (*it).Draw(Pixmap); + } +} + +double cComplexContent::ScrollbarSize(void) { + double barSize = (double)Position.Height() / (double)DrawPortHeight; + return barSize; +} + +int cComplexContent::ScrollTotal(void) { + int total = ceil( (double)DrawPortHeight / (double)ScrollSize); + return total; +} + +int cComplexContent::ScrollShown(void) { + //int shown = ceil( (double)Position.Height() / (double)ScrollSize); + int shown = Position.Height() / ScrollSize; + return shown; +} + +int cComplexContent::ScrollOffset(void) { + double offset; + + int y = Pixmap->DrawPort().Point().Y()*-1; + if( y + Position.Height() + ScrollSize > DrawPortHeight ) { + if( y == DrawPortHeight - Position.Height() ) { + y += ScrollSize; + } else { + y = DrawPortHeight - Position.Height() - 1; + } + } + offset = (double)y / (double)DrawPortHeight; + return ScrollTotal() * offset; +} + +bool cComplexContent::Scroll(bool Up, bool Page) { + int aktHeight = Pixmap->DrawPort().Point().Y(); + int totalHeight = Pixmap->DrawPort().Height(); + int screenHeight = Pixmap->ViewPort().Height(); + int lineHeight = ScrollSize; + + bool scrolled = false; + if (Up) { + if (Page) { + int newY = aktHeight + screenHeight; + if (newY > 0) + newY = 0; + Pixmap->SetDrawPortPoint(cPoint(0, newY)); + PixmapImage->SetDrawPortPoint(cPoint(0, newY)); + scrolled = true; + } else { + if (aktHeight < 0) { + if( aktHeight + lineHeight < 0 ) { + Pixmap->SetDrawPortPoint(cPoint(0, aktHeight + lineHeight)); + PixmapImage->SetDrawPortPoint(cPoint(0, aktHeight + lineHeight)); + } else { + Pixmap->SetDrawPortPoint(cPoint(0, 0)); + PixmapImage->SetDrawPortPoint(cPoint(0, 0)); + } + scrolled = true; + } + } + } else { + if (Page) { + int newY = aktHeight - screenHeight; + if ((-1)*newY > totalHeight - screenHeight) + newY = (-1)*(totalHeight - screenHeight); + Pixmap->SetDrawPortPoint(cPoint(0, newY)); + PixmapImage->SetDrawPortPoint(cPoint(0, newY)); + scrolled = true; + } else { + if (totalHeight - ((-1)*aktHeight + lineHeight) > screenHeight) { + Pixmap->SetDrawPortPoint(cPoint(0, aktHeight - lineHeight)); + PixmapImage->SetDrawPortPoint(cPoint(0, aktHeight - lineHeight)); + } else { + int newY = aktHeight - screenHeight; + if ((-1)*newY > totalHeight - screenHeight) + newY = (-1)*(totalHeight - screenHeight); + Pixmap->SetDrawPortPoint(cPoint(0, newY)); + PixmapImage->SetDrawPortPoint(cPoint(0, newY)); + } + scrolled = true; + } + } + + return scrolled; +} diff --git a/complexcontent.h b/complexcontent.h new file mode 100644 index 00000000..c84704f4 --- /dev/null +++ b/complexcontent.h @@ -0,0 +1,172 @@ +#pragma once + +#include "imageloader.h" +#include <list> +#include "flat.h" +#include <string.h> + +enum eContentType { + CT_Text, + CT_TextMultiline, + CT_Image, + CT_Rect +}; + +enum eContentImageAlignment { + CIP_Right +}; + +class cSimpleContent +{ +private: + int ContentType; + cRect Position; + + int TextWidth, TextHeight, TextAlignment; + tColor ColorFg, ColorBg; + std::string Text; + cImage *Image; + cFont *Font; + +public: + cSimpleContent(void) { + Image = NULL; + Font = NULL; + } + + ~cSimpleContent() { + } + + cSimpleContent& operator=(const cSimpleContent& other) { + if( this != &other ) { + this->ContentType = other.ContentType; + this->Position = other.Position; + this->Text = other.Text; + this->TextWidth = other.TextWidth; + this->TextHeight = other.TextHeight; + this->TextAlignment = other.TextAlignment; + this->ColorFg = other.ColorFg; + this->ColorBg = other.ColorBg; + this->Image = other.Image; + this->Font = other.Font; + } + return *this; + } + + void SetText(const char *text, bool Multiline, cRect position, tColor colorFg, tColor colorBg, cFont *font, int textWidth = 0, int textHeight = 0, int textAlignment = taDefault) { + ContentType = CT_Text; + Text = text; + + Font = font; + Position = position; + + if( Multiline ) { + ContentType = CT_TextMultiline; + } + ColorFg = colorFg; ColorBg = colorBg; + TextWidth = textWidth; TextHeight = textHeight; TextAlignment = textAlignment; + } + + void SetImage(cImage *image, cRect position) { + ContentType = CT_Image; + Image = image; + Position = position; + } + + void SetRect(cRect position, tColor colorBg) { + ContentType = CT_Rect; + Position = position; + ColorBg = colorBg; + } + + int GetContentType(void) { return ContentType; } + int GetBottom(void) { + if( ContentType == CT_Text ) + return Position.Top() + Font->Height(); + else if( ContentType == CT_TextMultiline ) { + cTextWrapper Wrapper; + Wrapper.Set(Text.c_str(), Font, Position.Width()); + return Position.Top() + (Wrapper.Lines() * Font->Height()); + } else if( ContentType == CT_Image ) { + return Position.Top() + Image->Height(); + } else if( ContentType == CT_Rect ) + return Position.Top() + Position.Height(); + + return 0; + } + + void Draw(cPixmap *Pixmap) { + if( !Pixmap ) + return; + if( ContentType == CT_Text ) { + Pixmap->DrawText(cPoint(Position.Left(), Position.Top()), Text.c_str(), ColorFg, ColorBg, Font, TextWidth, TextHeight, TextAlignment); + } else if( ContentType == CT_TextMultiline ) { + cTextWrapper Wrapper; + Wrapper.Set(Text.c_str(), Font, Position.Width()); + int Lines = Wrapper.Lines(); + for( int i = 0; i < Lines; i++) { + Pixmap->DrawText(cPoint(Position.Left(), Position.Top() + (i * Font->Height())), Wrapper.GetLine(i), ColorFg, ColorBg, Font, TextWidth, TextHeight, TextAlignment); + } + } else if( ContentType == CT_Rect ) { + Pixmap->DrawRectangle(Position, ColorBg); + } else if( ContentType == CT_Image ) { + Pixmap->DrawImage(cPoint(Position.Left(), Position.Top()), *Image); + } + } +}; + +class cComplexContent +{ +private: + std::vector<cSimpleContent> Contents; + + cPixmap *Pixmap, *PixmapImage; + cRect Position; + + tColor ColorBg; + + bool FullFillBackground; + int DrawPortHeight; + int ScrollSize; + bool isShown; + bool isScrollingActive; + + cOsd *Osd; + + void CalculateDrawPortHeight(void); + +public: + cComplexContent(void); + cComplexContent(cOsd *osd, int scrollSize); + ~cComplexContent(); + + void SetOsd(cOsd *osd) { Osd = osd; } + void SetPosition(cRect position) { Position = position; } + void SetScrollSize(int scrollSize) { ScrollSize = scrollSize; } + void SetBGColor(tColor colorBg) { ColorBg = colorBg; } + void CreatePixmaps(bool fullFillBackground); + + void Clear(void); + + void AddText(const char *text, bool multiline, cRect position, tColor colorFg, tColor colorBg, cFont *font, int textWidth = 0, int textHeight = 0, int textAlignment = taDefault ); + void AddImage(cImage *image, cRect position); + void AddImageWithFloatedText(cImage *image, int imageAlignment, const char *text, cRect textPos, tColor colorFg, tColor colorBg, cFont *font, int textWidth = 0, int textHeight = 0, int textAlignment = taDefault); + void AddRect(cRect position, tColor colorBg); + bool Scrollable(int height = 0); + int ScrollTotal(void); + int ScrollOffset(void); + int ScrollShown(void); + bool Scroll(bool Up, bool Page); + double ScrollbarSize(void); + void SetScrollingActive(bool active) { isScrollingActive = active; } + + int Height(void){ return Position.Height(); } + int ContentHeight( bool Full ); + + int BottomContent(void); + + int Top(void) { return Position.Top(); } + void Draw(); + bool IsShown(void) { return isShown; } + bool IsScrollingActive(void) { return isScrollingActive; } +}; @@ -5,58 +5,65 @@ cFlatConfig::cFlatConfig(void) { logoPath = ""; iconPath = ""; - + DecorCurrent = -1; DecorIndex = 0; - + ButtonsShowEmpty = true; ChannelIconsShow = true; SignalQualityShow = true; SignalQualityUseColors = false; - + DiskUsageShow = true; - + MenuContentFullSize = true; - + ChannelFormatShow = true; ChannelResolutionAspectShow = true; ChannelSimpleAspectFormat = true; - + RecordingResolutionAspectShow = true; RecordingFormatShow = true; RecordingSimpleAspectFormat = true; - + RecordingAdditionalInfoShow = true; EpgAdditionalInfoShow = true; - + EpgRerunsShow = true; + TopBarRecordingShow = true; TopBarRecConflictsShow = true; TopBarRecConflictsHigh = 2; - + MenuItemIconsShow = true; TopBarMenuIconShow = true; - + MenuItemPadding = 3; marginOsdVer = 5; marginOsdHor = 5; TopBarFontSize = 0.05; MessageOffset = 50; - + MainMenuItemScale = 1.0; - + MenuChannelView = 1; MenuTimerView = 1; MenuEventView = 1; MenuRecordingView = 1; - + MenuItemRecordingClearPercent = 1; MenuItemRecordingShowFolderDate = 1; MenuItemParseTilde = 1; - + TVScraperChanInfoShowPoster = 1; TVScraperChanInfoPosterSize = 0.01; - + + TVScraperEPGInfoShowPoster = 1; + TVScraperRecInfoShowPoster = 1; + + TVScraperEPGInfoShowActors = 1; + TVScraperRecInfoShowActors = 1; + decorBorderChannelByTheme = 1; decorBorderChannelTypeUser = 0; decorBorderChannelSizeUser = 0; @@ -96,7 +103,7 @@ cFlatConfig::cFlatConfig(void) { decorBorderButtonByTheme = 1; decorBorderButtonTypeUser = 0; decorBorderButtonSizeUser = 0; - + decorProgressChannelByTheme = 1; decorProgressChannelTypeUser = 0; decorProgressChannelSizeUser = 20; @@ -204,9 +211,14 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "SignalQualityUseColors") == 0) SignalQualityUseColors = atoi(Value); else if (strcmp(Name, "TVScraperChanInfoShowPoster") == 0) TVScraperChanInfoShowPoster = atoi(Value); else if (strcmp(Name, "TVScraperChanInfoPosterSize") == 0) TVScraperChanInfoPosterSize = atod(Value); + else if (strcmp(Name, "TVScraperEPGInfoShowPoster") == 0) TVScraperEPGInfoShowPoster = atoi(Value); + else if (strcmp(Name, "TVScraperRecInfoShowPoster") == 0) TVScraperRecInfoShowPoster = atoi(Value); + else if (strcmp(Name, "EpgRerunsShow") == 0) EpgRerunsShow = atoi(Value); + else if (strcmp(Name, "TVScraperEPGInfoShowActors") == 0) TVScraperEPGInfoShowActors = atoi(Value); + else if (strcmp(Name, "TVScraperRecInfoShowActors") == 0) TVScraperRecInfoShowActors = atoi(Value); else return false; - + return true; } @@ -230,7 +242,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderChannelType = decorBorderChannelTypeUser; decorBorderChannelSize = decorBorderChannelSizeUser; } - + if( decorBorderTopBarByTheme ) { decorBorderTopBarType = decorBorderTopBarTypeTheme; decorBorderTopBarSize = decorBorderTopBarSizeTheme; @@ -246,7 +258,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderMessageType = decorBorderMessageTypeUser; decorBorderMessageSize = decorBorderMessageSizeUser; } - + if( decorBorderVolumeByTheme ) { decorBorderVolumeType = decorBorderVolumeTypeTheme; decorBorderVolumeSize = decorBorderVolumeSizeTheme; @@ -254,7 +266,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderVolumeType = decorBorderVolumeTypeUser; decorBorderVolumeSize = decorBorderVolumeSizeUser; } - + if( decorBorderTrackByTheme ) { decorBorderTrackType = decorBorderTrackTypeTheme; decorBorderTrackSize = decorBorderTrackSizeTheme; @@ -262,7 +274,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderTrackType = decorBorderTrackTypeUser; decorBorderTrackSize = decorBorderTrackSizeUser; } - + if( decorBorderReplayByTheme ) { decorBorderReplayType = decorBorderReplayTypeTheme; decorBorderReplaySize = decorBorderReplaySizeTheme; @@ -278,7 +290,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderMenuItemType = decorBorderMenuItemTypeUser; decorBorderMenuItemSize = decorBorderMenuItemSizeUser; } - + if( decorBorderMenuContentHeadByTheme ) { decorBorderMenuContentHeadType = decorBorderMenuContentHeadTypeTheme; decorBorderMenuContentHeadSize = decorBorderMenuContentHeadSizeTheme; @@ -286,7 +298,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderMenuContentHeadType = decorBorderMenuContentHeadTypeUser; decorBorderMenuContentHeadSize = decorBorderMenuContentHeadSizeUser; } - + if( decorBorderMenuContentByTheme ) { decorBorderMenuContentType = decorBorderMenuContentTypeTheme; decorBorderMenuContentSize = decorBorderMenuContentSizeTheme; @@ -294,7 +306,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderMenuContentType = decorBorderMenuContentTypeUser; decorBorderMenuContentSize = decorBorderMenuContentSizeUser; } - + if( decorBorderButtonByTheme ) { decorBorderButtonType = decorBorderButtonTypeTheme; decorBorderButtonSize = decorBorderButtonSizeTheme; @@ -302,7 +314,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorBorderButtonType = decorBorderButtonTypeUser; decorBorderButtonSize = decorBorderButtonSizeUser; } - + if( decorProgressChannelByTheme ) { decorProgressChannelType = decorProgressChannelTypeTheme; decorProgressChannelSize = decorProgressChannelSizeTheme; @@ -310,7 +322,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorProgressChannelType = decorProgressChannelTypeUser; decorProgressChannelSize = decorProgressChannelSizeUser; } - + if( decorProgressVolumeByTheme ) { decorProgressVolumeType = decorProgressVolumeTypeTheme; decorProgressVolumeSize = decorProgressVolumeSizeTheme; @@ -318,7 +330,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorProgressVolumeType = decorProgressVolumeTypeUser; decorProgressVolumeSize = decorProgressVolumeSizeUser; } - + if( decorProgressMenuItemByTheme ) { decorProgressMenuItemType = decorProgressMenuItemTypeTheme; decorProgressMenuItemSize = decorProgressMenuItemSizeTheme; @@ -326,7 +338,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorProgressMenuItemType = decorProgressMenuItemTypeUser; decorProgressMenuItemSize = decorProgressMenuItemSizeUser; } - + if( decorProgressReplayByTheme ) { decorProgressReplayType = decorProgressReplayTypeTheme; decorProgressReplaySize = decorProgressReplaySizeTheme; @@ -334,7 +346,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorProgressReplayType = decorProgressReplayTypeUser; decorProgressReplaySize = decorProgressReplaySizeUser; } - + if( decorProgressSignalByTheme ) { decorProgressSignalType = decorProgressSignalTypeTheme; decorProgressSignalSize = decorProgressSignalSizeTheme; @@ -342,7 +354,7 @@ void cFlatConfig::DecorCheckAndInit(void) { decorProgressSignalType = decorProgressSignalTypeUser; decorProgressSignalSize = decorProgressSignalSizeUser; } - + if( decorBorderChannelType == 0 ) decorBorderChannelSize = 0; if( decorBorderTopBarType == 0 ) @@ -384,7 +396,7 @@ void cFlatConfig::ThemeInit(void) { decorBorderTrackCurBg = Theme.Color(clrTrackItemCurrentBorderBg); decorBorderTrackSelFg = Theme.Color(clrTrackItemSelableBorderFg); decorBorderTrackSelBg = Theme.Color(clrTrackItemSelableBorderBg); - + decorBorderReplayFg = Theme.Color(clrReplayBorderFg); decorBorderReplayBg = Theme.Color(clrReplayBorderBg); @@ -403,7 +415,7 @@ void cFlatConfig::ThemeInit(void) { decorBorderButtonFg = Theme.Color(clrButtonBorderFg); decorBorderButtonBg = Theme.Color(clrButtonBorderBg); - + decorProgressChannelFg = Theme.Color(clrChannelProgressFg); decorProgressChannelBarFg = Theme.Color(clrChannelProgressBarFg); decorProgressChannelBg = Theme.Color(clrChannelProgressBg); @@ -457,14 +469,14 @@ void cFlatConfig::DecorDescriptions(cStringList &Decors) { cString decorPath = cString::sprintf("%s/decors", PLUGINRESOURCEPATH); std::vector<std::string> files; Decors.Clear(); - + cReadDir d(decorPath); struct dirent *e; while ((e = d.Next()) != NULL) { cString FileName = AddDirectory(decorPath, e->d_name); files.push_back(*FileName); } - + std::sort(files.begin(), files.end(), stringCompare); for (unsigned i = 0; i < files.size(); i++) { std::string FileName = files.at(i); @@ -507,14 +519,14 @@ cString cFlatConfig::DecorDescription(cString File) { void cFlatConfig::DecorLoadCurrent(void) { cString decorPath = cString::sprintf("%s/decors", PLUGINRESOURCEPATH); std::vector<std::string> files; - + cReadDir d(decorPath); struct dirent *e; while ((e = d.Next()) != NULL) { cString FileName = AddDirectory(decorPath, e->d_name); files.push_back(*FileName); } - + std::sort(files.begin(), files.end(), stringCompare); if( DecorIndex >= 0 && DecorIndex < (int)files.size() ) { std::string FileName = files.at(DecorIndex); @@ -22,7 +22,7 @@ class cFlatConfig void Init(void); void SetLogoPath(cString path); bool SetupParse(const char *Name, const char *Value); - + void ThemeCheckAndInit(void); void ThemeInit(void); void DecorDescriptions(cStringList &Decors); @@ -35,7 +35,7 @@ class cFlatConfig cString ThemeCurrent; cString logoPath; cString iconPath; - + // BORDER TYPES // 0 = none // 1 = rect @@ -157,14 +157,14 @@ class cFlatConfig int SignalQualityShow; int SignalQualityUseColors; int DiskUsageShow; - + int MenuItemPadding; int marginOsdVer, marginOsdHor; int MessageOffset; - + int MenuContentFullSize; double TopBarFontSize; - + int ChannelResolutionAspectShow; int ChannelFormatShow; int ChannelSimpleAspectFormat; @@ -172,27 +172,35 @@ class cFlatConfig int RecordingFormatShow; int RecordingSimpleAspectFormat; int RecordingAdditionalInfoShow; + int EpgRerunsShow; int EpgAdditionalInfoShow; int TopBarRecordingShow; int TopBarRecConflictsShow; int TopBarRecConflictsHigh; int MenuItemIconsShow; int TopBarMenuIconShow; - + double MainMenuItemScale; - + int MenuChannelView; int MenuTimerView; int MenuEventView; int MenuRecordingView; - + int MenuItemRecordingClearPercent; int MenuItemRecordingShowFolderDate; // 0 = disable, 1 = newest recording date, 2 = oldest recording date - + int MenuItemParseTilde; - + // TVScraper int TVScraperChanInfoShowPoster; double TVScraperChanInfoPosterSize; + + int TVScraperEPGInfoShowPoster; + int TVScraperRecInfoShowPoster; + + int TVScraperEPGInfoShowActors; + int TVScraperRecInfoShowActors; + int DecorIndex; }; diff --git a/displaymenu.c b/displaymenu.c index ae5ea219..17dbe77c 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -1,4 +1,6 @@ #include "displaymenu.h" +#include "services/tvscraper.h" +#include "services/epgsearch.h" #ifndef VDRLOGO #define VDRLOGO "vdrlogo_default" @@ -123,7 +125,13 @@ void cFlatDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) { } +void cFlatDisplayMenu::SetScrollbar(int Total, int Offset) { + DrawScrollbar(Total, Offset, MaxItems(), 0, ItemsHeight(), Offset > 0, Offset + MaxItems() < Total); +} + void cFlatDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown, bool isContent) { + //dsyslog("Total: %d Offset: %d Shown: %d Top: %d Height: %d", Total, Offset, Shown, Top, Height); + if( Total > 0 && Total > Shown ) { if( isScrolling == false && ShowEvent == false && ShowRecording == false && ShowText == false ) { isScrolling = true; @@ -134,7 +142,6 @@ void cFlatDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, menuPixmap->DrawRectangle(cRect(menuItemWidth - scrollBarWidth + Config.decorBorderMenuContentSize, 0, scrollBarWidth + marginItem, scrollBarHeight), clrTransparent); else menuPixmap->DrawRectangle(cRect(menuItemWidth - scrollBarWidth + Config.decorBorderMenuItemSize, 0, scrollBarWidth + marginItem, scrollBarHeight), clrTransparent); - } } else if( ShowEvent == false && ShowRecording == false && ShowText == false ) { isScrolling = false; @@ -147,16 +154,13 @@ void cFlatDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, } -void cFlatDisplayMenu::SetScrollbar(int Total, int Offset) { - DrawScrollbar(Total, Offset, MaxItems(), 0, ItemsHeight(), Offset > 0, Offset + MaxItems() < Total); -} - void cFlatDisplayMenu::Scroll(bool Up, bool Page) { // Wird das Menü gescrollt oder Content? - if( ContentIsShown() ) { - bool scrolled = ContentScroll(Up, Page); - if( scrolled ) - DrawScrollbar(ContentScrollTotal(), ContentScrollOffset(), ContentVisibleLines(), contentTop - scrollBarTop, ContentGetHeight(), ContentScrollOffset() > 0, ContentScrollOffset() + ContentVisibleLines() < ContentScrollTotal(), true); + if( ComplexContent.IsShown() && ComplexContent.IsScrollingActive() && ComplexContent.Scrollable() ) { + bool scrolled = ComplexContent.Scroll(Up, Page); + if( scrolled ) { + DrawScrollbar(ComplexContent.ScrollTotal(), ComplexContent.ScrollOffset(), ComplexContent.ScrollShown(), ComplexContent.Top() - scrollBarTop, ComplexContent.Height(), ComplexContent.ScrollOffset() > 0, ComplexContent.ScrollOffset() + ComplexContent.ScrollShown() < ComplexContent.ScrollTotal(), true); + } } else { cSkinDisplayMenu::Scroll(Up, Page); } @@ -195,11 +199,11 @@ void cFlatDisplayMenu::Clear(void) { menuIconsBGPixmap->Fill(clrTransparent); scrollbarPixmap->Fill(clrTransparent); contentHeadPixmap->Fill(clrTransparent); - ContentClear(); DecorBorderClearByFrom(BorderMenuItem); DecorBorderClearAll(); isScrolling = false; + ComplexContent.Clear(); ShowRecording = ShowEvent = ShowText = false; } @@ -822,7 +826,7 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C ItemBorderInsertUnique(ib); } - if( Config.MenuChannelView == 4 && Event && Current ) { + if( Config.MenuChannelView == 4 && Current ) { DrawItemExtraEvent(Event, ""); } @@ -830,7 +834,6 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C } void cFlatDisplayMenu::DrawItemExtraEvent(const cEvent *Event, cString EmptyText) { - cLeft = menuItemWidth + Config.decorBorderMenuItemSize*2 + Config.decorBorderMenuContentSize + marginItem; if( isScrolling ) cLeft += scrollBarWidth; @@ -916,16 +919,63 @@ void cFlatDisplayMenu::DrawItemExtraEvent(const cEvent *Event, cString EmptyText } } else text << *EmptyText; - ContentCreate(cLeft, cTop, cWidth, cHeight, 2); - ContentSet( text.str().c_str(), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg) ); + ComplexContent.Clear(); + ComplexContent.SetScrollSize(fontSmlHeight); + ComplexContent.SetScrollingActive(false); + ComplexContent.SetOsd(osd); + ComplexContent.SetPosition(cRect(cLeft, cTop, cWidth, cHeight)); + ComplexContent.SetBGColor(Theme.Color(clrMenuEventBg)); + + if( Config.TVScraperEPGInfoShowPoster ) { + // TVScraper + DecorBorderClearByFrom(BorderTVSPoster); + static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); + if( Config.TVScraperChanInfoShowPoster && pTVScraper ) { + TVScraperGetPosterOrBanner call; + call.event = Event; + if (pTVScraper->Service("TVScraperGetPosterOrBanner", &call)) { + int mediaWidth = 0; + int mediaHeight = 0; + if (call.type == typeSeries) { + mediaWidth = cWidth - marginItem*2; + mediaHeight = 999; + } else if (call.type == typeMovie) { + mediaWidth = cWidth/2 - marginItem*3; + mediaHeight = 999; + } + cImage *img = imgLoader.LoadFile(call.media.path.c_str(), mediaWidth, mediaHeight); + if( img && call.type == typeMovie ) { + ComplexContent.AddImageWithFloatedText(img, CIP_Right, text.str().c_str(), cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); + } else if( img && call.type == typeSeries ) { + ComplexContent.AddImage(img, cRect(marginItem, marginItem, img->Width(), img->Height()) ); + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem + img->Height(), cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); + } + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); + } + + ComplexContent.CreatePixmaps(Config.MenuContentFullSize); + + ComplexContent.Draw(); DecorBorderClearByFrom(BorderContent); if( Config.MenuContentFullSize ) - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(cLeft, cTop, cWidth, ComplexContent.ContentHeight(true), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg, BorderContent); else - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetTextHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(cLeft, cTop, cWidth, ComplexContent.ContentHeight(false), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg, BorderContent); } @@ -1189,51 +1239,56 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current int imageLeft = Left; int imageBGHeight = fontHeight; int imageBGWidth = fontHeight*1.34; - if( !Channel->GroupSep() ) { - cImage *imgBG = imgLoader.LoadIcon("logo_background", imageBGWidth, imageBGHeight); - if( imgBG ) { - imageBGHeight = imgBG->Height(); - imageBGWidth = imgBG->Width(); - imageTop = Top + (fontHeight - imgBG->Height()) / 2; - menuIconsBGPixmap->DrawImage( cPoint(imageLeft, imageTop), *imgBG ); - } - img = imgLoader.LoadLogo(Channel->Name(), imageBGWidth - 4, imageBGHeight - 4); - if( img ) { - imageTop = Top + (imageBGHeight - img->Height()) / 2; - imageLeft = Left + (imageBGWidth - img->Width()) / 2; - menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); + cImage *imgBG = imgLoader.LoadIcon("logo_background", imageBGWidth, imageBGHeight); + if( imgBG && !Channel->GroupSep() ) { + imageBGHeight = imgBG->Height(); + imageBGWidth = imgBG->Width(); + imageTop = Top + (fontHeight - imgBG->Height()) / 2; + menuIconsBGPixmap->DrawImage( cPoint(imageLeft, imageTop), *imgBG ); + } + img = imgLoader.LoadLogo(Channel->Name(), imageBGWidth - 4, imageBGHeight - 4); + if( img ) { + imageTop = Top + (imageBGHeight - img->Height()) / 2; + imageLeft = Left + (imageBGWidth - img->Width()) / 2; + menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); + } else { + bool isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0))) ? true : false; + + if( isRadioChannel ) { + img = imgLoader.LoadIcon("radio", imageBGWidth - 10, imageBGHeight - 10); + if( img ) { + imageTop = Top + (imageBGHeight - img->Height()) / 2; + imageLeft = Left + (imageBGWidth - img->Width()) / 2; + menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); + } + } else if( Channel->GroupSep() ) { + img = imgLoader.LoadIcon("changroup", imageBGWidth - 10, imageBGHeight - 10); + if( img ) { + imageTop = Top + (imageBGHeight - img->Height()) / 2; + imageLeft = Left + (imageBGWidth - img->Width()) / 2; + menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); + } } else { - bool isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0))) ? true : false; - - if( isRadioChannel ) { - img = imgLoader.LoadIcon("radio", imageBGWidth - 10, imageBGHeight - 10); - if( img ) { - imageTop = Top + (imageBGHeight - img->Height()) / 2; - imageLeft = Left + (imageBGWidth - img->Width()) / 2; - menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); - } - } else if( Channel->GroupSep() ) { - img = imgLoader.LoadIcon("changroup", imageBGWidth - 10, imageBGHeight - 10); - if( img ) { - imageTop = Top + (imageBGHeight - img->Height()) / 2; - imageLeft = Left + (imageBGWidth - img->Width()) / 2; - menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); - } - } else { - img = imgLoader.LoadIcon("tv", imageBGWidth - 10, imageBGHeight - 10); - if( img ) { - imageTop = Top + (imageBGHeight - img->Height()) / 2; - imageLeft = Left + (imageBGWidth - img->Width()) / 2; - menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); - } + img = imgLoader.LoadIcon("tv", imageBGWidth - 10, imageBGHeight - 10); + if( img ) { + imageTop = Top + (imageBGHeight - img->Height()) / 2; + imageLeft = Left + (imageBGWidth - img->Width()) / 2; + menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img ); } } - } + } Left += imageBGWidth + marginItem * 2; LeftSecond = Left; w = menuWidth / 10 * 2; - menuPixmap->DrawText(cPoint(Left, Top), Channel->ShortName(true), ColorFg, ColorBg, font, w); + if( Channel->GroupSep() ) { + int lineTop = Top + (fontHeight - 5) / 2; + menuPixmap->DrawRectangle(cRect( Left, lineTop, menuWidth, 5), ColorFg); + Left += w / 2; + menuPixmap->DrawText(cPoint(Left, Top), Channel->ShortName(true), ColorFg, ColorBg, font); + } else + menuPixmap->DrawText(cPoint(Left, Top), Channel->ShortName(true), ColorFg, ColorBg, font, w); + Left += w + marginItem * 2; if( Event ) { @@ -1416,7 +1471,7 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current ItemBorderInsertUnique(ib); } - if( Config.MenuEventView == 3 ) { + if( Config.MenuEventView == 3 && Current ) { DrawItemExtraEvent(Event, ""); } @@ -1690,13 +1745,12 @@ void cFlatDisplayMenu::SetEvent(const cEvent *Event) { Config.decorBorderMenuContentHeadFg, Config.decorBorderMenuContentHeadBg); // Description - ostringstream text; + ostringstream text, textAdditional; if( !isempty(Event->Description()) ) { text << Event->Description(); } if( Config.EpgAdditionalInfoShow ) { - text << endl; const cComponents *Components = Event->Components(); if (Components) { ostringstream audio; @@ -1709,15 +1763,15 @@ void cFlatDisplayMenu::SetEvent(const cEvent *Event) { switch (p->stream) { case sc_video_MPEG2: if (p->description) - text << endl << tr("Video") << ": " << p->description << " (MPEG2)"; + textAdditional << tr("Video") << ": " << p->description << " (MPEG2)"; else - text << endl << tr("Video") << ": MPEG2"; + textAdditional << tr("Video") << ": MPEG2"; break; case sc_video_H264_AVC: if (p->description) - text << endl << tr("Video") << ": " << p->description << " (H.264)"; + textAdditional << tr("Video") << ": " << p->description << " (H.264)"; else - text << endl << tr("Video") << ": H.264"; + textAdditional << tr("Video") << ": H.264"; break; case sc_audio_MP2: @@ -1758,29 +1812,197 @@ void cFlatDisplayMenu::SetEvent(const cEvent *Event) { } } if (audio.str().length() > 0) - text << endl << tr("Audio") << ": "<< audio.str(); + textAdditional << endl << tr("Audio") << ": "<< audio.str(); if (subtitle.str().length() > 0) - text << endl << tr("Subtitle") << ": "<< subtitle.str(); + textAdditional << endl << tr("Subtitle") << ": "<< subtitle.str(); } } - bool contentScrollable = ContentWillItBeScrollable(cWidth, cHeight, text.str().c_str(), 0); - if( contentScrollable ) { - cWidth -= scrollBarWidth; + std::ostringstream sstrReruns; + if( Config.EpgRerunsShow ) { + // lent from nopacity + cPlugin *epgSearchPlugin = cPluginManager::GetPlugin("epgsearch"); + if (epgSearchPlugin && !isempty(Event->Title())) { + Epgsearch_searchresults_v1_0 data; + std::string strQuery = Event->Title(); + data.useSubTitle = false; + + data.query = (char *)strQuery.c_str(); + data.mode = 0; + data.channelNr = 0; + data.useTitle = true; + data.useDescription = false; + + if (epgSearchPlugin->Service("Epgsearch-searchresults-v1.0", &data)) { + cList<Epgsearch_searchresults_v1_0::cServiceSearchResult>* list = data.pResultList; + if (list && (list->Count() > 1)) { + int i = 0; + for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < 5; r = list->Next(r)) { + if ((Event->ChannelID() == r->event->ChannelID()) && (Event->StartTime() == r->event->StartTime())) + continue; + i++; + sstrReruns << "- " << *DayDateTime(r->event->StartTime()); + cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true); + if (channel) { + sstrReruns << ", " << channel->Number() << "."; + sstrReruns << " " << channel->ShortName(true); + } + sstrReruns << ": " << r->event->Title(); + //if (!isempty(r->event->ShortText())) + // sstrReruns << "~" << r->event->ShortText(); + sstrReruns << std::endl; + } + delete list; + } + } + } } - ContentCreate(cLeft, cTop, cWidth, cHeight, 0); + bool Scrollable = false; + bool FirstRun = true; - ContentSet( text.str().c_str(), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg) ); - if( ContentScrollable() ) { - DrawScrollbar(ContentScrollTotal(), ContentScrollOffset(), ContentVisibleLines(), contentTop - scrollBarTop, ContentGetHeight(), ContentScrollOffset() > 0, ContentScrollOffset() + ContentVisibleLines() < ContentScrollTotal(), true); - } + do { + if( Scrollable ) { + FirstRun = false; + cWidth -= scrollBarWidth; + } + + ComplexContent.Clear(); + ComplexContent.SetOsd(osd); + ComplexContent.SetPosition(cRect(cLeft, cTop, cWidth, cHeight)); + ComplexContent.SetBGColor(Theme.Color(clrMenuRecBg)); + ComplexContent.SetScrollSize(fontHeight); + ComplexContent.SetScrollingActive(true); + + int ContentTop = marginItem; + ComplexContent.AddText(tr("Description"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuEventFontTitle), Theme.Color(clrMenuEventBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuEventFontTitle)); + ContentTop += 6; + + TVScraperGetFullInformation call; + if( Config.TVScraperEPGInfoShowPoster || Config.TVScraperEPGInfoShowActors ) { + // TVScraper + static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); + if( pTVScraper ) { + call.event = Event; + call.isRecording = false; + pTVScraper->Service("TVScraperGetFullInformation", &call); + } + } + + if( Config.TVScraperEPGInfoShowPoster ) { + if( call.posters.size() > 0 ) { + int mediaWidth = 0; + int mediaHeight = 0; + std::string path; + if( call.posters.size() > 0 ) + path = call.posters[0].path; + + if (call.type == typeSeries) { + mediaWidth = cWidth/2 - marginItem*2; + mediaHeight = cHeight - marginItem*2 - fontHeight - 6; + } else if (call.type == typeMovie) { + mediaWidth = cWidth/2 - marginItem*3; + mediaHeight = cHeight - marginItem*2 - fontHeight - 6; + } + cImage *img = imgLoader.LoadFile(path.c_str(), mediaWidth, mediaHeight); + if( img ) { + ComplexContent.AddImageWithFloatedText(img, CIP_Right, text.str().c_str(), cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), font); + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), font); + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), font); + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), font); + } - if( Config.MenuContentFullSize || ContentScrollable() ) - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + if( Config.TVScraperEPGInfoShowActors && call.actors.size() > 0 ) { + ContentTop = ComplexContent.BottomContent() + fontHeight; + ComplexContent.AddText(tr("Actors"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuEventFontTitle), Theme.Color(clrMenuEventBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuEventFontTitle)); + ContentTop += 6; + + int actorsPerLine = 6; + int numActors = call.actors.size(); + int actorWidth = cWidth / actorsPerLine - marginItem*4; + int picsPerLine = (cWidth - marginItem*2) / actorWidth; + int picLines = numActors / picsPerLine; + if( numActors%picsPerLine != 0 ) + picLines++; + int actorMargin = ((cWidth - marginItem*2) - actorWidth*actorsPerLine) / (actorsPerLine-1); + int x = marginItem; + int y = ContentTop; + int actor = 0; + for (int row = 0; row < picLines; row++) { + for (int col = 0; col < picsPerLine; col++) { + if (actor == numActors) + break; + std::string path = call.actors[actor].thumb.path; + cImage *img = imgLoader.LoadFile(path.c_str(), actorWidth, 999); + if( img ) { + ComplexContent.AddImage(img, cRect(x, y, 0, 0)); + + std::string name = call.actors[actor].name; + std::stringstream sstrRole; + sstrRole << "\"" << call.actors[actor].role << "\""; + std::string role = sstrRole.str(); + + ComplexContent.AddText(name.c_str(), false, cRect(x, y + img->Height() + marginItem, actorWidth, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml, actorWidth, fontSmlHeight, taCenter); + ComplexContent.AddText(role.c_str(), false, cRect(x, y + img->Height() + marginItem + fontSmlHeight, actorWidth, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml, actorWidth, fontSmlHeight, taCenter); + } + x += actorWidth + actorMargin; + actor++; + } + x = marginItem; + y = ComplexContent.BottomContent() + fontHeight; + } + } + + if( sstrReruns.str().length() > 0 ) { + ContentTop = ComplexContent.BottomContent() + fontHeight; + ComplexContent.AddText(tr("Reruns"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuEventFontTitle), Theme.Color(clrMenuEventBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuEventFontTitle)); + ContentTop += 6; + ComplexContent.AddText(sstrReruns.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), font); + } + + if( textAdditional.str().length() > 0 ) { + ContentTop = ComplexContent.BottomContent() + fontHeight; + ComplexContent.AddText(tr("Video information"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuEventFontTitle), Theme.Color(clrMenuEventBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuEventFontTitle)); + ContentTop += 6; + ComplexContent.AddText(textAdditional.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), font); + } + Scrollable = ComplexContent.Scrollable(cHeight - marginItem*2); + } while( Scrollable && FirstRun ); + + if( Config.MenuContentFullSize || Scrollable ) { + ComplexContent.CreatePixmaps(true); + } else + ComplexContent.CreatePixmaps(false); + + ComplexContent.Draw(); + + if( Scrollable ) + DrawScrollbar(ComplexContent.ScrollTotal(), ComplexContent.ScrollOffset(), ComplexContent.ScrollShown(), ComplexContent.Top() - scrollBarTop, ComplexContent.Height(), ComplexContent.ScrollOffset() > 0, ComplexContent.ScrollOffset() + ComplexContent.ScrollShown() < ComplexContent.ScrollTotal(), true); + + if( Config.MenuContentFullSize || Scrollable ) + DecorBorderDraw(cLeft, cTop, cWidth, ComplexContent.ContentHeight(true), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg); else - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetTextHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(cLeft, cTop, cWidth, ComplexContent.ContentHeight(false), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg); } @@ -1794,8 +2016,10 @@ void cFlatDisplayMenu::DrawItemExtraRecording(const cRecording *Recording, cStri buttonsHeight + Config.decorBorderButtonSize*2 + marginItem*3 + Config.decorBorderMenuContentSize*2); ostringstream text; + const cEvent *Event = NULL; if( Recording ) { const cRecordingInfo *recInfo = Recording->Info(); + Event = recInfo->GetEvent(); text.imbue(std::locale("")); if (!isempty(recInfo->Description())) @@ -1986,16 +2210,67 @@ void cFlatDisplayMenu::DrawItemExtraRecording(const cRecording *Recording, cStri } else text << *EmptyText; - ContentCreate(cLeft, cTop, cWidth, cHeight, 2); + ComplexContent.Clear(); + ComplexContent.SetScrollSize(fontSmlHeight); + ComplexContent.SetScrollingActive(false); + ComplexContent.SetOsd(osd); + ComplexContent.SetPosition(cRect(cLeft, cTop, cWidth, cHeight)); + ComplexContent.SetBGColor(Theme.Color(clrMenuRecBg)); + + if( Config.TVScraperEPGInfoShowPoster ) { + // TVScraper + DecorBorderClearByFrom(BorderTVSPoster); + static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); + if( Config.TVScraperChanInfoShowPoster && pTVScraper ) { + TVScraperGetFullInformation call; + call.event = Event; + call.isRecording = true; + if (pTVScraper->Service("TVScraperGetFullInformation", &call)) { + int mediaWidth = 0; + int mediaHeight = 0; + std::string path = ""; + if (call.type == typeSeries) { + mediaWidth = cWidth - marginItem*2; + mediaHeight = 999; + path = call.banner.path; + } else if (call.type == typeMovie) { + mediaWidth = cWidth/2 - marginItem*3; + mediaHeight = 999; + if( call.posters.size() > 0 ) + path = call.posters[0].path; + } + cImage *img = imgLoader.LoadFile(path.c_str(), mediaWidth, mediaHeight); + if( img && call.type == typeMovie ) { + ComplexContent.AddImageWithFloatedText(img, CIP_Right, text.str().c_str(), cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml); + } else if( img && call.type == typeSeries ) { + ComplexContent.AddImage(img, cRect(marginItem, marginItem, img->Width(), img->Height()) ); + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem + img->Height(), cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml); + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml); + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml); + } + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml); + } - ContentSet( text.str().c_str(), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg) ); + ComplexContent.CreatePixmaps(Config.MenuContentFullSize); + + ComplexContent.Draw(); DecorBorderClearByFrom(BorderContent); if( Config.MenuContentFullSize ) - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(cLeft, cTop, cWidth, ComplexContent.ContentHeight(true), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg, BorderContent); else - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetTextHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(cLeft, cTop, cWidth, ComplexContent.ContentHeight(false), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg, BorderContent); } @@ -2009,6 +2284,7 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { ItemBorderClear(); const cRecordingInfo *recInfo = Recording->Info(); + const cEvent *Event = recInfo->GetEvent(); chLeft = Config.decorBorderMenuContentHeadSize; chTop = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuContentHeadSize; @@ -2029,7 +2305,7 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { menuItemWidth = cWidth; - ostringstream text; + ostringstream text, textAdditional, recAdditional; text.imbue(std::locale("")); if (!isempty(recInfo->Description())) @@ -2039,7 +2315,7 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { if( Config.RecordingAdditionalInfoShow ) { cChannel *channel = Channels.GetByChannelID(((cRecordingInfo *)recInfo)->ChannelID()); if (channel) - text << trVDR("Channel") << ": " << channel->Number() << " - " << channel->Name() << endl; + recAdditional << trVDR("Channel") << ": " << channel->Number() << " - " << channel->Name() << endl; cMarks marks; bool hasMarks = marks.Load(Recording->FileName(), Recording->FramesPerSecond(), Recording->IsPesRecording()) && marks.Count(); @@ -2109,27 +2385,27 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { } if (index) { lastIndex = index->Last(); - text << tr("Length") << ": " << *IndexToHMSF(lastIndex, false, Recording->FramesPerSecond()); + recAdditional << tr("Length") << ": " << *IndexToHMSF(lastIndex, false, Recording->FramesPerSecond()); if (hasMarks) - text << " (" << tr("cutted") << ": " << *IndexToHMSF(cuttedLength, false, Recording->FramesPerSecond()) << ")"; - text << endl; + recAdditional << " (" << tr("cutted") << ": " << *IndexToHMSF(cuttedLength, false, Recording->FramesPerSecond()) << ")"; + recAdditional << endl; } delete index; if (recsize > MEGABYTE(1023)) - text << tr("Size") << ": " << fixed << setprecision(2) << (float)recsize / MEGABYTE(1024) << " GB"; + recAdditional << tr("Size") << ": " << fixed << setprecision(2) << (float)recsize / MEGABYTE(1024) << " GB"; else - text << tr("Size") << ": " << recsize / MEGABYTE(1) << " MB"; + recAdditional << tr("Size") << ": " << recsize / MEGABYTE(1) << " MB"; if( hasMarks ) if (recsize > MEGABYTE(1023)) - text << " (" << tr("cutted") << ": " << fixed << setprecision(2) << (float)recsizecutted/MEGABYTE(1024) << " GB)"; + recAdditional << " (" << tr("cutted") << ": " << fixed << setprecision(2) << (float)recsizecutted/MEGABYTE(1024) << " GB)"; else - text << " (" << tr("cutted") << ": " << recsizecutted/MEGABYTE(1) << " MB)"; + recAdditional << " (" << tr("cutted") << ": " << recsizecutted/MEGABYTE(1) << " MB)"; - text << endl << trVDR("Priority") << ": " << Recording->Priority() << ", " << trVDR("Lifetime") << ": " << Recording->Lifetime() << endl; + recAdditional << endl << trVDR("Priority") << ": " << Recording->Priority() << ", " << trVDR("Lifetime") << ": " << Recording->Lifetime() << endl; if( lastIndex ) { - text << tr("format") << ": " << (Recording->IsPesRecording() ? "PES" : "TS") << ", " << tr("bit rate") << ": ~ " << fixed << setprecision (2) << (float)recsize/lastIndex*Recording->FramesPerSecond()*8/MEGABYTE(1) << " MBit/s (Video + Audio)"; + recAdditional << tr("format") << ": " << (Recording->IsPesRecording() ? "PES" : "TS") << ", " << tr("bit rate") << ": ~ " << fixed << setprecision (2) << (float)recsize/lastIndex*Recording->FramesPerSecond()*8/MEGABYTE(1) << " MBit/s (Video + Audio)"; } const cComponents *Components = recInfo->Components(); if( Components ) { @@ -2143,10 +2419,10 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { switch (p->stream) { case sc_video_MPEG2: - text << endl << tr("Video") << ": " << p->description << " (MPEG2)"; + textAdditional << tr("Video") << ": " << p->description << " (MPEG2)"; break; case sc_video_H264_AVC: - text << endl << tr("Video") << ": " << p->description << " (H.264)"; + textAdditional << tr("Video") << ": " << p->description << " (H.264)"; break; case sc_audio_MP2: case sc_audio_AC3: @@ -2186,9 +2462,9 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { } } if (audio.str().length() > 0) - text << endl << tr("Audio") << ": "<< audio.str(); + textAdditional << endl << tr("Audio") << ": "<< audio.str(); if (subtitle.str().length() > 0) - text << endl << tr("Subtitle") << ": "<< subtitle.str(); + textAdditional << endl << tr("Subtitle") << ": "<< subtitle.str(); } if (recInfo->Aux()) { string str_epgsearch = xml_substring(recInfo->Aux(), "<epgsearch>", "</epgsearch>"); @@ -2218,12 +2494,172 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { } } - bool contentScrollable = ContentWillItBeScrollable(cWidth, cHeight, text.str().c_str(), 0); - if( contentScrollable ) { + bool Scrollable = false; + bool FirstRun = true; + + do { + if( Scrollable ) { + FirstRun = false; + cWidth -= scrollBarWidth; + } + + ComplexContent.Clear(); + ComplexContent.SetOsd(osd); + ComplexContent.SetPosition(cRect(cLeft, cTop, cWidth, cHeight)); + ComplexContent.SetBGColor(Theme.Color(clrMenuRecBg)); + ComplexContent.SetScrollSize(fontHeight); + ComplexContent.SetScrollingActive(true); + + int ContentTop = marginItem; + ComplexContent.AddText(tr("Description"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuRecFontTitle), Theme.Color(clrMenuRecBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuRecFontTitle)); + ContentTop += 6; + + TVScraperGetFullInformation call; + if( Config.TVScraperEPGInfoShowPoster || Config.TVScraperEPGInfoShowActors ) { + // TVScraper + static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); + if( pTVScraper ) { + call.event = Event; + call.isRecording = true; + pTVScraper->Service("TVScraperGetFullInformation", &call); + } + } + + if( Config.TVScraperEPGInfoShowPoster ) { + if( call.posters.size() > 0 ) { + int mediaWidth = 0; + int mediaHeight = 0; + std::string path; + if( call.posters.size() > 0 ) + path = call.posters[0].path; + + if (call.type == typeSeries) { + mediaWidth = cWidth/2 - marginItem*2; + mediaHeight = cHeight - marginItem*2 - fontHeight - 6; + } else if (call.type == typeMovie) { + mediaWidth = cWidth/2 - marginItem*3; + mediaHeight = cHeight - marginItem*2 - fontHeight - 6; + } + cImage *img = imgLoader.LoadFile(path.c_str(), mediaWidth, mediaHeight); + if( img ) { + ComplexContent.AddImageWithFloatedText(img, CIP_Right, text.str().c_str(), cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), font); + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), font); + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), font); + } + } else { + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), font); + } + + if( Config.TVScraperEPGInfoShowActors && call.actors.size() > 0 ) { + ContentTop = ComplexContent.BottomContent() + fontHeight; + ComplexContent.AddText(tr("Actors"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuRecFontTitle), Theme.Color(clrMenuRecBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuRecFontTitle)); + ContentTop += 6; + + int actorsPerLine = 6; + int numActors = call.actors.size(); + int actorWidth = cWidth / actorsPerLine - marginItem*4; + int picsPerLine = (cWidth - marginItem*2) / actorWidth; + int picLines = numActors / picsPerLine; + if( numActors%picsPerLine != 0 ) + picLines++; + int actorMargin = ((cWidth - marginItem*2) - actorWidth*actorsPerLine) / (actorsPerLine-1); + int x = marginItem; + int y = ContentTop; + int actor = 0; + for (int row = 0; row < picLines; row++) { + for (int col = 0; col < picsPerLine; col++) { + if (actor == numActors) + break; + std::string path = call.actors[actor].thumb.path; + cImage *img = imgLoader.LoadFile(path.c_str(), actorWidth, 999); + if( img ) { + ComplexContent.AddImage(img, cRect(x, y, 0, 0)); + std::string name = call.actors[actor].name; + std::stringstream sstrRole; + sstrRole << "\"" << call.actors[actor].role << "\""; + std::string role = sstrRole.str(); + dsyslog("name: %s", name.c_str() ); + ComplexContent.AddText(name.c_str(), false, cRect(x, y + img->Height() + marginItem, actorWidth, 0), Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml, actorWidth, fontSmlHeight, taCenter); + ComplexContent.AddText(role.c_str(), false, cRect(x, y + img->Height() + marginItem + fontSmlHeight, actorWidth, 0), Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), fontSml, actorWidth, fontSmlHeight, taCenter); + } + x += actorWidth + actorMargin; + actor++; + } + x = marginItem; + y = ComplexContent.BottomContent() + fontHeight; + } + } + + if( recAdditional.str().length() > 0 ) { + ContentTop = ComplexContent.BottomContent() + fontHeight; + ComplexContent.AddText(tr("Recording information"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuRecFontTitle), Theme.Color(clrMenuRecBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuRecFontTitle)); + ContentTop += 6; + ComplexContent.AddText(recAdditional.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), font); + } + + if( textAdditional.str().length() > 0 ) { + ContentTop = ComplexContent.BottomContent() + fontHeight; + ComplexContent.AddText(tr("Video information"), false, cRect(marginItem*10, ContentTop, 0, 0), Theme.Color(clrMenuRecFontTitle), Theme.Color(clrMenuRecBg), font); + ContentTop += fontHeight; + ComplexContent.AddRect(cRect(0, ContentTop, cWidth, 3), Theme.Color(clrMenuRecFontTitle)); + ContentTop += 6; + ComplexContent.AddText(textAdditional.str().c_str(), true, cRect(marginItem, ContentTop, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg), font); + } + + Scrollable = ComplexContent.Scrollable(cHeight - marginItem*2); + } while( Scrollable && FirstRun ); + + if( Config.MenuContentFullSize || Scrollable ) { + ComplexContent.CreatePixmaps(true); + } else + ComplexContent.CreatePixmaps(false); + + ComplexContent.Draw(); + +/* + ComplexContent.Clear(); + + bool Scrollable = false; + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuRecBg), font); + ComplexContent.SetScrollSize(fontHeight); + + Scrollable = ComplexContent.Scrollable(cHeight - marginItem*2); + if( Scrollable ) { cWidth -= scrollBarWidth; + ComplexContent.Clear(); + ComplexContent.AddText(text.str().c_str(), true, cRect(marginItem, marginItem, cWidth - marginItem*2, cHeight - marginItem*2), + Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuRecBg), font); + ComplexContent.SetScrollSize(fontHeight); } - ContentCreate(cLeft, cTop, cWidth, cHeight, 0); + ComplexContent.SetOsd(osd); + ComplexContent.SetPosition(cRect(cLeft, cTop, cWidth, cHeight)); + ComplexContent.SetBGColor(Theme.Color(clrMenuRecBg)); + ComplexContent.SetScrollingActive(true); + + if( Config.MenuContentFullSize || Scrollable ) { + ComplexContent.CreatePixmaps(true); + } else + ComplexContent.CreatePixmaps(false); + + ComplexContent.Draw(); +*/ contentHeadPixmap->Fill(clrTransparent); contentHeadPixmap->DrawRectangle(cRect(0, 0, menuWidth, fontHeight + fontSmlHeight*2 + marginItem*2), Theme.Color(clrScrollbarBg)); @@ -2242,27 +2678,25 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { DecorBorderDraw(chLeft, chTop, chWidth, chHeight, Config.decorBorderMenuContentHeadSize, Config.decorBorderMenuContentHeadType, Config.decorBorderMenuContentHeadFg, Config.decorBorderMenuContentHeadBg, BorderSetRecording, false); - ContentSet( text.str().c_str(), Theme.Color(clrMenuRecFontInfo), Theme.Color(clrMenuRecBg) ); - if( ContentScrollable() ) { - DrawScrollbar(ContentScrollTotal(), ContentScrollOffset(), ContentVisibleLines(), contentTop - scrollBarTop, ContentGetHeight(), ContentScrollOffset() > 0, ContentScrollOffset() + ContentVisibleLines() < ContentScrollTotal(), true); - } + if( Scrollable ) + DrawScrollbar(ComplexContent.ScrollTotal(), ComplexContent.ScrollOffset(), ComplexContent.ScrollShown(), ComplexContent.Top() - scrollBarTop, ComplexContent.Height(), ComplexContent.ScrollOffset() > 0, ComplexContent.ScrollOffset() + ComplexContent.ScrollShown() < ComplexContent.ScrollTotal(), true); RecordingBorder.Left = cLeft; RecordingBorder.Top = cTop; RecordingBorder.Width = cWidth; - RecordingBorder.Height = ContentGetHeight(); + RecordingBorder.Height = ComplexContent.Height(); RecordingBorder.Size = Config.decorBorderMenuContentSize; RecordingBorder.Type = Config.decorBorderMenuContentType; RecordingBorder.ColorFg = Config.decorBorderMenuContentFg; RecordingBorder.ColorBg = Config.decorBorderMenuContentBg; RecordingBorder.From = BorderMenuRecord; - if( Config.MenuContentFullSize || ContentScrollable() ) - DecorBorderDraw(RecordingBorder.Left, RecordingBorder.Top, RecordingBorder.Width, RecordingBorder.Height, + if( Config.MenuContentFullSize || Scrollable ) + DecorBorderDraw(RecordingBorder.Left, RecordingBorder.Top, RecordingBorder.Width, ComplexContent.ContentHeight(true), RecordingBorder.Size, RecordingBorder.Type, RecordingBorder.ColorFg, RecordingBorder.ColorBg, RecordingBorder.From, false); else - DecorBorderDraw(RecordingBorder.Left, RecordingBorder.Top, RecordingBorder.Width, ContentGetTextHeight(), + DecorBorderDraw(RecordingBorder.Left, RecordingBorder.Top, RecordingBorder.Width, ComplexContent.ContentHeight(false), RecordingBorder.Size, RecordingBorder.Type, RecordingBorder.ColorFg, RecordingBorder.ColorBg, RecordingBorder.From, false); } @@ -2287,30 +2721,55 @@ void cFlatDisplayMenu::SetText(const char *Text, bool FixedFont) { if( !ButtonsDrawn() ) Height += buttonsHeight + Config.decorBorderButtonSize*2; + ComplexContent.Clear(); + menuItemWidth = Width; + bool Scrollable = false; + if( FixedFont ) { + ComplexContent.AddText(Text, true, cRect(marginItem, marginItem, Width - marginItem*2, Height - marginItem*2), + Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuTextBg), fontFixed); + ComplexContent.SetScrollSize(fontFixedHeight); + } else { + ComplexContent.AddText(Text, true, cRect(marginItem, marginItem, Width - marginItem*2, Height - marginItem*2), + Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuTextBg), font); + ComplexContent.SetScrollSize(fontHeight); + } - bool contentScrollable = ContentWillItBeScrollable(Width, Height, Text, FixedFont); - if( contentScrollable ) { + Scrollable = ComplexContent.Scrollable(Height - marginItem*2); + if( Scrollable ) { Width -= scrollBarWidth; + ComplexContent.Clear(); + if( FixedFont ) { + ComplexContent.AddText(Text, true, cRect(marginItem, marginItem, Width - marginItem*2, Height - marginItem*2), + Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuTextBg), fontFixed); + ComplexContent.SetScrollSize(fontFixedHeight); + } else { + ComplexContent.AddText(Text, true, cRect(marginItem, marginItem, Width - marginItem*2, Height - marginItem*2), + Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuTextBg), font); + ComplexContent.SetScrollSize(fontHeight); + } } - if( FixedFont ) { - ContentCreate(Left, Top, Width, Height, 1); - ContentSet( Text, Theme.Color(clrMenuTextFixedFont), Theme.Color(clrMenuTextBg) ); - } else { - ContentCreate(Left, Top, Width, Height, 1); - ContentSet( Text, Theme.Color(clrMenuTextFont), Theme.Color(clrMenuTextBg) ); - } + ComplexContent.SetOsd(osd); + ComplexContent.SetPosition(cRect(Left, Top, Width, Height)); + ComplexContent.SetBGColor(Theme.Color(clrMenuTextBg)); + ComplexContent.SetScrollingActive(true); + + if( Config.MenuContentFullSize || Scrollable ) { + ComplexContent.CreatePixmaps(true); + } else + ComplexContent.CreatePixmaps(false); + ComplexContent.Draw(); - if( ContentScrollable() ) - DrawScrollbar(ContentScrollTotal(), ContentScrollOffset(), ContentVisibleLines(), contentTop - scrollBarTop, ContentGetHeight(), ContentScrollOffset() > 0, ContentScrollOffset() + ContentVisibleLines() < ContentScrollTotal(), true); + if( Scrollable ) + DrawScrollbar(ComplexContent.ScrollTotal(), ComplexContent.ScrollOffset(), ComplexContent.ScrollShown(), ComplexContent.Top() - scrollBarTop, ComplexContent.Height(), ComplexContent.ScrollOffset() > 0, ComplexContent.ScrollOffset() + ComplexContent.ScrollShown() < ComplexContent.ScrollTotal(), true); - if( Config.MenuContentFullSize || ContentScrollable() ) - DecorBorderDraw(Left, Top, Width, ContentGetHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + if( Config.MenuContentFullSize || Scrollable ) + DecorBorderDraw(Left, Top, Width, ComplexContent.ContentHeight(true), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg); else - DecorBorderDraw(Left, Top, Width, ContentGetTextHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(Left, Top, Width, ComplexContent.ContentHeight(false), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg); } diff --git a/displaymenu.h b/displaymenu.h index ac003d52..50e1f560 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -1,6 +1,7 @@ #pragma once #include "baserender.h" +#include "complexcontent.h" #include <list> #include <ctype.h> #include <iostream> @@ -13,18 +14,18 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu { cPixmap *menuPixmap; cPixmap *menuIconsPixmap; cPixmap *menuIconsBGPixmap; - + int menuTop, menuWidth; int menuItemWidth; - + eMenuCategory menuCategory; int VideoDiskUsageState; - + int chLeft, chTop, chWidth, chHeight; cPixmap *contentHeadPixmap; - + int cLeft, cTop, cWidth, cHeight; - + cPixmap *scrollbarPixmap; int scrollBarTop, scrollBarWidth, scrollBarHeight; @@ -32,12 +33,14 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu { std::list<sDecorBorder> ItemsBorder; sDecorBorder EventBorder, RecordingBorder, TextBorder; - + bool isScrolling; bool ShowEvent, ShowRecording, ShowText; - + + cComplexContent ComplexContent; + cString ItemEventLastChannelName; - + void ItemBorderInsertUnique(sDecorBorder ib); void ItemBorderDrawAllWithScrollbar(void); void ItemBorderDrawAllWithoutScrollbar(void); @@ -67,15 +70,15 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu { virtual void Scroll(bool Up, bool Page); virtual int MaxItems(void); virtual void Clear(void); - + virtual void SetMenuCategory(eMenuCategory MenuCategory); //virtual void SetTabs(int Tab1, int Tab2 = 0, int Tab3 = 0, int Tab4 = 0, int Tab5 = 0); - + virtual void SetTitle(const char *Title); virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); virtual void SetMessage(eMessageType Type, const char *Text); virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable); - + virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch); virtual bool SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable); virtual bool SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider); diff --git a/po/de_DE.po b/po/de_DE.po index 8b9f9979..a617a8bb 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinflat 0.2.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-04-03 19:32+0200\n" +"POT-Creation-Date: 2014-04-23 10:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -39,6 +39,18 @@ msgstr "Timer nicht aktiv" msgid "no recording info" msgstr "keine Aufnahme Informationen" +msgid "Description" +msgstr "Beschreibung" + +msgid "Actors" +msgstr "Schauspieler" + +msgid "Reruns" +msgstr "Wiederholungen" + +msgid "Video information" +msgstr "Video Informationen" + msgid "Length" msgstr "Länge" @@ -63,6 +75,9 @@ msgstr "Kanal" msgid "search pattern" msgstr "Suchmuster" +msgid "Recording information" +msgstr "" + msgid "Audio Tracks" msgstr "Audio Tracks" @@ -297,6 +312,9 @@ msgstr "Zeige Zusatzinfo bei Aufnahmen" msgid "Show additional EPG info" msgstr "Zeige Zusatzinfo bei EPG" +msgid "Show reruns in EPG info" +msgstr "Zeige Wiederholungen bei EPG" + msgid "Main menuitem scale" msgstr "Hauptmenüeintrag Scale" @@ -395,3 +413,15 @@ msgstr "Kanalinfo zeige Poster?" msgid "Channelinfo poster size" msgstr "Kanalinfo Poster Größe" + +msgid "EPG info show poster?" +msgstr "EPG-Info zeige Poster?" + +msgid "recording info show poster?" +msgstr "Aufnahmeinfo zeige Poster?" + +msgid "EPG info show actors?" +msgstr "EPG-Info zeige Schauspieler?" + +msgid "recording info show actors?" +msgstr "Aufnahmeinfo zeige Schauspieler?" @@ -206,6 +206,11 @@ void cFlatSetup::Store(void) { SetupStore("SignalQualityUseColors", Config.SignalQualityUseColors); SetupStore("TVScraperChanInfoShowPoster", Config.TVScraperChanInfoShowPoster); SetupStore("TVScraperChanInfoPosterSize", dtoa(Config.TVScraperChanInfoPosterSize)); + SetupStore("TVScraperEPGInfoShowPoster", Config.TVScraperEPGInfoShowPoster); + SetupStore("TVScraperRecInfoShowPoster", Config.TVScraperEPGInfoShowPoster); + SetupStore("EpgRerunsShow", Config.EpgRerunsShow); + SetupStore("TVScraperEPGInfoShowActors", Config.TVScraperEPGInfoShowActors); + SetupStore("TVScraperRecInfoShowActors", Config.TVScraperRecInfoShowActors); Config.Init(); } @@ -410,6 +415,7 @@ void cFlatSetupMenu::Setup(void) { Add(new cMenuEditBoolItem(tr("Menu content fullsize background"), &SetupConfig->MenuContentFullSize)); Add(new cMenuEditBoolItem(tr("Show additional recording info"), &SetupConfig->RecordingAdditionalInfoShow)); Add(new cMenuEditBoolItem(tr("Show additional EPG info"), &SetupConfig->EpgAdditionalInfoShow)); + Add(new cMenuEditBoolItem(tr("Show reruns in EPG info"), &SetupConfig->EpgRerunsShow)); Add(new cMenuEditPrcItem(tr("Main menuitem scale"), &SetupConfig->MainMenuItemScale, 0.2, 1, 0)); Add(new cMenuEditStraItem(tr("Menu channel view"), &SetupConfig->MenuChannelView, MenuChannelViews.Size(), &MenuChannelViews[0])); @@ -672,6 +678,10 @@ void cFlatSetupTvsraper::Setup(void) { Add(new cMenuEditBoolItem(tr("Channelinfo show poster?"), &SetupConfig->TVScraperChanInfoShowPoster)); Add(new cMenuEditPrcItem(tr("Channelinfo poster size"), &SetupConfig->TVScraperChanInfoPosterSize, 0.004, 0.015, 2)); + Add(new cMenuEditBoolItem(tr("EPG info show poster?"), &SetupConfig->TVScraperEPGInfoShowPoster)); + Add(new cMenuEditBoolItem(tr("recording info show poster?"), &SetupConfig->TVScraperRecInfoShowPoster)); + Add(new cMenuEditBoolItem(tr("EPG info show actors?"), &SetupConfig->TVScraperEPGInfoShowActors)); + Add(new cMenuEditBoolItem(tr("recording info show actors?"), &SetupConfig->TVScraperRecInfoShowActors)); if( ItemLastSel >= 0 ) { SetCurrent(Get(ItemLastSel)); |