13 Commits

Author SHA1 Message Date
kamel5
263a734a0d Version 1.2.15 2019-11-03 13:46:13 +01:00
kamel5
7300fdf91c Workaround for HWAccelerated OSD 2019-11-03 13:08:07 +01:00
kamel5
89e9086943 Version 1.2.14 2019-10-19 16:41:09 +02:00
kamel5
e236d9e571 Optimize cTimeLine::drawClock 2019-10-19 15:10:20 +02:00
kamel5
8794891599 Fixed a error while changing a Theme 2019-10-19 15:10:13 +02:00
kamel5
cd62a9bd6b Diplay the current TimeBase throughout the whole timeline 2019-10-19 15:10:06 +02:00
kamel5
3f0bd75011 Can switch off and optimize diplay time in epggrid "displayMode == Vertical" 2019-10-19 15:09:59 +02:00
kamel5
a711aed160 Version 1.2.13 2019-10-14 18:16:28 +02:00
kamel5
cdb5a46145 Revert "Diplay the current TimeBase throughout the whole timeline"
This reverts commit b707292 because of a segfault.
2019-10-14 16:51:52 +02:00
kamel5
fc784f34e5 Version 1.2.12 2019-10-14 12:58:40 +02:00
kamel5
b707292485 Diplay the current TimeBase throughout the whole timeline 2019-10-14 12:58:35 +02:00
kamel5
587fbe1f44 Fixed updating current TimeBase 2019-10-13 13:46:29 +02:00
kamel5
9173d14b10 Fixed updating current time 2019-10-13 13:46:23 +02:00
17 changed files with 201 additions and 135 deletions

20
HISTORY
View File

@@ -216,3 +216,23 @@ Version 1.2.11
- Fixed a segfault with graphicsmagick > 1.3.31 - Fixed a segfault with graphicsmagick > 1.3.31
- Fixed a possible deadlock in detailview - Fixed a possible deadlock in detailview
- Optical changes in cMenuSetupImageCache - Optical changes in cMenuSetupImageCache
Version 1.2.12
- Fixed updating current time
- Fixed updating current TimeBase
- Diplay the current TimeBase throughout the whole timeline
Version 1.2.13
- Revert "Diplay the current TimeBase throughout the whole timeline"
Version 1.2.14
- Diplay the current TimeBase throughout the whole timeline
- Can switch off and optimize diplay time in epggrid "displayMode == Vertical"
- Fixed a error while changing a Theme
Version 1.2.15
- Workaround for HWAccelerated OSD

View File

@@ -130,9 +130,11 @@ int cChannelEpg::getY() {
return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
} }
cGridElement *cChannelEpg::getActive() { cGridElement *cChannelEpg::getActive(bool last) {
cTimeManager t; cTimeManager t;
t.Now(); t.Now();
if (last)
return grids.Last();
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) { for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
if (grid->Match(t.Get())) if (grid->Match(t.Get()))
return grid; return grid;

View File

@@ -42,7 +42,7 @@ public:
int Stop() { return timeManager->GetEnd(); }; int Stop() { return timeManager->GetEnd(); };
const char* Name() { return channel->Name(); }; const char* Name() { return channel->Name(); };
const cChannel *getChannel() {return channel;} const cChannel *getChannel() {return channel;}
cGridElement *getActive(); cGridElement *getActive(bool last = false);
cGridElement *getNext(cGridElement *activeGrid); cGridElement *getNext(cGridElement *activeGrid);
cGridElement *getPrev(cGridElement *activeGrid); cGridElement *getPrev(cGridElement *activeGrid);
cGridElement *getNeighbor(cGridElement *activeGrid); cGridElement *getNeighbor(cGridElement *activeGrid);

View File

@@ -2,6 +2,7 @@
#include "config.h" #include "config.h"
cTVGuideConfig::cTVGuideConfig() { cTVGuideConfig::cTVGuideConfig() {
useHWAccel = false;
debugImageLoading = 0; debugImageLoading = 0;
showMainMenuEntry = 1; showMainMenuEntry = 1;
replaceOriginalSchedule = 0; replaceOriginalSchedule = 0;
@@ -95,6 +96,7 @@ cTVGuideConfig::cTVGuideConfig() {
FontRecMenuItemLargeDelta = 0; FontRecMenuItemLargeDelta = 0;
timeFormat = 1; timeFormat = 1;
useNopacityTheme = 1; useNopacityTheme = 1;
useNopacityThemeCurrent = -1;
themeIndex = -1; themeIndex = -1;
themeIndexCurrent = -1; themeIndexCurrent = -1;
themeName = ""; themeName = "";
@@ -124,13 +126,14 @@ bool cTVGuideConfig::LoadTheme() {
//is correct theme already loaded? //is correct theme already loaded?
if (nOpacityTheme.size() == 0) if (nOpacityTheme.size() == 0)
nOpacityTheme = Setup.OSDTheme; nOpacityTheme = Setup.OSDTheme;
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent)) { if ((themeIndex > -1) && (themeIndex == themeIndexCurrent) && (useNopacityTheme == useNopacityThemeCurrent)) {
if (!nOpacityTheme.compare(Setup.OSDTheme)) { if (!nOpacityTheme.compare(Setup.OSDTheme)) {
return false; return false;
} else { } else {
nOpacityTheme = Setup.OSDTheme; nOpacityTheme = Setup.OSDTheme;
} }
} }
esyslog("tvguide: loading new Theme");
//Load available Themes //Load available Themes
cThemes themes; cThemes themes;
themes.Load(*cString("tvguide")); themes.Load(*cString("tvguide"));
@@ -167,6 +170,7 @@ bool cTVGuideConfig::LoadTheme() {
themeIndex = 0; themeIndex = 0;
themeIndexCurrent = themeIndex; themeIndexCurrent = themeIndex;
useNopacityThemeCurrent = useNopacityTheme;
const char *themePath = themes.FileName(themeIndex); const char *themePath = themes.FileName(themeIndex);
if (access(themePath, F_OK) == 0) { if (access(themePath, F_OK) == 0) {
@@ -240,6 +244,7 @@ cString cTVGuideConfig::checkSlashAtEnd(std::string path) {
bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) { bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value); if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value);
else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value); else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value);
else if (strcmp(Name, "useHWAccel") == 0) useHWAccel = atoi(Value);
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value); else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);
else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value); else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value);
else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value); else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value);

View File

@@ -49,6 +49,7 @@ class cTVGuideConfig {
public: public:
cTVGuideConfig(); cTVGuideConfig();
~cTVGuideConfig(); ~cTVGuideConfig();
int useHWAccel;
int debugImageLoading; int debugImageLoading;
int showMainMenuEntry; int showMainMenuEntry;
int replaceOriginalSchedule; int replaceOriginalSchedule;
@@ -149,6 +150,7 @@ class cTVGuideConfig {
int FontRecMenuItemLargeDelta; int FontRecMenuItemLargeDelta;
int timeFormat; int timeFormat;
int useNopacityTheme; int useNopacityTheme;
int useNopacityThemeCurrent;
int themeIndex; int themeIndex;
int themeIndexCurrent; int themeIndexCurrent;
cString themeName; cString themeName;

View File

@@ -92,53 +92,57 @@ void cEpgGrid::SetSwitchTimer() {
void cEpgGrid::setText() { void cEpgGrid::setText() {
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
cString strText; text->Set(event->Title(), fontManager.FontGrid, geoManager.colWidth - 2 * borderWidth);
strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title()); extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth - 2 * borderWidth);
text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth); }
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth-2*borderWidth); if (config.showTimeInGrid) {
} else if (config.displayMode == eHorizontal) { timeString = cString::sprintf("%s - %s:", *(event->GetTimeString()), *(event->GetEndTimeString()));
timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
} }
} }
void cEpgGrid::drawText() { void cEpgGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont); tColor colorText = (active) ? theme.Color(clrFontActive) : theme.Color(clrFont);
tColor colorTextBack; tColor colorTextBack;
if (config.style == eStyleFlat) if (config.style == eStyleFlat)
colorTextBack = color; colorTextBack = color;
else if (config.style == eStyleGraphical) else if (config.style == eStyleGraphical)
colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack); colorTextBack = (active) ? theme.Color(clrGridActiveFontBack) : theme.Color(clrGridFontBack);
else else
colorTextBack = clrTransparent; colorTextBack = clrTransparent;
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
if (Height()/geoManager.minutePixel < 6) if (Height() / geoManager.minutePixel < 6)
return; return;
int textHeight = fontManager.FontGrid->Height(); int textHeight = fontManager.FontGrid->Height();
int textHeightSmall = fontManager.FontGridSmall->Height();
int textLines = text->Lines(); int textLines = text->Lines();
for (int i=0; i<textLines; i++) { int titleY = borderWidth;
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid); if (config.showTimeInGrid) { // mit Zeitangabe im Grid
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridSmall);
titleY += textHeightSmall;
}
for (int i = 0; i < textLines; i++) {
pixmap->DrawText(cPoint(borderWidth, titleY + i * textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
} }
int extTextLines = extText->Lines(); int extTextLines = extText->Lines();
int offset = (textLines+1)*textHeight - 0.5*textHeight; int offset = titleY + (textLines + 0.5) * textHeight;
textHeight = fontManager.FontGridSmall->Height(); if ((Height() - textHeightSmall - 10) > offset) {
if ((Height()-textHeight-10) > offset) { for (int i = 0; i < extTextLines; i++) {
for (int i=0; i<extTextLines; i++) { pixmap->DrawText(cPoint(borderWidth, offset + i * textHeightSmall), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
} }
} }
} else if (config.displayMode == eHorizontal) { } else if (config.displayMode == eHorizontal) {
if (Width()/geoManager.minutePixel < 10) { if (Width() / geoManager.minutePixel < 10) {
int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2; int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height()) / 2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
return; return;
} }
cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str(); cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
int titleY = 0; int titleY = 0;
if (config.showTimeInGrid) { if (config.showTimeInGrid) { // mit Zeitangabe im Grid
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall); pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height())/2; titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height()) / 2;
} else { } else {
titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2; titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height()) / 2;
} }
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal);
} }

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2019-11-03 12:37+0100\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n" "PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n" "Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@@ -99,12 +99,6 @@ msgstr ""
msgid "recordings done" msgid "recordings done"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "Instant Record" msgid "Instant Record"
msgstr "Enregistra a l'instant" msgstr "Enregistra a l'instant"
@@ -567,6 +561,12 @@ msgstr "No s'han trobat gravacions per"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "whole term must appear" msgid "whole term must appear"
msgstr "expressió completa" msgstr "expressió completa"
@@ -675,6 +675,9 @@ msgstr "si existeix"
msgid "always" msgid "always"
msgstr "sempre" msgstr "sempre"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Mostra entrada del menú principal" msgstr "Mostra entrada del menú principal"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2019-11-03 12:37+0100\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n" "Last-Translator: Horst\n"
"Language-Team: \n" "Language-Team: \n"
@@ -96,12 +96,6 @@ msgstr "aktive Timer"
msgid "recordings done" msgid "recordings done"
msgstr "erledigte Aufnahmen" msgstr "erledigte Aufnahmen"
msgid "What's on now"
msgstr "Was läuft jetzt?"
msgid "What's on next"
msgstr "Was läuft als nächstes?"
msgid "Instant Record" msgid "Instant Record"
msgstr "Aufnahme" msgstr "Aufnahme"
@@ -564,6 +558,12 @@ msgstr "Keine Aufnahmen gefunden für"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "Keine Favoriten verfügbar" msgstr "Keine Favoriten verfügbar"
msgid "What's on now"
msgstr "Was läuft jetzt?"
msgid "What's on next"
msgstr "Was läuft als nächstes?"
msgid "whole term must appear" msgid "whole term must appear"
msgstr "vollständiger Ausdruck" msgstr "vollständiger Ausdruck"
@@ -672,6 +672,9 @@ msgstr "falls vorhanden"
msgid "always" msgid "always"
msgstr "immer" msgstr "immer"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Hauptmenüeintrag anzeigen" msgstr "Hauptmenüeintrag anzeigen"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2019-11-03 12:37+0100\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n" "Last-Translator: fiveten_59\n"
"Language-Team: \n" "Language-Team: \n"
@@ -96,12 +96,6 @@ msgstr "Timers attivi"
msgid "recordings done" msgid "recordings done"
msgstr "registrazione eseguita" msgstr "registrazione eseguita"
msgid "What's on now"
msgstr "Was läuft jetzt?"
msgid "What's on next"
msgstr "Was läuft als nächstes?"
msgid "Instant Record" msgid "Instant Record"
msgstr "Registrazione immediata" msgstr "Registrazione immediata"
@@ -564,6 +558,12 @@ msgstr "Nessuna registrazione trovata per"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "Nessun Favoriti disponibile" msgstr "Nessun Favoriti disponibile"
msgid "What's on now"
msgstr "Was läuft jetzt?"
msgid "What's on next"
msgstr "Was läuft als nächstes?"
msgid "whole term must appear" msgid "whole term must appear"
msgstr "vollständiger Ausdruck" msgstr "vollständiger Ausdruck"
@@ -672,6 +672,9 @@ msgstr "se esiste"
msgid "always" msgid "always"
msgstr "sempre" msgstr "sempre"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Hauptmenüeintrag anzeigen" msgstr "Hauptmenüeintrag anzeigen"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.0.0\n" "Project-Id-Version: vdr-tvguide 1.0.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2019-11-03 12:37+0100\n"
"PO-Revision-Date: 2013-09-25 17:49+0400\n" "PO-Revision-Date: 2013-09-25 17:49+0400\n"
"Last-Translator: AmiD, ilya\n" "Last-Translator: AmiD, ilya\n"
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n" "Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
@@ -96,12 +96,6 @@ msgstr ""
msgid "recordings done" msgid "recordings done"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "Instant Record" msgid "Instant Record"
msgstr "Записать" msgstr "Записать"
@@ -564,6 +558,12 @@ msgstr "Не найдено записей:"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "whole term must appear" msgid "whole term must appear"
msgstr "фраза" msgstr "фраза"
@@ -672,6 +672,9 @@ msgstr "если существует"
msgid "always" msgid "always"
msgstr "всегда" msgstr "всегда"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Показывать пункт в главном меню" msgstr "Показывать пункт в главном меню"

View File

@@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n" "Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2019-11-03 12:37+0100\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n" "PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@@ -96,12 +96,6 @@ msgstr ""
msgid "recordings done" msgid "recordings done"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "Instant Record" msgid "Instant Record"
msgstr "Okam<61>ite nahra<72>" msgstr "Okam<61>ite nahra<72>"
@@ -564,6 +558,12 @@ msgstr "Nena
msgid "No Favorites available" msgid "No Favorites available"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "whole term must appear" msgid "whole term must appear"
msgstr "kompletn<74> v<>raz" msgstr "kompletn<74> v<>raz"
@@ -672,6 +672,9 @@ msgstr "ak s
msgid "always" msgid "always"
msgstr "v<>dy" msgstr "v<>dy"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Zobrazi<7A> v hlavnom menu" msgstr "Zobrazi<7A> v hlavnom menu"

View File

@@ -60,6 +60,7 @@ void cTvguideSetup::Store(void) {
SetupStore("debugImageLoading", config.debugImageLoading); SetupStore("debugImageLoading", config.debugImageLoading);
SetupStore("useNopacityTheme", config.useNopacityTheme); SetupStore("useNopacityTheme", config.useNopacityTheme);
SetupStore("themeIndex", config.themeIndex); SetupStore("themeIndex", config.themeIndex);
SetupStore("useHWAccel", config.useHWAccel);
SetupStore("showMainMenuEntry", config.showMainMenuEntry); SetupStore("showMainMenuEntry", config.showMainMenuEntry);
SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule); SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule);
SetupStore("displayMode", config.displayMode); SetupStore("displayMode", config.displayMode);
@@ -203,6 +204,7 @@ cMenuSetupGeneral::cMenuSetupGeneral(cTVGuideConfig* data) : cMenuSetupSubMenu(
void cMenuSetupGeneral::Set(void) { void cMenuSetupGeneral::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cMenuEditBoolItem(tr("Use workaround for HWAccelerated OSD"), &tmpConfig->useHWAccel));
Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpConfig->showMainMenuEntry)); Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpConfig->showMainMenuEntry));
Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpConfig->replaceOriginalSchedule)); Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpConfig->replaceOriginalSchedule));
Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpConfig->useNopacityTheme)); Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpConfig->useNopacityTheme));
@@ -275,8 +277,8 @@ void cMenuSetupScreenLayout::Set(void) {
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12));
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Display time in EPG Grids")), &tmpConfig->showTimeInGrid));
} }
Add(new cMenuEditBoolItem(tr("Display time in EPG Grids"), &tmpConfig->showTimeInGrid));
Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50)); Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50));
Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20)); Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20));

View File

@@ -3,6 +3,8 @@
cTimeLine::cTimeLine(cTimeManager *timeManager) { cTimeLine::cTimeLine(cTimeManager *timeManager) {
this->timeManager = timeManager; this->timeManager = timeManager;
lastClock = "";
timeBase = NULL;
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0, dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
geoManager.statusHeaderHeight + geoManager.clockHeight, geoManager.statusHeaderHeight + geoManager.clockHeight,
@@ -15,11 +17,7 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
, cRect(0, , cRect(0,
0, 0,
geoManager.timeLineWidth, geoManager.timeLineWidth,
1440*geoManager.minutePixel)); 1440 * geoManager.minutePixel));
timeBase = osdManager.requestPixmap(3, cRect(0,
geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight,
geoManager.osdWidth,
geoManager.timeLineGridHeight));
} else if (config.displayMode == eHorizontal) { } else if (config.displayMode == eHorizontal) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth, dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
geoManager.statusHeaderHeight, geoManager.statusHeaderHeight,
@@ -31,35 +29,21 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
geoManager.timeLineHeight) geoManager.timeLineHeight)
, cRect(0, , cRect(0,
0, 0,
1440*geoManager.minutePixel, 1440 * geoManager.minutePixel,
geoManager.timeLineHeight)); geoManager.timeLineHeight));
timeBase = osdManager.requestPixmap(3, cRect(geoManager.channelGroupsWidth + geoManager.channelHeaderWidth,
geoManager.statusHeaderHeight,
geoManager.timeLineGridWidth,
geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight));
} }
timeBase->Fill(clrTransparent); clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(0,
int clockY; geoManager.statusHeaderHeight,
int clockX;
if (config.displayMode == eVertical) {
clockY = geoManager.statusHeaderHeight;
clockX = 0;
}
else {
clockY = geoManager.statusHeaderHeight;
clockX = 0;
}
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
clockY,
geoManager.clockWidth, geoManager.clockWidth,
geoManager.clockHeight))); geoManager.clockHeight)));
} }
cTimeLine::~cTimeLine(void) { cTimeLine::~cTimeLine(void) {
delete dateViewer;
osdManager.releasePixmap(timeline);
if (clock) if (clock)
delete clock; delete clock;
osdManager.releasePixmap(timeBase);
osdManager.releasePixmap(timeline);
delete dateViewer;
} }
void cTimeLine::drawDateViewer() { void cTimeLine::drawDateViewer() {
@@ -206,19 +190,30 @@ void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, in
} }
void cTimeLine::drawCurrentTimeBase(void) { void cTimeLine::drawCurrentTimeBase(void) {
timeBase->Fill(clrTransparent); if (!timeManager->NowVisible()) {
bool nowVisible = timeManager->NowVisible(); if (timeBase)
if (!nowVisible) timeBase->Fill(clrTransparent);
return; return;
int deltaTime = (timeManager->GetNow() - timeManager->GetStart()) / 60 * geoManager.minutePixel;
if (config.displayMode == eVertical) {
timeBase->DrawRectangle(cRect(0, deltaTime - 2, timeBase->ViewPort().Width(), 4), theme.Color(clrTimeBase));
} else {
timeBase->DrawRectangle(cRect(deltaTime-2, 0, 4, timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
} }
osdManager.releasePixmap(timeBase);
int deltaTime = (timeManager->GetNow() - timeManager->GetStart()) / 60 * geoManager.minutePixel;
int x1, x2, y1, y2;
if (config.displayMode == eVertical) {
x1 = 0;
y1 = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight + deltaTime - 2;
x2 = geoManager.osdWidth;
y2 = 4;
} else {
x1 = geoManager.channelGroupsWidth + geoManager.channelHeaderWidth + deltaTime - 2;
y1 = geoManager.statusHeaderHeight;
x2 = 4;
y2 = geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight;
}
timeBase = osdManager.requestPixmap(3, cRect(x1, y1, x2, y2));
timeBase->Fill(clrTransparent);
timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
} }
cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) { cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = NULL; cImage *image = NULL;
if (config.style == eStyleBlendingDefault) { if (config.style == eStyleBlendingDefault) {
@@ -263,20 +258,24 @@ void cTimeLine::setTimeline() {
drawCurrentTimeBase(); drawCurrentTimeBase();
} }
void cTimeLine::drawClock() { bool cTimeLine::drawClock() {
if (config.displayMode == eVertical)
clock->Fill(clrTransparent);
cString currentTime = timeManager->GetCurrentTime(); cString currentTime = timeManager->GetCurrentTime();
const cFont *font = (config.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal; if (strcmp(currentTime, lastClock)) {
int textHeight = font->Height(); clock->Fill(clrTransparent);
int clockTextWidth = font->Width(*currentTime); const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
tColor colorFontBack = (config.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent; int textHeight = font->Height();
if (config.style == eStyleGraphical) { int clockTextWidth = font->Width(*currentTime);
clock->drawBackgroundGraphical(bgClock); tColor colorFontBack = (config.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
} else { if (config.style == eStyleGraphical) {
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending)); clock->drawBackgroundGraphical(bgClock);
clock->drawBackground(); } else {
clock->drawBorder(); clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
clock->drawBackground();
clock->drawBorder();
}
clock->DrawText(cPoint((geoManager.clockWidth - clockTextWidth) / 2, (geoManager.clockHeight - textHeight) / 2), *currentTime, theme.Color(clrFont), colorFontBack, font);
lastClock = currentTime;
return true;
} }
clock->DrawText(cPoint((geoManager.clockWidth-clockTextWidth)/2, (geoManager.clockHeight-textHeight)/2), *currentTime, theme.Color(clrFont), colorFontBack, font); return false;
} }

View File

@@ -13,17 +13,18 @@ private:
cPixmap *timeline; cPixmap *timeline;
cStyledPixmap *clock; cStyledPixmap *clock;
cPixmap *timeBase; cPixmap *timeBase;
cString lastClock;
void decorateTile(int posX, int posY, int tileWidth, int tileHeight); void decorateTile(int posX, int posY, int tileWidth, int tileHeight);
void drawRoundedCorners(int posX, int posY, int width, int height, int radius); void drawRoundedCorners(int posX, int posY, int width, int height, int radius);
cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend); cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
void drawCurrentTimeBase(void);
public: public:
cTimeLine(cTimeManager *timeManager); cTimeLine(cTimeManager *timeManager);
virtual ~cTimeLine(void); virtual ~cTimeLine(void);
void setTimeline(); void setTimeline(void);
void drawDateViewer(); void drawDateViewer(void);
void drawTimeline(); void drawTimeline(void);
void drawClock(); void drawCurrentTimeBase(void);
bool drawClock();
}; };
#endif //__TVGUIDE_TIMELINE_H #endif //__TVGUIDE_TIMELINE_H

View File

@@ -27,7 +27,7 @@
#error "VDR-2.0.0 API version or greater is required!" #error "VDR-2.0.0 API version or greater is required!"
#endif #endif
static const char *VERSION = "1.2.11"; static const char *VERSION = "1.2.15";
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer"); static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
static const char *MAINMENUENTRY = "Tvguide"; static const char *MAINMENUENTRY = "Tvguide";

View File

@@ -195,7 +195,7 @@ void cTvGuideOsd::drawGridsChannelJump(int offset) {
} }
} }
void cTvGuideOsd::drawGridsTimeJump() { void cTvGuideOsd::drawGridsTimeJump(bool last) {
if (columns.Count() == 0) if (columns.Count() == 0)
return; return;
cChannelEpg *colActive = NULL; cChannelEpg *colActive = NULL;
@@ -209,7 +209,7 @@ void cTvGuideOsd::drawGridsTimeJump() {
column->readGrids(); column->readGrids();
column->drawGrids(); column->drawGrids();
} }
activeGrid = colActive->getActive(); activeGrid = colActive->getActive(last);
if (activeGrid) { if (activeGrid) {
activeGrid->SetActive(); activeGrid->SetActive();
activeGrid->Draw(); activeGrid->Draw();
@@ -352,7 +352,7 @@ void cTvGuideOsd::channelBack() {
void cTvGuideOsd::timeForward() { void cTvGuideOsd::timeForward() {
bool actionDone = false; bool actionDone = false;
if ( (timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) { if ((timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) {
ScrollForward(); ScrollForward();
actionDone = true; actionDone = true;
} }
@@ -372,19 +372,25 @@ void cTvGuideOsd::timeForward() {
void cTvGuideOsd::ScrollForward() { void cTvGuideOsd::ScrollForward() {
timeManager->AddStep(config.stepMinutes); timeManager->AddStep(config.stepMinutes);
timeLine->drawDateViewer(); if (config.useHWAccel) {
timeLine->drawClock(); drawGridsTimeJump(true);
timeLine->setTimeline(); timeLine->drawDateViewer();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { timeLine->drawClock();
column->AddNewGridsAtEnd(); timeLine->setTimeline();
column->ClearOutdatedStart(); } else {
column->drawGrids(); timeLine->drawDateViewer();
timeLine->setTimeline();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
column->AddNewGridsAtEnd();
column->ClearOutdatedStart();
column->drawGrids();
}
} }
} }
void cTvGuideOsd::timeBack() { void cTvGuideOsd::timeBack() {
bool actionDone = false; bool actionDone = false;
if ( (activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) { if ((activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) {
ScrollBack(); ScrollBack();
actionDone = true; actionDone = true;
} }
@@ -407,14 +413,20 @@ void cTvGuideOsd::ScrollBack() {
bool tooFarInPast = timeManager->DelStep(config.stepMinutes); bool tooFarInPast = timeManager->DelStep(config.stepMinutes);
if (tooFarInPast) if (tooFarInPast)
return; return;
timeLine->drawDateViewer(); if (config.useHWAccel) {
timeLine->drawClock(); drawGridsTimeJump();
timeLine->setTimeline(); timeLine->drawDateViewer();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { timeLine->drawClock();
column->AddNewGridsAtStart(); timeLine->setTimeline();
column->ClearOutdatedEnd(); } else {
column->drawGrids(); timeLine->drawDateViewer();
} timeLine->setTimeline();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
column->AddNewGridsAtStart();
column->ClearOutdatedEnd();
column->drawGrids();
}
}
} }
void cTvGuideOsd::processKeyUp() { void cTvGuideOsd::processKeyUp() {
@@ -776,6 +788,10 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
case kNone: if (channelJumper) CheckTimeout(); break; case kNone: if (channelJumper) CheckTimeout(); break;
default: break; default: break;
} }
if (timeLine->drawClock()) {
timeLine->drawCurrentTimeBase();
osdManager.flush();
}
} }
if (!alreadyUnlocked) { if (!alreadyUnlocked) {
cPixmap::Unlock(); cPixmap::Unlock();

View File

@@ -31,7 +31,7 @@ private:
void drawOsd(); void drawOsd();
void readChannels(const cChannel *channelStart); void readChannels(const cChannel *channelStart);
void drawGridsChannelJump(int offset = 0); void drawGridsChannelJump(int offset = 0);
void drawGridsTimeJump(); void drawGridsTimeJump(bool last = false);
void processKeyUp(); void processKeyUp();
void processKeyDown(); void processKeyDown();
void processKeyLeft(); void processKeyLeft();