Setup option to hide schedules time display in horizontal EPG grids

This commit is contained in:
louis 2013-06-01 11:18:43 +02:00
parent 10c1a1d8ce
commit da28930318
6 changed files with 17 additions and 3 deletions

View File

@ -41,3 +41,4 @@ VDR Plugin 'tvguide' Revision History
- Eliminated setup option "Number of channels to jump", directly jump - Eliminated setup option "Number of channels to jump", directly jump
number of channel columns / rows with green / yellow number of channel columns / rows with green / yellow
- Added setup option to switch functionality of keys "Blue" and "OK" - Added setup option to switch functionality of keys "Blue" and "OK"
- Setup option to hide schedules time display in horizontal EPG grids

View File

@ -20,6 +20,7 @@ cTvguideConfig::cTvguideConfig() {
osdWidth = 0; osdWidth = 0;
osdHeight = 0; osdHeight = 0;
displayMode = eHorizontal; displayMode = eHorizontal;
showTimeInGrid = 1;
colWidth = 0; colWidth = 0;
rowHeight = 0; rowHeight = 0;
channelCols = 5; channelCols = 5;
@ -238,6 +239,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value); else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);
else if (strcmp(Name, "themeIndex") == 0) themeIndex = atoi(Value); else if (strcmp(Name, "themeIndex") == 0) themeIndex = atoi(Value);
else if (strcmp(Name, "displayMode") == 0) displayMode = atoi(Value); else if (strcmp(Name, "displayMode") == 0) displayMode = atoi(Value);
else if (strcmp(Name, "showTimeInGrid") == 0) showTimeInGrid = atoi(Value);
else if (strcmp(Name, "displayStatusHeader") == 0) displayStatusHeader = atoi(Value); else if (strcmp(Name, "displayStatusHeader") == 0) displayStatusHeader = atoi(Value);
else if (strcmp(Name, "displayChannelGroups") == 0) displayChannelGroups = atoi(Value); else if (strcmp(Name, "displayChannelGroups") == 0) displayChannelGroups = atoi(Value);
else if (strcmp(Name, "statusHeaderPercent") == 0) statusHeaderPercent = atoi(Value); else if (strcmp(Name, "statusHeaderPercent") == 0) statusHeaderPercent = atoi(Value);

View File

@ -15,6 +15,7 @@ class cTvguideConfig {
int osdWidth; int osdWidth;
int osdHeight; int osdHeight;
int displayMode; int displayMode;
int showTimeInGrid;
int colWidth; int colWidth;
int rowHeight; int rowHeight;
int channelCols; int channelCols;

View File

@ -97,9 +97,14 @@ void cEpgGrid::drawText() {
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, tvguideConfig.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, tvguideConfig.FontGridHorizontal);
return; return;
} }
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, tvguideConfig.FontGridHorizontalSmall);
cString strTitle = CutText(event->Title(), viewportHeight, tvguideConfig.FontGridHorizontal).c_str(); cString strTitle = CutText(event->Title(), viewportHeight, tvguideConfig.FontGridHorizontal).c_str();
int titleY = tvguideConfig.FontGridHorizontalSmall->Height() + (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontalSmall->Height() - tvguideConfig.FontGridHorizontal->Height())/2; int titleY = 0;
if (tvguideConfig.showTimeInGrid) {
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, tvguideConfig.FontGridHorizontalSmall);
titleY = tvguideConfig.FontGridHorizontalSmall->Height() + (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontalSmall->Height() - tvguideConfig.FontGridHorizontal->Height())/2;
} else {
titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
}
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, tvguideConfig.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, tvguideConfig.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: 2013-06-01 11:02+0200\n" "POT-Creation-Date: 2013-06-01 11:12+0200\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"
@ -123,6 +123,9 @@ msgstr "Breite des Kanalheaders (% der OSD Breite)"
msgid "Height of Timeline (Perc. of osd height)" msgid "Height of Timeline (Perc. of osd height)"
msgstr "Höhe der Zeitleiste (% der OSD Höhe)" msgstr "Höhe der Zeitleiste (% der OSD Höhe)"
msgid "Display time in EPG Grids"
msgstr "Zeit in EPG Grids anzeigen"
msgid "Height of Footer" msgid "Height of Footer"
msgstr "Höhe des Footers" msgstr "Höhe des Footers"

View File

@ -48,6 +48,7 @@ void cTvguideSetup::Store(void) {
SetupStore("themeIndex", tvguideConfig.themeIndex); SetupStore("themeIndex", tvguideConfig.themeIndex);
SetupStore("showMainMenuEntry", tvguideConfig.showMainMenuEntry); SetupStore("showMainMenuEntry", tvguideConfig.showMainMenuEntry);
SetupStore("displayMode", tvguideConfig.displayMode); SetupStore("displayMode", tvguideConfig.displayMode);
SetupStore("showTimeInGrid", tvguideConfig.showTimeInGrid);
SetupStore("displayStatusHeader", tvguideConfig.displayStatusHeader); SetupStore("displayStatusHeader", tvguideConfig.displayStatusHeader);
SetupStore("displayChannelGroups", tvguideConfig.displayChannelGroups); SetupStore("displayChannelGroups", tvguideConfig.displayChannelGroups);
SetupStore("statusHeaderPercent", tvguideConfig.statusHeaderPercent); SetupStore("statusHeaderPercent", tvguideConfig.statusHeaderPercent);
@ -206,6 +207,7 @@ void cMenuSetupScreenLayout::Set(void) {
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpTvguideConfig->channelHeaderWidthPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpTvguideConfig->channelHeaderWidthPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", indent, tr("Height of Timeline (Perc. of osd height)")), &tmpTvguideConfig->timeLineHeightPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", indent, tr("Height of Timeline (Perc. of osd height)")), &tmpTvguideConfig->timeLineHeightPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", indent, tr("Number of Channels to display")), &tmpTvguideConfig->channelRows, 3, 12)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", indent, tr("Number of Channels to display")), &tmpTvguideConfig->channelRows, 3, 12));
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", indent, tr("Display time in EPG Grids")), &tmpTvguideConfig->showTimeInGrid));
} }
Add(new cMenuEditIntItem(tr("Height of Footer"), &tmpTvguideConfig->footerHeight, 50, 300)); Add(new cMenuEditIntItem(tr("Height of Footer"), &tmpTvguideConfig->footerHeight, 50, 300));