Add "switchMinsBefore" to setup menu

This commit is contained in:
kamel5 2019-03-22 13:52:26 +01:00
parent f7e5ac3208
commit ff599e4cda
6 changed files with 11 additions and 5 deletions

View File

@ -64,6 +64,7 @@ cTvguideConfig::cTvguideConfig() {
favLimitChannels = 0;
favStartChannel = 0;
favStopChannel = 0;
switchMinsBefore = 2;
fontIndex = 0;
fontNameDefault = "VDRSymbols Sans:Book";
FontButtonDelta = 0;
@ -299,6 +300,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "favLimitChannels") == 0) favLimitChannels = atoi(Value);
else if (strcmp(Name, "favStartChannel") == 0) favStartChannel = atoi(Value);
else if (strcmp(Name, "favStopChannel") == 0) favStopChannel = atoi(Value);
else if (strcmp(Name, "switchMinsBefore") == 0) switchMinsBefore = atoi(Value);
else if (strcmp(Name, "fontIndex") == 0) fontIndex = atoi(Value);
else if (strcmp(Name, "FontButtonDelta") == 0) FontButtonDelta = atoi(Value);
else if (strcmp(Name, "FontDetailViewDelta") == 0) FontDetailViewDelta = atoi(Value);
@ -331,4 +333,4 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "limitLogoCache") == 0) limitLogoCache = atoi(Value);
else return false;
return true;
}
}

View File

@ -118,6 +118,7 @@ class cTvguideConfig {
int favLimitChannels;
int favStartChannel;
int favStopChannel;
int switchMinsBefore;
int fontIndex;
const char *fontNameDefault;
int FontButtonDelta;
@ -252,4 +253,4 @@ THEME_CLR(theme, clrRecMenuTimelineBack, 0xFF828282);
THEME_CLR(theme, clrRecMenuTimelineActive, 0xFF3F3F3F);
THEME_CLR(theme, clrRecMenuTimelineConflict, 0x30FF0000);
THEME_CLR(theme, clrRecMenuTimelineConflictOverlap, 0x90FF0000);
#endif //__TVGUIDE_CONFIG_H
#endif //__TVGUIDE_CONFIG_H

View File

@ -1109,7 +1109,7 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
// --- cRecMenuSwitchTimer ---------------------------------------------------------
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
switchMinsBefore = 2;
switchMinsBefore = tvguideConfig.switchMinsBefore;
announceOnly = 0;
SetWidthPercent(60);

View File

@ -121,6 +121,7 @@ void cTvguideSetup::Store(void) {
SetupStore("favLimitChannels", tvguideConfig.favLimitChannels);
SetupStore("favStartChannel", tvguideConfig.favStartChannel);
SetupStore("favStopChannel", tvguideConfig.favStopChannel);
SetupStore("switchMinsBefore", tvguideConfig.switchMinsBefore);
SetupStore("fontIndex", tvguideConfig.fontIndex);
SetupStore("FontButtonDelta", tvguideConfig.FontButtonDelta);
SetupStore("FontDetailViewDelta", tvguideConfig.FontDetailViewDelta);
@ -419,6 +420,7 @@ void cMenuSetupFavorites::Set(void) {
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel));
Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpTvguideConfig->favStopChannel));
}
Add(new cMenuEditIntItem(tr("Minutes a switchtimer switches before start of a show"), &tmpTvguideConfig->switchMinsBefore, 0, 10));
SetCurrent(Get(currentItem));

View File

@ -6,14 +6,14 @@ cSwitchTimers SwitchTimers;
cSwitchTimer::cSwitchTimer(void) {
eventID = 0;
startTime = 0;
switchMinsBefore = 2;
switchMinsBefore = tvguideConfig.switchMinsBefore;
announceOnly = 0;
}
cSwitchTimer::cSwitchTimer(const cEvent* Event) {
eventID = 0;
startTime = 0;
switchMinsBefore = 2;
switchMinsBefore = tvguideConfig.switchMinsBefore;
announceOnly = 0;
if (Event) {
eventID = Event->EventID();

View File

@ -2,6 +2,7 @@
#define __TVGUIDE_SWITCHTIMER_H
#include <vdr/plugin.h>
#include "config.h"
class cSwitchTimer : public cListObject {
public: