summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-02-14 21:21:15 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-02-14 21:21:15 +0100
commitaeae728ce0bbd60ccb04962c0384b9510efdfeb7 (patch)
treeff972bf4b2cc044734b9700cc0d34c7d23dd6d5c
parentc9773fe039df037210bd145ac86a29326845ede3 (diff)
downloadskin-flatplus-aeae728ce0bbd60ccb04962c0384b9510efdfeb7.tar.gz
skin-flatplus-aeae728ce0bbd60ccb04962c0384b9510efdfeb7.tar.bz2
first implementation of SetItemEvent (program menu)
-rw-r--r--baserender.c24
-rw-r--r--baserender.h3
-rw-r--r--config.c2
-rw-r--r--config.h1
-rw-r--r--displaymenu.c268
-rw-r--r--displaymenu.h4
-rw-r--r--icons/default/timer_full.pngbin0 -> 6760 bytes
-rw-r--r--icons/default/timer_partial.pngbin0 -> 5101 bytes
-rw-r--r--icons/default/vps.pngbin0 -> 2792 bytes
-rw-r--r--imageloader.c52
-rw-r--r--po/de_DE.po5
-rw-r--r--setup.c8
12 files changed, 297 insertions, 70 deletions
diff --git a/baserender.c b/baserender.c
index 7b479517..891c8754 100644
--- a/baserender.c
+++ b/baserender.c
@@ -19,6 +19,8 @@ cFlatBaseRender::cFlatBaseRender(void) {
topBarHeight = 0;
topBarExtraIconSet = false;
topBarMenuIconSet = false;
+ topBarMenuLogo = "";
+ topBarMenuLogoSet = false;
marginItem = 5;
@@ -116,6 +118,8 @@ void cFlatBaseRender::TopBarSetTitle(cString title) {
topBarUpdateTitle = true;
topBarExtraIconSet = false;
topBarMenuIconSet = false;
+ topBarMenuLogo = "";
+ topBarMenuLogoSet = false;
}
void cFlatBaseRender::TopBarSetTitleExtra(cString extra1, cString extra2) {
@@ -140,6 +144,14 @@ void cFlatBaseRender::TopBarSetMenuIcon(cString icon) {
topBarUpdateTitle = true;
}
+void cFlatBaseRender::TopBarSetMenuLogo(cString icon) {
+ if( !strcmp(*icon, "") )
+ return;
+ topBarMenuLogo = icon;
+ topBarMenuLogoSet = true;
+ topBarUpdateTitle = true;
+}
+
// sollte bei jedum "Flush" aufgerufen werden!
void cFlatBaseRender::TopBarUpdate(void) {
cString curDate = DayDateTime();
@@ -172,7 +184,6 @@ void cFlatBaseRender::TopBarUpdate(void) {
topBarIconPixmap->Fill(clrTransparent);
if( topBarExtraIconSet ) {
int extraIconLeft = extraLeft + extraMaxWidth + marginItem;
-// if (imgLoader.LoadIcon(*topBarExtraIcon, 999, topBarHeight)) {
cImage *img = imgLoader.LoadIcon(*topBarExtraIcon, 999, topBarHeight);
if( img ) {
int iconTop = 0;
@@ -193,6 +204,17 @@ void cFlatBaseRender::TopBarUpdate(void) {
}
}
+ if( topBarMenuLogoSet && Config.TopBarMenuIconShow ) {
+ int IconLeft = marginItem;
+ cImage *img = imgLoader.LoadLogo(*topBarMenuLogo, 999, topBarHeight - marginItem*2);
+ if( img ) {
+ int iconTop = (topBarHeight / 2 - img->Height()/2);
+ topBarIconPixmap->DrawImage(cPoint(IconLeft, iconTop), *img);
+ MenuIconWidth = img->Width()+marginItem*2;
+ TitleWidthLeft -= MenuIconWidth + marginItem*3;
+ }
+ }
+
time_t t;
time(&t);
diff --git a/baserender.h b/baserender.h
index 80e5e244..f9920a2c 100644
--- a/baserender.h
+++ b/baserender.h
@@ -47,6 +47,8 @@ class cFlatBaseRender
bool topBarExtraIconSet;
cString topBarMenuIcon;
bool topBarMenuIconSet;
+ cString topBarMenuLogo;
+ bool topBarMenuLogoSet;
bool topBarUpdateTitle;
cString topBarLastDate;
@@ -123,6 +125,7 @@ class cFlatBaseRender
void TopBarSetTitle(cString title);
void TopBarSetTitleExtra(cString extra1, cString extra2);
void TopBarSetMenuIcon(cString icon);
+ void TopBarSetMenuLogo(cString icon);
void TopBarSetExtraIcon(cString icon);
void TopBarUpdate(void);
diff --git a/config.c b/config.c
index f1e67e48..cca894b6 100644
--- a/config.c
+++ b/config.c
@@ -44,6 +44,7 @@ cFlatConfig::cFlatConfig(void) {
MenuChannelView = 1;
MenuTimerView = 3;
+ MenuEventView = 1;
decorBorderChannelByTheme = 1;
decorBorderChannelTypeUser = 0;
@@ -180,6 +181,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "MainMenuItemScale") == 0) MainMenuItemScale = atod(Value);
else if (strcmp(Name, "MenuChannelView") == 0) MenuChannelView = atoi(Value);
else if (strcmp(Name, "MenuTimerView") == 0) MenuTimerView = atoi(Value);
+ else if (strcmp(Name, "MenuEventView") == 0) MenuEventView = atoi(Value);
else if (strcmp(Name, "ChannelSimpleAspectFormat") == 0) ChannelSimpleAspectFormat = atoi(Value);
else if (strcmp(Name, "RecordingSimpleAspectFormat") == 0) RecordingSimpleAspectFormat = atoi(Value);
diff --git a/config.h b/config.h
index 78a716ae..363e812f 100644
--- a/config.h
+++ b/config.h
@@ -179,6 +179,7 @@ class cFlatConfig
int MenuChannelView;
int MenuTimerView;
+ int MenuEventView;
int DecorIndex;
};
diff --git a/displaymenu.c b/displaymenu.c
index 42c053f8..a01bc244 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -92,11 +92,8 @@ cFlatDisplayMenu::~cFlatDisplayMenu() {
}
void cFlatDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) {
- //if( menuCategory == 8 && MenuCategory == 7 ) {
- // DecorBorderClearByFrom(BorderMenuItem);
- ItemBorderClear();
- //}
-
+ ItemBorderClear();
+
menuCategory = MenuCategory;
if( menuCategory == mcChannel ) {
@@ -109,7 +106,13 @@ void cFlatDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) {
itemTimerHeight = fontHeight + Config.MenuItemPadding + Config.decorBorderMenuItemSize*2;
else if( Config.MenuTimerView == 2 || Config.MenuTimerView == 3 )
itemTimerHeight = fontHeight + fontSmlHeight + marginItem + Config.MenuItemPadding + Config.decorBorderMenuItemSize*2;
+ } else if( menuCategory == mcSchedule || menuCategory == mcScheduleNow || menuCategory == mcScheduleNext ) {
+ if( Config.MenuEventView == 0 || Config.MenuEventView == 1 )
+ itemEventHeight = fontHeight + Config.MenuItemPadding + Config.decorBorderMenuItemSize*2;
+ else if( Config.MenuEventView == 2 || Config.MenuEventView == 3 )
+ itemEventHeight = fontHeight + fontSmlHeight + marginItem + Config.MenuItemPadding + Config.decorBorderMenuItemSize*2;
}
+
}
void cFlatDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown, bool isContent) {
@@ -154,8 +157,10 @@ void cFlatDisplayMenu::Scroll(bool Up, bool Page) {
int cFlatDisplayMenu::MaxItems(void) {
if( menuCategory == mcChannel )
return scrollBarHeight / itemChannelHeight;
- if( menuCategory == mcTimer )
+ else if( menuCategory == mcTimer )
return scrollBarHeight / itemTimerHeight;
+ else if( menuCategory == mcSchedule || menuCategory == mcScheduleNow || menuCategory == mcScheduleNext )
+ return scrollBarHeight / itemEventHeight;
return scrollBarHeight / itemHeight;
}
@@ -163,8 +168,10 @@ int cFlatDisplayMenu::MaxItems(void) {
int cFlatDisplayMenu::ItemsHeight(void) {
if( menuCategory == mcChannel )
return MaxItems() * itemChannelHeight - Config.MenuItemPadding;
- if( menuCategory == mcTimer )
+ else if( menuCategory == mcTimer )
return MaxItems() * itemTimerHeight - Config.MenuItemPadding;
+ else if( menuCategory == mcSchedule || menuCategory == mcScheduleNow || menuCategory == mcScheduleNext )
+ return MaxItems() * itemEventHeight - Config.MenuItemPadding;
return MaxItems() * itemHeight - Config.MenuItemPadding;
}
@@ -718,7 +725,7 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C
if( Config.MenuChannelView == 3 || Config.MenuChannelView == 4 ) {
PBTop = Top + fontHeight + fontSmlHeight;
PBLeft = Left - Width - marginItem;
- PBWidth = menuItemWidth - LeftName - marginItem*2;
+ PBWidth = menuItemWidth - LeftName - marginItem*2 - Config.decorBorderMenuItemSize - scrollBarWidth;
if( isScrolling )
PBWidth += scrollBarWidth;
@@ -925,7 +932,7 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
}
menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, Height), ColorBg);
-
+ cImage *img = NULL;
int Left, Top;
Left = Config.decorBorderMenuItemSize + marginItem;
Top = y;
@@ -944,7 +951,7 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
} else
TimerIconName = "timerActive";
- cImage *img = imgLoader.LoadIcon(TimerIconName, imageHeight, imageHeight);
+ img = imgLoader.LoadIcon(TimerIconName, imageHeight, imageHeight);
if( img ) {
imageTop = Top + (fontHeight - img->Height()) / 2;
menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img );
@@ -966,7 +973,6 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
if( img ) {
imageTop = Top + (fontHeight - img->Height()) / 2;
menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img );
- Left += imageHeight + marginItem * 2;
} else {
bool isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0))) ? true : false;
@@ -975,24 +981,22 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
if( img ) {
imageTop = Top + (fontHeight - img->Height()) / 2;
menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img );
- Left += imageHeight + marginItem * 2;
}
} else if( Channel->GroupSep() ) {
img = imgLoader.LoadIcon("changroup", imageHeight, imageHeight);
if( img ) {
imageTop = Top + (fontHeight - img->Height()) / 2;
menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img );
- Left += imageHeight + marginItem * 2;
}
} else {
img = imgLoader.LoadIcon("tv", imageHeight, imageHeight);
if( img ) {
imageTop = Top + (fontHeight - img->Height()) / 2;
menuIconsPixmap->DrawImage( cPoint(imageLeft, imageTop), *img );
- Left += imageHeight + marginItem * 2;
}
}
}
+ Left += imageHeight + marginItem * 2;
cString day, name("");
if (Timer->WeekDays())
@@ -1074,6 +1078,242 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
return true;
}
+bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) {
+ if( !Event || Config.MenuEventView == 0 )
+ return false;
+
+ cImage *img = NULL;
+ cString buffer;
+ int y = Index * itemEventHeight;
+
+ int Height = fontHeight;
+ if( Config.MenuEventView == 2 || Config.MenuEventView == 3 )
+ Height = fontHeight + fontSmlHeight + marginItem;
+
+ menuItemWidth = menuWidth - Config.decorBorderMenuItemSize*2;
+ if( Config.MenuEventView == 2 || Config.MenuEventView == 3 )
+ menuItemWidth *= 0.5;
+
+ if( isScrolling )
+ menuItemWidth -= scrollBarWidth;
+
+ tColor ColorFg, ColorBg;
+ if (Current) {
+ ColorFg = Theme.Color(clrItemCurrentFont);
+ ColorBg = Theme.Color(clrItemCurrentBg);
+ }
+ else {
+ if( Selectable ) {
+ ColorFg = Theme.Color(clrItemSelableFont);
+ ColorBg = Theme.Color(clrItemSelableBg);
+ } else {
+ ColorFg = Theme.Color(clrItemFont);
+ ColorBg = Theme.Color(clrItemBg);
+ }
+ }
+
+ menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, Height), ColorBg);
+
+ int Left = 0, Top = 0, LeftSecond = 0;
+ LeftSecond = Left = Config.decorBorderMenuItemSize + marginItem;
+ Top = y;
+ int imageTop = Top;
+ int w = 0;
+
+ if( !Channel ) {
+ int CurrentChannelNr = cDevice::CurrentChannel();
+ cChannel *ChannelLogo = Channels.GetByNumber(CurrentChannelNr);
+
+ cImage *img;
+ img = imgLoader.LoadLogo(ChannelLogo->Name(), 999, topBarHeight - marginItem*2);
+ if( img ) {
+ TopBarSetMenuLogo( ChannelLogo->Name() );
+ } else {
+ bool isRadioChannel = ( (!ChannelLogo->Vpid()) && (ChannelLogo->Apid(0)) ) ? true : false;
+
+ if( isRadioChannel ) {
+ img = imgLoader.LoadIcon("radio", 999, topBarHeight - marginItem*2);
+ if( img ) {
+ TopBarSetMenuLogo( ChannelLogo->Name() );
+ }
+ } else if( ChannelLogo->GroupSep() ) {
+ img = imgLoader.LoadIcon("changroup", 999, topBarHeight - marginItem*2);
+ if( img ) {
+ TopBarSetMenuIcon( ChannelLogo->Name() );
+ }
+ } else {
+ img = imgLoader.LoadIcon("tv", 999, topBarHeight - marginItem*2);
+ if( img ) {
+ TopBarSetMenuLogo( ChannelLogo->Name() );
+ }
+ }
+ }
+ }
+
+ if( Channel ) {
+ cString ws = cString::sprintf("%d", Channels.MaxNumber());
+ w = font->Width(ws);
+ buffer = cString::sprintf("%d", Channel->Number());
+ int Width = font->Width(buffer);
+ if( Width < w )
+ Width = w;
+ menuPixmap->DrawText(cPoint(Left, Top), buffer, ColorFg, ColorBg, font, Width, fontHeight, taRight);
+ Left += Width + marginItem;
+
+ img = imgLoader.LoadLogo(Channel->Name(), fontHeight, fontHeight);
+ if( img ) {
+ imageTop = Top + (fontHeight - img->Height()) / 2;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ } else {
+ bool isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0))) ? true : false;
+
+ if( isRadioChannel ) {
+ img = imgLoader.LoadIcon("radio", fontHeight, fontHeight);
+ if( img ) {
+ imageTop = Top + (fontHeight - img->Height()) / 2;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ }
+ } else if( Channel->GroupSep() ) {
+ img = imgLoader.LoadIcon("changroup", fontHeight, fontHeight);
+ if( img ) {
+ imageTop = Top + (fontHeight - img->Height()) / 2;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ }
+ } else {
+ img = imgLoader.LoadIcon("tv", fontHeight, fontHeight);
+ if( img ) {
+ imageTop = Top + (fontHeight - img->Height()) / 2;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ }
+ }
+ }
+
+ Left += fontHeight + marginItem * 2;
+ LeftSecond = Left;
+
+ w = menuWidth / 10 * 3;
+ menuPixmap->DrawText(cPoint(Left, Top), Channel->ShortName(true), ColorFg, ColorBg, font, w);
+ Left += w + marginItem * 2;
+ }
+
+ if( WithDate ) {
+ if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel )
+ w = fontSml->Width("XXX 99. ") + marginItem;
+ else
+ w = font->Width("XXX 99. ") + marginItem;
+
+ struct tm tm_r;
+ time_t Day = Event->StartTime();
+ localtime_r(&Day, &tm_r);
+ char buf[8];
+ strftime(buf, sizeof(buf), "%2d", &tm_r);
+
+ cString DateString = cString::sprintf("%s %s. ", *WeekDayName( (time_t)Event->StartTime()), buf );
+ if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel ) {
+ menuPixmap->DrawText(cPoint(LeftSecond, Top + fontHeight), DateString, ColorFg, ColorBg, fontSml, w);
+ LeftSecond += w + marginItem;
+ } else
+ menuPixmap->DrawText(cPoint(Left, Top), DateString, ColorFg, ColorBg, font, w, fontHeight, taRight);
+
+ Left += w + marginItem;
+ }
+
+ int imageHeight = fontHeight;
+ if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel ) {
+ 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 ){
+ imageHeight = fontHeight;
+ menuPixmap->DrawText(cPoint(Left, Top), Event->GetTimeString(), ColorFg, ColorBg, font);
+ Left += font->Width( Event->GetTimeString() ) + marginItem;
+ } else {
+ menuPixmap->DrawText(cPoint(Left, Top), Event->GetTimeString(), ColorFg, ColorBg, font);
+ Left += font->Width( Event->GetTimeString() ) + marginItem;
+ }
+
+ if( TimerMatch == tmFull ) {
+ img = imgLoader.LoadIcon("timer_full", imageHeight, imageHeight);
+ if( img ) {
+ imageTop = Top;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ }
+ } else if( TimerMatch == tmPartial ) {
+ img = imgLoader.LoadIcon("timer_partial", imageHeight, imageHeight);
+ if( img ) {
+ imageTop = Top;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ }
+ }
+ Left += imageHeight + marginItem;
+
+ if( Event->Vps() && (Event->Vps() - Event->StartTime()) ) {
+ img = imgLoader.LoadIcon("vps", imageHeight, imageHeight);
+ if( img ) {
+ imageTop = Top;
+ menuIconsPixmap->DrawImage( cPoint(Left, imageTop), *img );
+ }
+ }
+ Left += imageHeight + marginItem;
+
+ if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && Channel )
+ menuPixmap->DrawText(cPoint(Left, Top), Event->Title(), ColorFg, ColorBg, fontSml, menuItemWidth - Left - marginItem);
+ else if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) ) {
+ menuPixmap->DrawText(cPoint(Left, Top), Event->Title(), ColorFg, ColorBg, font, menuItemWidth - Left - marginItem);
+
+ } else
+ menuPixmap->DrawText(cPoint(Left, Top), Event->Title(), ColorFg, ColorBg, font, menuItemWidth - Left - marginItem);
+
+ if( (Config.MenuEventView == 2 || Config.MenuEventView == 3) && !Channel ) {
+ Top += fontHeight;
+ menuPixmap->DrawText(cPoint(Left, Top), Event->ShortText(), ColorFg, ColorBg, fontSml, menuItemWidth - Left - marginItem);
+ }
+
+ sDecorBorder ib;
+ ib.Left = Config.decorBorderMenuItemSize;
+ ib.Top = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuItemSize + y;
+
+ ib.Width = menuItemWidth - Config.decorBorderMenuItemSize*2;
+
+ if( isScrolling ) {
+ ib.Width -= scrollBarWidth;
+ }
+
+ ib.Width = menuItemWidth;
+
+ ib.Height = Height;
+ ib.Size = Config.decorBorderMenuItemSize;
+ ib.Type = Config.decorBorderMenuItemType;
+
+ if( Current ) {
+ ib.ColorFg = Config.decorBorderMenuItemCurFg;
+ ib.ColorBg = Config.decorBorderMenuItemCurBg;
+ } else {
+ if( Selectable ) {
+ ib.ColorFg = Config.decorBorderMenuItemSelFg;
+ ib.ColorBg = Config.decorBorderMenuItemSelBg;
+ } else {
+ ib.ColorFg = Config.decorBorderMenuItemFg;
+ ib.ColorBg = Config.decorBorderMenuItemBg;
+ }
+ }
+
+ DecorBorderDraw(ib.Left, ib.Top, ib.Width, ib.Height,
+ ib.Size, ib.Type, ib.ColorFg, ib.ColorBg, BorderMenuItem);
+
+ if( !isScrolling ) {
+ ItemBorderInsertUnique(ib);
+ }
+
+ if( Config.MenuEventView == 3 ) {
+ DrawItemExtraEvent(Event, "");
+ }
+
+ return true;
+}
+
void cFlatDisplayMenu::SetEvent(const cEvent *Event) {
if( !Event )
return;
diff --git a/displaymenu.h b/displaymenu.h
index 617a6a1c..38b75f43 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -21,7 +21,7 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
cPixmap *scrollbarPixmap;
int scrollBarTop, scrollBarWidth, scrollBarHeight;
- int itemHeight, itemChannelHeight, itemTimerHeight;
+ int itemHeight, itemChannelHeight, itemTimerHeight, itemEventHeight;
std::list<sDecorBorder> ItemsBorder;
sDecorBorder EventBorder, RecordingBorder, TextBorder;
@@ -61,7 +61,7 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
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 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);
//virtual bool SetItemRecording(const cRecording *Recording, int Index, bool Current, bool Selectable, int Level, int Total, int New);
diff --git a/icons/default/timer_full.png b/icons/default/timer_full.png
new file mode 100644
index 00000000..8c63ee42
--- /dev/null
+++ b/icons/default/timer_full.png
Binary files differ
diff --git a/icons/default/timer_partial.png b/icons/default/timer_partial.png
new file mode 100644
index 00000000..6d001bde
--- /dev/null
+++ b/icons/default/timer_partial.png
Binary files differ
diff --git a/icons/default/vps.png b/icons/default/vps.png
new file mode 100644
index 00000000..44a67d88
--- /dev/null
+++ b/icons/default/vps.png
Binary files differ
diff --git a/imageloader.c b/imageloader.c
index 428f764c..248ca671 100644
--- a/imageloader.c
+++ b/imageloader.c
@@ -71,58 +71,6 @@ cImage* cImageLoader::LoadIcon(const char *cIcon, int width, int height, bool pr
return img;
}
-/*
-bool cImageLoader::LoadIcon(const char *cIcon, int size) {
- if (size==0)
- return false;
- cString File = cString::sprintf("%s%s/%s.%s", *Config.iconPath, Setup.OSDTheme, cIcon, *logoExtension);
- bool success = LoadImage(File);
- if( !success ) {
- File = cString::sprintf("%s%s/%s.%s", *Config.iconPath, "default", cIcon, *logoExtension);
- success = LoadImage(File);
- if( !success ) {
- dsyslog("imageloader LoadIcon: %s could not be loaded", *File);
- return false;
- }
- }
- if( size >= 0 )
- buffer.sample(Geometry(size, size));
- return true;
-}
-*/
-
-/*
-bool cImageLoader::LoadIcon2(const char *cIcon) {
- try {
- cString File = cString::sprintf("%s%s/%s.%s", *Config.iconPath, Setup.OSDTheme, cIcon, *logoExtension);
-
- bool success = LoadImage(File);
- if( !success ) {
- File = cString::sprintf("%s%s/%s.%s", *Config.iconPath, "default", cIcon, *logoExtension);
- success = LoadImage(File);
- if( !success ) {
- dsyslog("imageloader LoadIcon: %s could not be loaded", *File);
- return false;
- }
- }
- return true;
- }
- catch (...) {
- return false;
- }
-}
-
-cImage cImageLoader::GetImage() {
- return CreateImageCopy();
-}
-
-cImage cImageLoader::GetImage(int width, int height, bool preserveAspect) {
- cImage *img;
- img = CreateImage(width, height, preserveAspect);
- return *img;
-}
-*/
-
void cImageLoader::toLowerCase(std::string &str) {
const int length = str.length();
for(int i=0; i < length; ++i) {
diff --git a/po/de_DE.po b/po/de_DE.po
index b584980e..59f7bfd4 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2014-02-11 18:36+0100\n"
+"POT-Creation-Date: 2014-02-13 18:39+0100\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"
@@ -267,6 +267,9 @@ msgstr "Menü Kanal Ansicht"
msgid "Menu timer view"
msgstr "Menü Timer Ansicht"
+msgid "Menu event view"
+msgstr "Menü Programm Ansicht"
+
msgid "Menuitem border by decor-file?"
msgstr "Menüitem Rand von Decordatei?"
diff --git a/setup.c b/setup.c
index 3b0926e9..db07c1e1 100644
--- a/setup.c
+++ b/setup.c
@@ -4,6 +4,7 @@ cStringList Bordertypes;
cStringList Progresstypes;
cStringList MenuChannelViews;
cStringList MenuTimerViews;
+cStringList MenuEventViews;
cFlatSetup::cFlatSetup(void) {
SetupConfig = Config;
@@ -50,6 +51,11 @@ void cFlatSetup::Setup(void) {
MenuTimerViews.Append( strdup(tr("flatPlus short")) );
MenuTimerViews.Append( strdup(tr("flatPlus short + EPG")) );
+ MenuEventViews.Append( strdup(tr("VDR default")) );
+ MenuEventViews.Append( strdup(tr("flatPlus long")) );
+ MenuEventViews.Append( strdup(tr("flatPlus short")) );
+ MenuEventViews.Append( strdup(tr("flatPlus short + EPG")) );
+
Add(new cOsdItem(tr("General settings"), osUnknown, true));
Add(new cOsdItem(tr("Channelinfo settings"), osUnknown, true));
Add(new cOsdItem(tr("Menu settings"), osUnknown, true));
@@ -160,6 +166,7 @@ void cFlatSetup::Store(void) {
SetupStore("MainMenuItemScale", dtoa(Config.MainMenuItemScale));
SetupStore("MenuChannelView", Config.MenuChannelView);
SetupStore("MenuTimerView", Config.MenuTimerView);
+ SetupStore("MenuEventView", Config.MenuEventView);
SetupStore("ChannelSimpleAspectFormat", Config.ChannelSimpleAspectFormat);
SetupStore("RecordingSimpleAspectFormat", Config.RecordingSimpleAspectFormat);
@@ -363,6 +370,7 @@ void cFlatSetupMenu::Setup(void) {
Add(new cMenuEditStraItem(tr("Menu channel view"), &SetupConfig->MenuChannelView, MenuChannelViews.Size(), &MenuChannelViews[0]));
Add(new cMenuEditStraItem(tr("Menu timer view"), &SetupConfig->MenuTimerView, MenuTimerViews.Size(), &MenuTimerViews[0]));
+ Add(new cMenuEditStraItem(tr("Menu event view"), &SetupConfig->MenuEventView, MenuEventViews.Size(), &MenuEventViews[0]));
Add(new cMenuEditBoolItem(tr("Menuitem border by decor-file?"), &SetupConfig->decorBorderMenuItemByTheme));
if( SetupConfig->decorBorderMenuItemByTheme ) {