Separate "displayTime" for horizontal and vertical view

This commit is contained in:
kamel5 2020-01-09 14:06:59 +01:00
parent 3fee6ab13f
commit 15b7074b4e
4 changed files with 21 additions and 8 deletions

View File

@ -10,8 +10,8 @@ cTVGuideConfig::cTVGuideConfig() {
showTimeInGrid = 1; showTimeInGrid = 1;
channelCols = 5; channelCols = 5;
channelRows = 10; channelRows = 10;
displayTime = 160; displayTime = 180;
displayHorizontalTime = 160; displayHorizontalTime = 180;
displayStatusHeader = 1; displayStatusHeader = 1;
displayChannelGroups = 1; displayChannelGroups = 1;
displayTimeBase = 1; displayTimeBase = 1;
@ -28,7 +28,9 @@ cTVGuideConfig::cTVGuideConfig() {
footerHeightPercent = 7; footerHeightPercent = 7;
stepMinutes = 30; stepMinutes = 30;
bigStepHours = 3; bigStepHours = 3;
bigStepHoursHorizontal = 3;
hugeStepHours = 24; hugeStepHours = 24;
hugeStepHoursHorizontal = 24;
channelJumpMode = eNumJump; channelJumpMode = eNumJump;
jumpChannels = 0; jumpChannels = 0;
blueKeyMode = 2; blueKeyMode = 2;
@ -269,7 +271,9 @@ bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value); else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);
else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value); else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value);
else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value); else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value);
else if (strcmp(Name, "bigStepHoursHorizontal") == 0) bigStepHoursHorizontal = atoi(Value);
else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value); else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value);
else if (strcmp(Name, "hugeStepHoursHorizontal") == 0) hugeStepHoursHorizontal = atoi(Value);
else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value); else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value);
else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value); else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value);
else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value); else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value);

View File

@ -76,7 +76,9 @@ class cTVGuideConfig {
int footerHeightPercent; int footerHeightPercent;
int stepMinutes; int stepMinutes;
int bigStepHours; int bigStepHours;
int bigStepHoursHorizontal;
int hugeStepHours; int hugeStepHours;
int hugeStepHoursHorizontal;
int channelJumpMode; int channelJumpMode;
int jumpChannels; int jumpChannels;
int blueKeyMode; int blueKeyMode;

View File

@ -80,7 +80,9 @@ void cTvguideSetup::Store(void) {
SetupStore("displayTime", config.displayTime); SetupStore("displayTime", config.displayTime);
SetupStore("displayHorizontalTime", config.displayHorizontalTime); SetupStore("displayHorizontalTime", config.displayHorizontalTime);
SetupStore("bigStepHours", config.bigStepHours); SetupStore("bigStepHours", config.bigStepHours);
SetupStore("bigStepHoursHorizontal", config.bigStepHoursHorizontal);
SetupStore("hugeStepHours", config.hugeStepHours); SetupStore("hugeStepHours", config.hugeStepHours);
SetupStore("hugeStepHoursHorizontal", config.hugeStepHoursHorizontal);
SetupStore("channelJumpMode", config.channelJumpMode); SetupStore("channelJumpMode", config.channelJumpMode);
SetupStore("blueKeyMode", config.blueKeyMode); SetupStore("blueKeyMode", config.blueKeyMode);
SetupStore("numkeyMode", config.numkeyMode); SetupStore("numkeyMode", config.numkeyMode);
@ -224,8 +226,13 @@ void cMenuSetupGeneral::Set(void) {
Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpConfig->closeOnSwitch)); Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpConfig->closeOnSwitch));
Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpConfig->numkeyMode, 2, numMode)); Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpConfig->numkeyMode, 2, numMode));
Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpConfig->hideLastGroup)); Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpConfig->hideLastGroup));
if (tmpConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHours, 1, 12)); Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHours, 1, 12));
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48)); Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48));
} else if (tmpConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHoursHorizontal, 1, 12));
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHoursHorizontal, 13, 48));
}
Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpConfig->timeFormat, 2, timeFormatItems)); Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpConfig->timeFormat, 2, timeFormatItems));
Add(new cMenuEditIntItem(tr("EPG Window Text Scrolling Speed"), &tmpConfig->detailedViewScrollStep, 1, 30)); Add(new cMenuEditIntItem(tr("EPG Window Text Scrolling Speed"), &tmpConfig->detailedViewScrollStep, 1, 30));
Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpConfig->displayRerunsDetailEPGView)); Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpConfig->displayRerunsDetailEPGView));

View File

@ -638,19 +638,19 @@ void cTvGuideOsd::processNumKey(int numKey) {
void cTvGuideOsd::TimeJump(int mode) { void cTvGuideOsd::TimeJump(int mode) {
switch (mode) { switch (mode) {
case 1: { case 1: {
timeManager->DelStep(config.bigStepHours * 60); timeManager->DelStep(((config.displayMode == eVertical) ? config.bigStepHours : config.bigStepHoursHorizontal) * 60);
} }
break; break;
case 3: { case 3: {
timeManager->AddStep(config.bigStepHours * 60); timeManager->AddStep(((config.displayMode == eVertical) ? config.bigStepHours : config.bigStepHoursHorizontal) * 60);
} }
break; break;
case 4: { case 4: {
timeManager->DelStep(config.hugeStepHours * 60); timeManager->DelStep(((config.displayMode == eVertical) ? config.hugeStepHours : config.hugeStepHoursHorizontal) * 60);
} }
break; break;
case 6: { case 6: {
timeManager->AddStep(config.hugeStepHours * 60); timeManager->AddStep(((config.displayMode == eVertical) ? config.hugeStepHours : config.hugeStepHoursHorizontal) * 60);
} }
break; break;
case 7: { case 7: {