diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-02-08 23:30:36 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-02-08 23:30:36 +0100 |
commit | e8c8bbc93ceec475299bb706a12e4fe67dcb0efa (patch) | |
tree | 0a19ed1139ba639f8621a7cfd0632e594471fe71 | |
parent | d20403bc5ade47dea4241291f07b1b18910373e0 (diff) | |
download | vdr-plugin-infosatepg-e8c8bbc93ceec475299bb706a12e4fe67dcb0efa.tar.gz vdr-plugin-infosatepg-e8c8bbc93ceec475299bb706a12e4fe67dcb0efa.tar.bz2 |
Fixed bug reading setup parameters
Added NoDeferredShutdown option
-rw-r--r-- | global.cpp | 1 | ||||
-rw-r--r-- | global.h | 1 | ||||
-rw-r--r-- | infosatepg.cpp | 7 | ||||
-rw-r--r-- | po/de_DE.po | 11 | ||||
-rw-r--r-- | po/it_IT.po | 5 | ||||
-rw-r--r-- | process.cpp | 4 | ||||
-rw-r--r-- | setup.cpp | 40 | ||||
-rw-r--r-- | setup.h | 2 |
8 files changed, 65 insertions, 6 deletions
@@ -148,6 +148,7 @@ cGlobalInfosatepg::cGlobalInfosatepg() SetDirectory ("/tmp"); ProcessedAll=false; NoWakeup=false; + NoDeferredShutdown=false; } cGlobalInfosatepg::~cGlobalInfosatepg() @@ -134,6 +134,7 @@ public: isyslog("infosatepg: wakeup set to %02i:%02i", hour,minute); } bool NoWakeup; + bool NoDeferredShutdown; int WakeupTime() { return wakeuptime; diff --git a/infosatepg.cpp b/infosatepg.cpp index 4cb1811..7fc3cff 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -208,6 +208,8 @@ cString cPluginInfosatepg::Active(void) { // Returns a message string if we are not ready + if (global->NoDeferredShutdown) return NULL; + // if we cannot receive, we shouldn't wait if (global->Channel()==-1) return NULL; @@ -263,6 +265,11 @@ bool cPluginInfosatepg::SetupParse(const char *Name, const char *Value) { // Parse your own setup parameters and store their values. if (!strcasecmp(Name,"Pid")) global->Pid=atoi(Value); + else if (!strcasecmp(Name,"Frequency")) global->Frequency=atoi(Value); + else if (!strcasecmp(Name,"Polarization")) global->Polarization=atoi(Value); + else if (!strcasecmp(Name,"Srate")) global->Srate=atoi(Value); + else if (!strcasecmp(Name,"NoWakeup")) global->NoWakeup=atoi(Value); + else if (!strcasecmp(Name,"NoDeferredShutdown")) global->NoDeferredShutdown=atoi(Value); else if (!strcasecmp(Name,"WaitTime")) global->WaitTime=atoi(Value); else if (!strcasecmp(Name,"EventTimeDiff")) global->EventTimeDiff=60*atoi(Value); else if (!strncasecmp(Name,"Channel",7)) diff --git a/po/de_DE.po b/po/de_DE.po index d93d283..b315f23 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-1.6.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2009-02-08 00:59+0100\n" +"POT-Creation-Date: 2009-02-08 23:25+0100\n" "PO-Revision-Date: 2008-05-02 16:20+0200\n" "Last-Translator: Jochen Dolze <infosatepg@dolze.de>\n" "Language-Team: <vdr@linuxtv.org>\n" @@ -309,6 +309,9 @@ msgstr "Sonstige Optionen" msgid "Prevent wakeup" msgstr "Verhindere autom. aufwachen" +msgid "Prevent deferred shutdown" +msgstr "Verhindere verzögertes abschalten" + msgid "Infosat channels" msgstr "Infosat Kanäle" @@ -335,3 +338,9 @@ msgstr "Erstelle neue Ereignisse" msgid "Read EPG info from infosat" msgstr "Liest EPG infos von Infosat" + +#~ msgid "Button$Reset" +#~ msgstr "Reset" + +#~ msgid "Button$Default" +#~ msgstr "Default" diff --git a/po/it_IT.po b/po/it_IT.po index 84282ca..7c01b4e 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-1.6.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2009-02-08 00:59+0100\n" +"POT-Creation-Date: 2009-02-08 23:25+0100\n" "PO-Revision-Date: 2008-12-24 19:16+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: <vdr@linuxtv.org>\n" @@ -311,6 +311,9 @@ msgstr "Opzioni generali" msgid "Prevent wakeup" msgstr "" +msgid "Prevent deferred shutdown" +msgstr "" + msgid "Infosat channels" msgstr "Canali Infosat" diff --git a/process.cpp b/process.cpp index eb3023f..cc98cc8 100644 --- a/process.cpp +++ b/process.cpp @@ -612,11 +612,7 @@ const char *cInfosatevent::ExtEPG(void) // --- cProcessInfosatepg cProcessInfosatepg::cProcessInfosatepg(int Mac, cGlobalInfosatepg *Global) -//void cProcessInfosatepg::Action() //int Mac, cGlobalInfosatepg *Global) { -// int Mac=0; -// cGlobalInfosatepg *Global=NULL; - global=Global; FILE *f; const char *file = global->Infosatdata[Mac].GetFile(); @@ -20,6 +20,7 @@ cMenuSetupInfosatepg::cMenuSetupInfosatepg (cGlobalInfosatepg *Global) newWaitTime = global->WaitTime; newEventTimeDiff= (int) (global->EventTimeDiff/60); newNoWakeup=global->NoWakeup; + newNoDeferredShutdown=global->NoDeferredShutdown; Add (NewTitle (tr ("Scan parameter"))); cString buffer = cString::sprintf("%s:\t%s",tr("Source"), "S19.2E"); // just for info @@ -48,6 +49,7 @@ cMenuSetupInfosatepg::cMenuSetupInfosatepg (cGlobalInfosatepg *Global) Add (NewTitle (tr ("General options"))); Add (new cMenuEditBoolItem(tr("Prevent wakeup"),&newNoWakeup)); + Add (new cMenuEditBoolItem(tr("Prevent deferred shutdown"),&newNoDeferredShutdown)); if (global->InfosatChannels()) { @@ -64,6 +66,7 @@ cMenuSetupInfosatepg::cMenuSetupInfosatepg (cGlobalInfosatepg *Global) Add (new cOsdItem (buffer)); } } + //SetHelp(tr("Button$Reset")); } cOsdItem *cMenuSetupInfosatepg::NewTitle (const char *s) @@ -93,6 +96,7 @@ void cMenuSetupInfosatepg::Store (void) SetupStore ("WaitTime", global->WaitTime = newWaitTime); SetupStore ("EventTimeDiff", newEventTimeDiff); SetupStore ("NoWakeup",global->NoWakeup=newNoWakeup); + SetupStore ("NoDeferredShutdown",global->NoDeferredShutdown=newNoDeferredShutdown); global->EventTimeDiff = 60*newEventTimeDiff; @@ -138,11 +142,17 @@ eOSState cMenuSetupInfosatepg::ProcessKey (eKeys Key) switch (state) { + default: if (state==osUnknown) { switch (Key) { + case kRed: + //dsyslog("Red1 key pressed"); + state=osContinue; + break; + case kOk: state=Edit(); if (state==osUnknown) @@ -173,6 +183,8 @@ cMenuSetupChannelMenu::cMenuSetupChannelMenu (cGlobalInfosatepg *Global, int Ind channel = Channels.GetByChannelID (global->GetChannelID (index)); if (!channel) return; + //SetHelp(NULL,tr("Button$Default")); + cString buffer = cString::sprintf("---- %s ----", channel->Name()); Add (new cOsdItem (buffer,osUnknown,false)); @@ -203,3 +215,31 @@ void cMenuSetupChannelMenu::Store (void) global->ResetProcessed(); } } + +eOSState cMenuSetupChannelMenu::ProcessKey (eKeys Key) +{ + eOSState state = cOsdMenu::ProcessKey (Key); + + switch (state) + { + + default: + if (state==osUnknown) + { + switch (Key) + { + case kRed: + state=osContinue; + break; + case kGreen: + //dsyslog("Green1 key pressed"); + state=osContinue; + break; + + default: + break; + } + } + } + return state; +} @@ -26,6 +26,7 @@ private: int newSrate; int newPid; int newNoWakeup; + int newNoDeferredShutdown; int chanCurrent; protected: virtual void Store(void); @@ -49,6 +50,7 @@ protected: virtual void Store(void); public: cMenuSetupChannelMenu(cGlobalInfosatepg *Global, int Index); + virtual eOSState ProcessKey(eKeys Key); }; #endif |