mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Add "switchMinsBefore" to setup menu
This commit is contained in:
parent
f7e5ac3208
commit
ff599e4cda
2
config.c
2
config.c
@ -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);
|
||||
|
1
config.h
1
config.h
@ -118,6 +118,7 @@ class cTvguideConfig {
|
||||
int favLimitChannels;
|
||||
int favStartChannel;
|
||||
int favStopChannel;
|
||||
int switchMinsBefore;
|
||||
int fontIndex;
|
||||
const char *fontNameDefault;
|
||||
int FontButtonDelta;
|
||||
|
@ -1109,7 +1109,7 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
|
||||
|
||||
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
||||
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
||||
switchMinsBefore = 2;
|
||||
switchMinsBefore = tvguideConfig.switchMinsBefore;
|
||||
announceOnly = 0;
|
||||
|
||||
SetWidthPercent(60);
|
||||
|
2
setup.c
2
setup.c
@ -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));
|
||||
|
@ -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();
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define __TVGUIDE_SWITCHTIMER_H
|
||||
|
||||
#include <vdr/plugin.h>
|
||||
#include "config.h"
|
||||
|
||||
class cSwitchTimer : public cListObject {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user