summaryrefslogtreecommitdiff
path: root/setup.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2009-01-03 18:57:48 +0100
committerJochen Dolze <vdr@dolze.de>2009-01-03 18:57:48 +0100
commitfc926f81da5ac3d0a310a7fc8c960aee2b04c9bb (patch)
tree47723c32f55ed6d3717c118a8e6a9dd9e4b16da6 /setup.cpp
parentc0be4f653bd22b9ea3878a805ea97429a6a6d9f9 (diff)
downloadvdr-plugin-infosatepg-fc926f81da5ac3d0a310a7fc8c960aee2b04c9bb.tar.gz
vdr-plugin-infosatepg-fc926f81da5ac3d0a310a7fc8c960aee2b04c9bb.tar.bz2
Changed wakeup (now set automatically)
Changed setup Changed device chooser Bugfixed segfault with obsolete channels
Diffstat (limited to 'setup.cpp')
-rw-r--r--setup.cpp33
1 files changed, 21 insertions, 12 deletions
diff --git a/setup.cpp b/setup.cpp
index 85521f5..1ab13d9 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -16,7 +16,6 @@ cMenuSetupInfosatepg::cMenuSetupInfosatepg(cGlobalInfosatepg *Global)
newChannel = global->Channel;
newPid = global->Pid;
newWaitTime = global->WaitTime;
- newWakeupTime = global->WakeupTime;
newEventTimeDiff=(int) (global->EventTimeDiff/60);
Add(NewTitle(tr("Scan parameter")));
@@ -28,9 +27,6 @@ cMenuSetupInfosatepg::cMenuSetupInfosatepg(cGlobalInfosatepg *Global)
Add(new cMenuEditIntItem( tr("Time difference [min]"), &newEventTimeDiff,
MIN_EVENTTIMEDIFF,MAX_EVENTTIMEDIFF));
- Add(NewTitle(tr("Wakeup options")));
- Add(new cMenuEditTimeItem(tr("Wakeup time"),&newWakeupTime));
-
if (global->InfosatChannels())
{
Add(NewTitle(tr("Infosat channels")),true);
@@ -66,26 +62,30 @@ void cMenuSetupInfosatepg::Store(void)
SetupStore("Pid", global->Pid = newPid);
SetupStore("WaitTime", global->WaitTime = newWaitTime);
SetupStore("EventTimeDiff", newEventTimeDiff);
- SetupStore("WakeupTime",global->WakeupTime = newWakeupTime);
global->EventTimeDiff = 60*newEventTimeDiff;
- if (bReprocess) global->ResetProcessedFlags();
+ if (bReprocess)
+ {
+ dsyslog("infosatepg: reprocess files (later)");
+ global->ResetProcessed();
+ }
}
eOSState cMenuSetupInfosatepg::Edit()
{
if (HasSubMenu() || Count()==0)
- return osBack;
+ return osUnknown;
+
if (Current()>=chanCurrent)
{
int chanIndex=Current()-chanCurrent;
if (chanIndex<global->InfosatChannels())
return AddSubMenu(new cMenuSetupChannelMenu(global,chanIndex));
else
- return osBack;
+ return osUnknown;
}
else
- return osBack;
+ return osUnknown;
}
eOSState cMenuSetupInfosatepg::ProcessKey(eKeys Key)
@@ -100,8 +100,12 @@ eOSState cMenuSetupInfosatepg::ProcessKey(eKeys Key)
switch (Key)
{
case kOk:
- state=Edit();
- if (state==osBack) Store();
+ state=Edit();
+ if (state==osUnknown)
+ {
+ Store();
+ state=osBack;
+ }
break;
default:
break;
@@ -128,6 +132,7 @@ cMenuSetupChannelMenu::cMenuSetupChannelMenu(cGlobalInfosatepg *Global, int Inde
if (newChannelUse<0) newChannelUse=USE_NOTHING; // to be safe!
channel = Channels.GetByChannelID(global->GetChannelID(index));
+ if (!channel) return;
char *str;
asprintf(&str,"---- %s ----", channel->Name());
@@ -151,5 +156,9 @@ void cMenuSetupChannelMenu::Store(void)
if (global->SetChannelUse(index,newChannelUse)) bReprocess=true;
SetupStore(name,newChannelUse);
free(name);
- if (bReprocess) global->ResetProcessedFlags();
+ if (bReprocess)
+ {
+ dsyslog("infosatepg: reprocess files (later)");
+ global->ResetProcessed();
+ }
}