summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-11-17 15:34:11 +0100
committerlouis <louis.braun@gmx.de>2013-11-17 15:34:11 +0100
commit1003296f4c47504a0d4723ae04e314529f2d05a5 (patch)
tree68153e8b4f8d8c67dd7dc389e8d317082277e117
parentf942b7ba3efd3ad94f685e23ca7f8cfaa29da8c1 (diff)
downloadskin-nopacity-1003296f4c47504a0d4723ae04e314529f2d05a5.tar.gz
skin-nopacity-1003296f4c47504a0d4723ae04e314529f2d05a5.tar.bz2
Added EPG Info in narrow Timers Menu
-rw-r--r--HISTORY1
-rw-r--r--config.c1
-rw-r--r--displaymenu.c5
-rw-r--r--displaymenuview.c19
-rw-r--r--displaymenuview.h1
-rw-r--r--geometrymanager.c2
-rw-r--r--menuitem.c25
-rw-r--r--menuitem.h3
-rw-r--r--setup.c3
-rw-r--r--setup.h1
10 files changed, 55 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index 065dcbc..503c752 100644
--- a/HISTORY
+++ b/HISTORY
@@ -368,3 +368,4 @@ Version 0.1.4
- changed Makefile to support both ImageMagick and GraphicsMagick
(configurable in Makefile)
- updated slovakian translation
+- Added EPG Info in narrow Timers Menu
diff --git a/config.c b/config.c
index fda1aca..dead20f 100644
--- a/config.c
+++ b/config.c
@@ -114,6 +114,7 @@ void cNopacityConfig::LoadDefaults(void) {
conf.insert(std::pair<std::string, int>("borderDetailedRecordings", 30));
conf.insert(std::pair<std::string, int>("menuSchedulesWindowMode", 1));
conf.insert(std::pair<std::string, int>("menuRecordingsWindowMode", 1));
+ conf.insert(std::pair<std::string, int>("menuTimersWindowMode", 1));
conf.insert(std::pair<std::string, int>("fontHeader", 0));
conf.insert(std::pair<std::string, int>("fontDate", 0));
conf.insert(std::pair<std::string, int>("fontMenuitemLarge", 0));
diff --git a/displaymenu.c b/displaymenu.c
index d7e17bb..dad02db 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -417,13 +417,16 @@ bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Cur
if (!config.GetValue("narrowTimerMenu"))
return false;
if ((initMenu)&&(Index > menuItemIndexLast)) {
- cNopacityMenuItem *item = new cNopacityTimerMenuItem(osd, imgCache, Timer, Selectable);
+ cNopacityMenuItem *item = new cNopacityTimerMenuItem(osd, imgCache, Timer, Selectable, &videoWindowRect);
cPoint itemSize;
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
item->SetFont(fontManager->menuItemTimers);
item->SetFontSmall(fontManager->menuItemTimersSmall);
+ item->SetFontEPGWindow(fontManager->menuEPGInfoWindow);
+ item->SetFontEPGWindowLarge(fontManager->menuEPGInfoWindowLarge);
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), geoManager->menuSpace);
+ item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcTimer));
item->SetCurrent(Current);
item->CreateText();
int textWidth = item->CheckScrollable(true);
diff --git a/displaymenuview.c b/displaymenuview.c
index 530f08f..7298311 100644
--- a/displaymenuview.c
+++ b/displaymenuview.c
@@ -32,8 +32,8 @@ cOsd *cNopacityDisplayMenuView::createOsd(void) {
}
void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
- int xSchedules, xRecordings, xChannels;
- int widthSchedules, widthRecordings, widthChannels;
+ int xSchedules, xRecordings, xChannels, xTimers;
+ int widthSchedules, widthRecordings, widthChannels, widthTimers;
if (config.GetValue("menuAdjustLeft")) {
xSchedules = 2 * geoManager->menuSpace
+ geoManager->menuContentWidthSchedules
@@ -44,13 +44,18 @@ void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
xChannels = 2 * geoManager->menuSpace
+ geoManager->menuContentWidthChannels
+ geoManager->menuWidthScrollbar;
+ xTimers = 2 * geoManager->menuSpace
+ + geoManager->menuContentWidthTimers
+ + geoManager->menuWidthScrollbar;
widthSchedules = geoManager->osdWidth - xSchedules - geoManager->menuSpace;
widthRecordings = geoManager->osdWidth - xRecordings - geoManager->menuSpace;
widthChannels = geoManager->osdWidth - xChannels - geoManager->menuSpace;
+ widthTimers = geoManager->osdWidth - xTimers - geoManager->menuSpace;
} else {
xSchedules = geoManager->menuSpace;
xRecordings = geoManager->menuSpace;
xChannels = geoManager->menuSpace;
+ xTimers = geoManager->menuSpace;
widthSchedules = geoManager->osdWidth
- geoManager->menuContentWidthSchedules
- geoManager->menuWidthScrollbar
@@ -63,6 +68,10 @@ void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
- geoManager->menuContentWidthChannels
- geoManager->menuWidthScrollbar
- 2 * geoManager->menuSpace;
+ widthTimers = geoManager->osdWidth
+ - geoManager->menuContentWidthTimers
+ - geoManager->menuWidthScrollbar
+ - 2 * geoManager->menuSpace;
}
int heightFull = geoManager->menuContentHeight - 2*geoManager->menuSpace;
int height = config.GetValue("menuHeightInfoWindow") * heightFull / 100;
@@ -77,6 +86,10 @@ void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
textWindowSizeRecordings = cRect(xRecordings,y,widthRecordings,height);
else
textWindowSizeRecordings = cRect(xRecordings,yFullScreen,widthRecordings,heightFull);
+ if (config.GetValue("menuTimersWindowMode") == 0)
+ textWindowSizeTimers = cRect(xTimers,y,widthTimers,height);
+ else
+ textWindowSizeTimers = cRect(xTimers,yFullScreen,widthTimers,heightFull);
textWindowSizeChannels = cRect(xChannels,y,widthChannels,height);
}
@@ -88,6 +101,8 @@ cRect *cNopacityDisplayMenuView::GetDescriptionTextWindowSize(eMenuCategory menu
return &textWindowSizeRecordings;
case mcChannel:
return &textWindowSizeChannels;
+ case mcTimer:
+ return &textWindowSizeTimers;
default:
return NULL;
}
diff --git a/displaymenuview.h b/displaymenuview.h
index ca0e61f..a5a50b7 100644
--- a/displaymenuview.h
+++ b/displaymenuview.h
@@ -39,6 +39,7 @@ class cNopacityDisplayMenuView {
cRect textWindowSizeSchedules;
cRect textWindowSizeRecordings;
cRect textWindowSizeChannels;
+ cRect textWindowSizeTimers;
int GetContentWidth(eMenuCategory menuCat);
public:
cNopacityDisplayMenuView(cImageCache *imgCache);
diff --git a/geometrymanager.c b/geometrymanager.c
index 5d0cddf..ff5c29d 100644
--- a/geometrymanager.c
+++ b/geometrymanager.c
@@ -53,7 +53,7 @@ void cGeometryManager::SetDisplayMenuSizes() {
menuContentWidthMain = osdWidth * config.GetValue("menuWidthMain") / 100;
menuContentWidthSchedules = osdWidth * config.GetValue("menuWidthSchedules") / 100;
menuContentWidthChannels = osdWidth * config.GetValue("menuWidthChannels") / 100;
- menuContentWidthTimers = osdWidth * config.GetValue("menuWidthChannels") / 100;
+ menuContentWidthTimers = osdWidth * config.GetValue("menuWidthTimers") / 100;
menuContentWidthRecordings = osdWidth * config.GetValue("menuWidthRecordings") / 100;
menuContentWidthSetup = osdWidth * config.GetValue("menuWidthSetup") / 100;
menuContentWidthFull = osdWidth - config.GetValue("widthScrollbar") - config.GetValue("spaceMenu");
diff --git a/menuitem.c b/menuitem.c
index 1dad2cc..f5fbfa7 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -920,8 +920,9 @@ void cNopacityChannelMenuItem::Render() {
// cNopacityTimerMenuItem -------------
-cNopacityTimerMenuItem::cNopacityTimerMenuItem(cOsd *osd, cImageCache *imgCache, const cTimer *Timer, bool sel) : cNopacityMenuItem (osd, imgCache, "", sel) {
+cNopacityTimerMenuItem::cNopacityTimerMenuItem(cOsd *osd, cImageCache *imgCache, const cTimer *Timer, bool sel, cRect *vidWin) : cNopacityMenuItem (osd, imgCache, "", sel) {
this->Timer = Timer;
+ this->vidWin = vidWin;
}
cNopacityTimerMenuItem::~cNopacityTimerMenuItem(void) {
@@ -1070,6 +1071,28 @@ void cNopacityTimerMenuItem::Render() {
SetTextShort();
Cancel(-1);
}
+ if (wasCurrent)
+ if (infoTextWindow) {
+ delete infoTextWindow;
+ infoTextWindow = NULL;
+ }
+ const cEvent *Event = Timer->Event();
+ if (current && Event) {
+ if (config.GetValue("menuTimersWindowMode") == 0) {
+ //window mode
+ infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
+ infoTextWindow->SetGeometry(textWindow);
+ infoTextWindow->SetText(Event->Description());
+ infoTextWindow->SetPoster(Event, false);
+ infoTextWindow->Start();
+ } else {
+ //fullscreen mode
+ infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, fontEPGWindowLarge);
+ infoTextWindow->SetGeometry(textWindow);
+ infoTextWindow->SetPoster(Event, false, true);
+ infoTextWindow->SetEvent(Event);
+ }
+ }
}
}
diff --git a/menuitem.h b/menuitem.h
index ff1403c..07e13de 100644
--- a/menuitem.h
+++ b/menuitem.h
@@ -145,13 +145,14 @@ private:
std::string strEntry;
std::string strEntryFull;
std::string strDateTime;
+ cRect *vidWin;
void SetTextFull(void);
void SetTextShort(void);
void DrawBackground(int textLeft);
void DrawLogo(int logoWidth, int logoHeight);
std::string CreateDate(void);
public:
- cNopacityTimerMenuItem(cOsd *osd, cImageCache *imgCache, const cTimer *Timer, bool sel);
+ cNopacityTimerMenuItem(cOsd *osd, cImageCache *imgCache, const cTimer *Timer, bool sel, cRect *vidWin);
~cNopacityTimerMenuItem(void);
void CreatePixmapTextScroller(int totalWidth);
void CreateText(void);
diff --git a/setup.c b/setup.c
index 1cb4d4b..98197be 100644
--- a/setup.c
+++ b/setup.c
@@ -303,6 +303,8 @@ void cNopacitySetupMenuDisplayChannels::Set(void) {
//-----MenuDisplay Timers Menu -------------------------------------------------------------------------------------------------------------
cNopacitySetupMenuDisplayTimers::cNopacitySetupMenuDisplayTimers(cNopacityConfig* data) : cMenuSetupSubMenu(tr("VDR Menu: Timers Menu"), data) {
+ windowMode[0] = tr("window");
+ windowMode[1] = tr("full screen");
Set();
}
@@ -313,6 +315,7 @@ void cNopacitySetupMenuDisplayTimers::Set(void) {
Add(new cMenuEditBoolItem(tr("Use narrow menu"), tmpConf->GetValueRef("narrowTimerMenu")));
if (tmpConf->GetValue("narrowTimerMenu"))
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthTimers"), 10, 97));
+ Add(new cMenuEditStraItem(tr("Mode of EPG Window"), tmpConf->GetValueRef("menuTimersWindowMode"), 2, windowMode));
Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), tmpConf->GetValueRef("fontMenuitemTimers"), -20, 20));
Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), tmpConf->GetValueRef("fontMenuitemTimersSmall"), -20, 20));
diff --git a/setup.h b/setup.h
index 7ccd984..6b5dc8a 100644
--- a/setup.h
+++ b/setup.h
@@ -73,6 +73,7 @@ class cNopacitySetupMenuDisplayChannels : public cMenuSetupSubMenu {
class cNopacitySetupMenuDisplayTimers : public cMenuSetupSubMenu {
protected:
+ const char *windowMode[2];
void Set(void);
public:
cNopacitySetupMenuDisplayTimers(cNopacityConfig *data);