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
4
config.c
4
config.c
@ -64,6 +64,7 @@ cTvguideConfig::cTvguideConfig() {
|
|||||||
favLimitChannels = 0;
|
favLimitChannels = 0;
|
||||||
favStartChannel = 0;
|
favStartChannel = 0;
|
||||||
favStopChannel = 0;
|
favStopChannel = 0;
|
||||||
|
switchMinsBefore = 2;
|
||||||
fontIndex = 0;
|
fontIndex = 0;
|
||||||
fontNameDefault = "VDRSymbols Sans:Book";
|
fontNameDefault = "VDRSymbols Sans:Book";
|
||||||
FontButtonDelta = 0;
|
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, "favLimitChannels") == 0) favLimitChannels = atoi(Value);
|
||||||
else if (strcmp(Name, "favStartChannel") == 0) favStartChannel = atoi(Value);
|
else if (strcmp(Name, "favStartChannel") == 0) favStartChannel = atoi(Value);
|
||||||
else if (strcmp(Name, "favStopChannel") == 0) favStopChannel = 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, "fontIndex") == 0) fontIndex = atoi(Value);
|
||||||
else if (strcmp(Name, "FontButtonDelta") == 0) FontButtonDelta = atoi(Value);
|
else if (strcmp(Name, "FontButtonDelta") == 0) FontButtonDelta = atoi(Value);
|
||||||
else if (strcmp(Name, "FontDetailViewDelta") == 0) FontDetailViewDelta = 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 if (strcmp(Name, "limitLogoCache") == 0) limitLogoCache = atoi(Value);
|
||||||
else return false;
|
else return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
3
config.h
3
config.h
@ -118,6 +118,7 @@ class cTvguideConfig {
|
|||||||
int favLimitChannels;
|
int favLimitChannels;
|
||||||
int favStartChannel;
|
int favStartChannel;
|
||||||
int favStopChannel;
|
int favStopChannel;
|
||||||
|
int switchMinsBefore;
|
||||||
int fontIndex;
|
int fontIndex;
|
||||||
const char *fontNameDefault;
|
const char *fontNameDefault;
|
||||||
int FontButtonDelta;
|
int FontButtonDelta;
|
||||||
@ -252,4 +253,4 @@ THEME_CLR(theme, clrRecMenuTimelineBack, 0xFF828282);
|
|||||||
THEME_CLR(theme, clrRecMenuTimelineActive, 0xFF3F3F3F);
|
THEME_CLR(theme, clrRecMenuTimelineActive, 0xFF3F3F3F);
|
||||||
THEME_CLR(theme, clrRecMenuTimelineConflict, 0x30FF0000);
|
THEME_CLR(theme, clrRecMenuTimelineConflict, 0x30FF0000);
|
||||||
THEME_CLR(theme, clrRecMenuTimelineConflictOverlap, 0x90FF0000);
|
THEME_CLR(theme, clrRecMenuTimelineConflictOverlap, 0x90FF0000);
|
||||||
#endif //__TVGUIDE_CONFIG_H
|
#endif //__TVGUIDE_CONFIG_H
|
||||||
|
@ -1109,7 +1109,7 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
|
|||||||
|
|
||||||
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
||||||
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
||||||
switchMinsBefore = 2;
|
switchMinsBefore = tvguideConfig.switchMinsBefore;
|
||||||
announceOnly = 0;
|
announceOnly = 0;
|
||||||
|
|
||||||
SetWidthPercent(60);
|
SetWidthPercent(60);
|
||||||
|
2
setup.c
2
setup.c
@ -121,6 +121,7 @@ void cTvguideSetup::Store(void) {
|
|||||||
SetupStore("favLimitChannels", tvguideConfig.favLimitChannels);
|
SetupStore("favLimitChannels", tvguideConfig.favLimitChannels);
|
||||||
SetupStore("favStartChannel", tvguideConfig.favStartChannel);
|
SetupStore("favStartChannel", tvguideConfig.favStartChannel);
|
||||||
SetupStore("favStopChannel", tvguideConfig.favStopChannel);
|
SetupStore("favStopChannel", tvguideConfig.favStopChannel);
|
||||||
|
SetupStore("switchMinsBefore", tvguideConfig.switchMinsBefore);
|
||||||
SetupStore("fontIndex", tvguideConfig.fontIndex);
|
SetupStore("fontIndex", tvguideConfig.fontIndex);
|
||||||
SetupStore("FontButtonDelta", tvguideConfig.FontButtonDelta);
|
SetupStore("FontButtonDelta", tvguideConfig.FontButtonDelta);
|
||||||
SetupStore("FontDetailViewDelta", tvguideConfig.FontDetailViewDelta);
|
SetupStore("FontDetailViewDelta", tvguideConfig.FontDetailViewDelta);
|
||||||
@ -419,6 +420,7 @@ void cMenuSetupFavorites::Set(void) {
|
|||||||
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel));
|
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel));
|
||||||
Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpTvguideConfig->favStopChannel));
|
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));
|
SetCurrent(Get(currentItem));
|
||||||
|
@ -6,14 +6,14 @@ cSwitchTimers SwitchTimers;
|
|||||||
cSwitchTimer::cSwitchTimer(void) {
|
cSwitchTimer::cSwitchTimer(void) {
|
||||||
eventID = 0;
|
eventID = 0;
|
||||||
startTime = 0;
|
startTime = 0;
|
||||||
switchMinsBefore = 2;
|
switchMinsBefore = tvguideConfig.switchMinsBefore;
|
||||||
announceOnly = 0;
|
announceOnly = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cSwitchTimer::cSwitchTimer(const cEvent* Event) {
|
cSwitchTimer::cSwitchTimer(const cEvent* Event) {
|
||||||
eventID = 0;
|
eventID = 0;
|
||||||
startTime = 0;
|
startTime = 0;
|
||||||
switchMinsBefore = 2;
|
switchMinsBefore = tvguideConfig.switchMinsBefore;
|
||||||
announceOnly = 0;
|
announceOnly = 0;
|
||||||
if (Event) {
|
if (Event) {
|
||||||
eventID = Event->EventID();
|
eventID = Event->EventID();
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define __TVGUIDE_SWITCHTIMER_H
|
#define __TVGUIDE_SWITCHTIMER_H
|
||||||
|
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
class cSwitchTimer : public cListObject {
|
class cSwitchTimer : public cListObject {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user