diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | po/de_DE.po | 63 | ||||
-rw-r--r-- | po/it_IT.po | 78 | ||||
-rw-r--r-- | setup.c | 211 | ||||
-rw-r--r-- | setup.h | 9 | ||||
-rw-r--r-- | targavfd.c | 4 | ||||
-rw-r--r-- | watch.c | 20 | ||||
-rw-r--r-- | watch.h | 2 |
8 files changed, 174 insertions, 215 deletions
@@ -1,6 +1,8 @@ VDR Plugin 'targavfd' Revision History ------------------------------------- +2017-x-x: Version 0.3.1 +- Add exception for nightly suspend for icons (Request #2459) - Update plugin interface for vdr 2.3.2 (Request #2463) 2014-06-14: Version 0.3.0 diff --git a/po/de_DE.po b/po/de_DE.po index ab391bb..147d214 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -2,12 +2,12 @@ # Copyright (C) Andreas Brachold <vdr07 AT deltab de> # This file is distributed under the same license as the PACKAGE package. # -# Andreas Brachold <vdr07 AT deltab de> 2010 - 2013. +# Andreas Brachold <vdr07 AT deltab de> 2010 - 2017. msgid "" msgstr "" -"Project-Id-Version: vdr-targavfd-plugin 0.3.0\n" +"Project-Id-Version: vdr-targavfd-plugin 0.3.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-11-02 18:11+0100\n" +"POT-Creation-Date: 2017-01-28 17:43+0100\n" "PO-Revision-Date: 2010-07-02 21:25+0200\n" "Last-Translator: Andreas Brachold <vdr07 AT deltab de>\n" "Language-Team: Andreas Brachold <vdr07 AT deltab de>\n" @@ -55,26 +55,32 @@ msgstr "Höhe des großen Zeichensatzes" msgid "Height of small font" msgstr "Höhe des kleinen Zeichensatzes" -msgid "Do nothing" -msgstr "Nichts unternehmen" +msgid "Never" +msgstr "Nie" -msgid "Showing clock" -msgstr "Uhrzeit anzeigen" +msgid "Only per time" +msgstr "Gemäß der Zeit" -msgid "Turning display off" -msgstr "Abschalten der Anzeige" +msgid "Suspend display at night" +msgstr "Nächtliches Aussetzen der Anzeige" -msgid "Show next timer" -msgstr "Nächsten Timer anzeigen" +msgid "Resume on user activities" +msgstr "Reaktivieren bei Nutzeraktivität" -msgid "Show only present next timer" -msgstr "Nur vorhandenen nächsten Timer anzeigen" +msgid "No" +msgstr "Nein" -msgid "Exit mode" -msgstr "Ende Modus" +msgid "Yes" +msgstr "Ja" -msgid "Never" -msgstr "Nie" +msgid "Hide icons" +msgstr "Symbole verbergen" + +msgid "Beginning of suspend" +msgstr "Anfangszeit" + +msgid "End time of suspend" +msgstr "Endzeit" msgid "as volume short time" msgstr "als Lautstärke (kurz)" @@ -88,20 +94,23 @@ msgstr "als Wiedergabefortschritt" msgid "Show bargraph" msgstr "Bargraph anzeigen" -msgid "Resume on activities" -msgstr "Reaktivieren bei Aktivität" +msgid "Do nothing" +msgstr "Nichts unternehmen" -msgid "Only per time" -msgstr "Gemäß der Zeit" +msgid "Showing clock" +msgstr "Uhrzeit anzeigen" -msgid "Suspend display at night" -msgstr "Nächtliches Aussetzen der Anzeige" +msgid "Turning display off" +msgstr "Abschalten der Anzeige" -msgid "Beginning of suspend" -msgstr "Anfangszeit" +msgid "Show next timer" +msgstr "Nächsten Timer anzeigen" -msgid "End time of suspend" -msgstr "Endzeit" +msgid "Show only present next timer" +msgstr "Nur vorhandenen nächsten Timer anzeigen" + +msgid "Exit mode" +msgstr "Ende Modus" msgid "Control a targa vfd" msgstr "Steuert ein Targa VFD" diff --git a/po/it_IT.po b/po/it_IT.po index 7fbed71..28eaee1 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-targavfd-plugin 0.0.5\n" +"Project-Id-Version: vdr-targavfd-plugin 0.3.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-11-02 18:11+0100\n" +"POT-Creation-Date: 2017-01-28 17:43+0100\n" "PO-Revision-Date: 2010-11-01 22:55+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -58,53 +58,62 @@ msgstr "Altezza carattere grande" msgid "Height of small font" msgstr "Altezza carattere piccolo" -msgid "Do nothing" -msgstr "Non fare nulla" +msgid "Never" +msgstr "Mai" -msgid "Showing clock" -msgstr "Mostra orologio" +msgid "Only per time" +msgstr "Solo per l'ora" -msgid "Turning display off" -msgstr "Spegni retroilluminazione" +msgid "Suspend display at night" +msgstr "Sospendi schermo la notte" -msgid "Show next timer" -msgstr "Mostra timer successivo" +msgid "Resume on user activities" +msgstr "Riprendi sulle attività degli utenti" -msgid "Show only present next timer" -msgstr "Mostra solo timer successivo" +msgid "No" +msgstr "No" -msgid "Exit mode" -msgstr "Modalità d'uscita" +msgid "Yes" +msgstr "Sì" -msgid "Never" -msgstr "Mai" +msgid "Hide icons" +msgstr "Nascondi icone" + +msgid "Beginning of suspend" +msgstr "Inizio sospensione" + +msgid "End time of suspend" +msgstr "Fine sospensione" msgid "as volume short time" -msgstr "" +msgstr "il volume grafico a barre, ma solo un breve periodo" msgid "as volume" -msgstr "" +msgstr "il volume grafico a barre" msgid "as replay progress" -msgstr "" +msgstr "il grafico a barre riproduzione" msgid "Show bargraph" -msgstr "" +msgstr "Mostra grafico a barre" -msgid "Resume on activities" -msgstr "Riprendi attività" +msgid "Do nothing" +msgstr "Non fare nulla" -msgid "Only per time" -msgstr "Solo per l'ora" +msgid "Showing clock" +msgstr "Mostra orologio" -msgid "Suspend display at night" -msgstr "Sospendi schermo la notte" +msgid "Turning display off" +msgstr "Spegni retroilluminazione" -msgid "Beginning of suspend" -msgstr "Inizio sospensione" +msgid "Show next timer" +msgstr "Mostra timer successivo" -msgid "End time of suspend" -msgstr "Fine sospensione" +msgid "Show only present next timer" +msgstr "Mostra solo timer successivo" + +msgid "Exit mode" +msgstr "Modalità d'uscita" msgid "Control a targa vfd" msgstr "Controlla una targa VFD" @@ -114,12 +123,3 @@ msgstr "Nessun timer attivo" msgid "Unknown title" msgstr "Titolo sconosciuto" - -#~ msgid "Timed" -#~ msgstr "Temporizzato" - -#~ msgid "Ever" -#~ msgstr "Sempre" - -#~ msgid "Show volume bargraph" -#~ msgstr "Mostra grafico a barre del volume" @@ -1,7 +1,7 @@ /* * targavfd plugin for VDR (C++) * - * (C) 2010-2013 Andreas Brachold <vdr07 AT deltab de> + * (C) 2010-2017 Andreas Brachold <vdr07 AT deltab de> * * This targavfd plugin is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -23,16 +23,16 @@ #include <vdr/config.h> #include <vdr/i18n.h> -#define DEFAULT_ON_EXIT eOnExitMode_BLANKSCREEN /**< Blank the device completely */ +#define DEFAULT_ON_EXIT eOnExitMode_BLANKSCREEN /**< Blank the device completely */ #define DEFAULT_BRIGHTNESS 1 #define DEFAULT_WIDTH 96 #define DEFAULT_HEIGHT 16 #define DEFAULT_FONT "Sans:Bold" -#define DEFAULT_TWO_LINE_MODE eRenderMode_SingleLine +#define DEFAULT_TWO_LINE_MODE eRenderMode_SingleLine #define DEFAULT_BIG_FONT_HEIGHT 14 #define DEFAULT_SMALL_FONT_HEIGHT 7 -#define DEFAULT_VOLUME_MODE eVolumeMode_ShowEver /**< Show the volume bar ever */ -#define DEFAULT_SUSPEND_MODE eSuspendMode_Never /**< Suspend display never */ +#define DEFAULT_VOLUME_MODE eVolumeMode_ShowEver /**< Show the volume bar ever */ +#define DEFAULT_SUSPEND_MODE eSuspendMode_Never /**< Suspend display never */ /// The one and only Stored setup data cVFDSetup theSetup; @@ -51,6 +51,8 @@ cVFDSetup::cVFDSetup(void) m_nSuspendMode = DEFAULT_SUSPEND_MODE; m_nSuspendTimeOn = 2200; m_nSuspendTimeOff = 800; + m_bSuspend_Timed = 1; /**< Suspend display, resume short time */ + m_bSuspend_Icons = 1; /**< Suspend icons */ strncpy(m_szFont,DEFAULT_FONT,sizeof(m_szFont)); } @@ -76,37 +78,39 @@ cVFDSetup& cVFDSetup::operator = (const cVFDSetup& x) m_nSuspendTimeOn = x.m_nSuspendTimeOn; m_nSuspendTimeOff = x.m_nSuspendTimeOff; + m_bSuspend_Timed = x.m_bSuspend_Timed; + m_bSuspend_Icons = x.m_bSuspend_Icons; + strncpy(m_szFont,x.m_szFont,sizeof(m_szFont)); return *this; } -/// compare profilenames and load there value -bool cVFDSetup::SetupParse(const char *szName, const char *szValue) +bool cVFDSetup::SetupParseInt(const char *szName, const char *szValue, + const char *szKey, + const int nMin, const int nMax, const int nDefault, + int& nValue) { - // OnExit - if(!strcasecmp(szName, "OnExit")) { + if(!strcasecmp(szName, szKey)) { int n = atoi(szValue); - if ((n < eOnExitMode_SHOWMSG) || (n >= eOnExitMode_LASTITEM)) { - esyslog("targaVFD: OnExit must be between %d and %d, using default %d", - eOnExitMode_SHOWMSG, eOnExitMode_LASTITEM, DEFAULT_ON_EXIT); - n = DEFAULT_ON_EXIT; + if ((n < nMin) || (n >= nMax)) { + esyslog("targaVFD: %s must be between %d and %d, using default %d", + szKey, nMin, nMax-1, nDefault); + n = nDefault; } - m_nOnExit = n; + nValue = n; + dsyslog("targaVFD: %s set to %d", szKey, nValue); return true; } + return false; +} + +/// compare profilenames and load there value +bool cVFDSetup::SetupParse(const char *szName, const char *szValue) +{ + if(SetupParseInt(szName, szValue, "OnExit", eOnExitMode_SHOWMSG, eOnExitMode_LASTITEM, DEFAULT_ON_EXIT, m_nOnExit)) { return true; } + if(SetupParseInt(szName, szValue, "Brightness", 0, 2, DEFAULT_BRIGHTNESS, m_nBrightness)) { return true; } - // Brightness - if(!strcasecmp(szName, "Brightness")) { - int n = atoi(szValue); - if ((n < 0) || (n > 2)) { - esyslog("targaVFD: Brightness must be between 0 and 2, using default %d", - DEFAULT_BRIGHTNESS); - n = DEFAULT_BRIGHTNESS; - } - m_nBrightness = n; - return true; - } // Font if(!strcasecmp(szName, "Font")) { if(szValue) { @@ -114,94 +118,25 @@ bool cVFDSetup::SetupParse(const char *szName, const char *szValue) cFont::GetAvailableFontNames(&fontNames); if(fontNames.Find(szValue)>=0) { strncpy(m_szFont,szValue,sizeof(m_szFont)); + dsyslog("targaVFD: %s set to %s", szName, m_szFont); return true; } } - esyslog("targaVFD: Font '%s' not found, using default %s", - szValue, DEFAULT_FONT); + esyslog("targaVFD: %s '%s' not found, using default %s", + szName, szValue, DEFAULT_FONT); strncpy(m_szFont,DEFAULT_FONT,sizeof(m_szFont)); return true; } - // BigFont - if(!strcasecmp(szName, "BigFont")) { - int n = atoi(szValue); - if ((n < 5) || (n > 24)) { - esyslog("targaVFD: BigFont must be between 5 and 24, using default %d", - DEFAULT_BIG_FONT_HEIGHT); - n = DEFAULT_BIG_FONT_HEIGHT; - } - m_nBigFontHeight = n; - return true; - } - // SmallFont - if(!strcasecmp(szName, "SmallFont")) { - int n = atoi(szValue); - if ((n < 5) || (n > 24)) { - esyslog("targaVFD: SmallFont must be between 5 and 24, using default %d", - DEFAULT_SMALL_FONT_HEIGHT); - n = DEFAULT_SMALL_FONT_HEIGHT; - } - m_nSmallFontHeight = n; - return true; - } - // Two Line Mode - if(!strcasecmp(szName, "TwoLineMode")) { - int n = atoi(szValue); - if ((n < eRenderMode_SingleLine) || (n >= eRenderMode_LASTITEM)) { - esyslog("targaVFD: TwoLineMode must be between %d and %d, using default %d", - eRenderMode_SingleLine, eRenderMode_LASTITEM, DEFAULT_TWO_LINE_MODE ); - n = DEFAULT_TWO_LINE_MODE; - } - m_nRenderMode = n; - return true; - } - - // VolumeMode - if(!strcasecmp(szName, "VolumeMode")) { - int n = atoi(szValue); - if ((n < eVolumeMode_ShowNever) || (n >= eVolumeMode_LASTITEM)) { - esyslog("targaVFD: VolumeMode must be between %d and %d, using default %d", - eVolumeMode_ShowNever, eVolumeMode_LASTITEM, DEFAULT_VOLUME_MODE); - n = DEFAULT_VOLUME_MODE; - } - m_nVolumeMode = n; - return true; - } - - // SuspendMode - if(!strcasecmp(szName, "SuspendMode")) { - int n = atoi(szValue); - if ((n < eSuspendMode_Never) || (n >= eSuspendMode_LASTITEM)) { - esyslog("targaVFD: SuspendMode must be between %d and %d, using default %d", - eSuspendMode_Never, eSuspendMode_LASTITEM, DEFAULT_SUSPEND_MODE); - n = DEFAULT_SUSPEND_MODE; - } - m_nSuspendMode = n; - return true; - } - // SuspendTimeOn - if(!strcasecmp(szName, "SuspendTimeOn")) { - int n = atoi(szValue); - if ((n < 0) || (n >= 2400)) { - esyslog("targaVFD: SuspendTimeOn must be between %d and %d, using default %d", - 0, 2359, 0); - n = 0; - } - m_nSuspendTimeOn = n; - return true; - } - // SuspendTimeOff - if(!strcasecmp(szName, "SuspendTimeOff")) { - int n = atoi(szValue); - if ((n < 0) || (n >= 2400)) { - esyslog("targaVFD: SuspendTimeOff must be between %d and %d, using default %d", - 0, 2359, 0); - n = 0; - } - m_nSuspendTimeOff = n; - return true; - } + if(SetupParseInt(szName, szValue, "BigFont", 5, 24, DEFAULT_BIG_FONT_HEIGHT, m_nBigFontHeight)) { return true; } + if(SetupParseInt(szName, szValue, "SmallFont", 5, 24, DEFAULT_SMALL_FONT_HEIGHT, m_nSmallFontHeight)) { return true; } + if(SetupParseInt(szName, szValue, "TwoLineMode", eRenderMode_SingleLine, eRenderMode_LASTITEM, DEFAULT_TWO_LINE_MODE, m_nRenderMode)) { return true; } + if(SetupParseInt(szName, szValue, "VolumeMode", eVolumeMode_ShowNever, eVolumeMode_LASTITEM, DEFAULT_VOLUME_MODE, m_nVolumeMode)) { return true; } + if(SetupParseInt(szName, szValue, "SuspendMode", eSuspendMode_Never, eSuspendMode_LASTITEM, DEFAULT_SUSPEND_MODE, m_nSuspendMode)) { return true; } + if(SetupParseInt(szName, szValue, "SuspendTimed", 0, 2, 1, m_bSuspend_Timed)) { return true; } + if(SetupParseInt(szName, szValue, "SuspendIcons", 0, 2, 1, m_bSuspend_Icons)) { return true; } + if(SetupParseInt(szName, szValue, "SuspendTimeOn", 0, 2400, 2200, m_nSuspendTimeOn)) { return true; } + if(SetupParseInt(szName, szValue, "SuspendTimeOff", 0, 2400, 800, m_nSuspendTimeOff)) { return true; } //Unknow parameter return false; @@ -221,11 +156,13 @@ void cVFDMenuSetup::Store(void) SetupStore("TwoLineMode",theSetup.m_nRenderMode); SetupStore("VolumeMode", theSetup.m_nVolumeMode); SetupStore("SuspendMode", theSetup.m_nSuspendMode); + SetupStore("SuspendTimed", theSetup.m_bSuspend_Timed); + SetupStore("SuspendIcons", theSetup.m_bSuspend_Icons); SetupStore("SuspendTimeOn", theSetup.m_nSuspendTimeOn); SetupStore("SuspendTimeOff", theSetup.m_nSuspendTimeOff); } -cVFDMenuSetup::cVFDMenuSetup(cVFDWatch* pDev) +cVFDMenuSetup::cVFDMenuSetup(cVFDWatch* pDev) : m_tmpSetup(theSetup) , m_pDev(pDev) { @@ -240,7 +177,7 @@ cVFDMenuSetup::cVFDMenuSetup(cVFDWatch* pDev) szBrightness[1] = tr("Half brightness"); szBrightness[2] = tr("Full brightness"); - Add(new cMenuEditStraItem (tr("Brightness"), + Add(new cMenuEditStraItem (tr("Brightness"), &m_tmpSetup.m_nBrightness, memberof(szBrightness), szBrightness)); @@ -250,30 +187,36 @@ cVFDMenuSetup::cVFDMenuSetup(cVFDWatch* pDev) szRenderMode[eRenderMode_SingleTopic] = tr("Only topic"); szRenderMode[eRenderMode_MultiPage] = tr("Multiple pages"); - Add(new cMenuEditStraItem(tr("Render mode"), + Add(new cMenuEditStraItem(tr("Render mode"), &m_tmpSetup.m_nRenderMode, memberof(szRenderMode), szRenderMode)); - Add(new cMenuEditStraItem(tr("Default font"), + Add(new cMenuEditStraItem(tr("Default font"), &fontIndex, fontNames.Size(), &fontNames[0])); - Add(new cMenuEditIntItem (tr("Height of big font"), + Add(new cMenuEditIntItem (tr("Height of big font"), &m_tmpSetup.m_nBigFontHeight, 5, 24)); - Add(new cMenuEditIntItem (tr("Height of small font"), + Add(new cMenuEditIntItem (tr("Height of small font"), &m_tmpSetup.m_nSmallFontHeight, 5, 24)); - static const char * szExitModes[eOnExitMode_LASTITEM]; - szExitModes[eOnExitMode_SHOWMSG] = tr("Do nothing"); - szExitModes[eOnExitMode_SHOWCLOCK] = tr("Showing clock"); - szExitModes[eOnExitMode_BLANKSCREEN] = tr("Turning display off"); - szExitModes[eOnExitMode_NEXTTIMER] = tr("Show next timer"); - szExitModes[eOnExitMode_NEXTTIMER_BLANKSCR] = tr("Show only present next timer"); - - Add(new cMenuEditStraItem (tr("Exit mode"), - &m_tmpSetup.m_nOnExit, - memberof(szExitModes), szExitModes)); + static const char * szSuspendMode[eSuspendMode_LASTITEM]; + szSuspendMode[eSuspendMode_Never] = tr("Never"); + szSuspendMode[eSuspendMode_Ever] = tr("Only per time"); + Add(new cMenuEditStraItem (tr("Suspend display at night"), + &m_tmpSetup.m_nSuspendMode, + memberof(szSuspendMode), szSuspendMode)); + Add(new cMenuEditBoolItem(tr("Resume on user activities"), + &m_tmpSetup.m_bSuspend_Timed, + tr("No"), tr("Yes"))); + Add(new cMenuEditBoolItem(tr("Hide icons"), + &m_tmpSetup.m_bSuspend_Icons, + tr("No"), tr("Yes"))); + Add(new cMenuEditTimeItem (tr("Beginning of suspend"), + &m_tmpSetup.m_nSuspendTimeOn)); + Add(new cMenuEditTimeItem (tr("End time of suspend"), + &m_tmpSetup.m_nSuspendTimeOff)); static const char * szVolumeMode[eVolumeMode_LASTITEM]; szVolumeMode[eVolumeMode_ShowNever] = tr("Never"); @@ -281,22 +224,20 @@ cVFDMenuSetup::cVFDMenuSetup(cVFDWatch* pDev) szVolumeMode[eVolumeMode_ShowEver] = tr("as volume"); szVolumeMode[eVolumeMode_Progress] = tr("as replay progress"); - Add(new cMenuEditStraItem (tr("Show bargraph"), + Add(new cMenuEditStraItem (tr("Show bargraph"), &m_tmpSetup.m_nVolumeMode, memberof(szVolumeMode), szVolumeMode)); - static const char * szSuspendMode[eSuspendMode_LASTITEM]; - szSuspendMode[eSuspendMode_Never] = tr("Never"); - szSuspendMode[eSuspendMode_Timed] = tr("Resume on activities"); - szSuspendMode[eSuspendMode_Ever] = tr("Only per time"); + static const char * szExitModes[eOnExitMode_LASTITEM]; + szExitModes[eOnExitMode_SHOWMSG] = tr("Do nothing"); + szExitModes[eOnExitMode_SHOWCLOCK] = tr("Showing clock"); + szExitModes[eOnExitMode_BLANKSCREEN] = tr("Turning display off"); + szExitModes[eOnExitMode_NEXTTIMER] = tr("Show next timer"); + szExitModes[eOnExitMode_NEXTTIMER_BLANKSCR] = tr("Show only present next timer"); - Add(new cMenuEditStraItem (tr("Suspend display at night"), - &m_tmpSetup.m_nSuspendMode, - memberof(szSuspendMode), szSuspendMode)); - Add(new cMenuEditTimeItem (tr("Beginning of suspend"), - &m_tmpSetup.m_nSuspendTimeOn)); - Add(new cMenuEditTimeItem (tr("End time of suspend"), - &m_tmpSetup.m_nSuspendTimeOff)); + Add(new cMenuEditStraItem (tr("Exit mode"), + &m_tmpSetup.m_nOnExit, + memberof(szExitModes), szExitModes)); } eOSState cVFDMenuSetup::ProcessKey(eKeys nKey) @@ -314,7 +255,7 @@ eOSState cVFDMenuSetup::ProcessKey(eKeys nKey) m_tmpSetup.m_nBigFontHeight, m_tmpSetup.m_nSmallFontHeight); } - } + } return cMenuSetupPage::ProcessKey(nKey); } @@ -1,7 +1,7 @@ /* * targavfd plugin for VDR (C++) * - * (C) 2010-2013 Andreas Brachold <vdr07 AT deltab de> + * (C) 2010-2017 Andreas Brachold <vdr07 AT deltab de> * * This targavfd plugin is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -44,7 +44,6 @@ enum eRenderMode { enum eSuspendMode { eSuspendMode_Never /**< Suspend display never */ - ,eSuspendMode_Timed /**< Suspend display, resume short time */ ,eSuspendMode_Ever /**< Suspend display ever */ ,eSuspendMode_LASTITEM }; @@ -70,13 +69,17 @@ struct cVFDSetup int m_nSuspendTimeOn; int m_nSuspendTimeOff; + int m_bSuspend_Timed; /**< Suspend display, resume short time */ + int m_bSuspend_Icons; /**< Suspend icons */ + cVFDSetup(void); cVFDSetup(const cVFDSetup& x); cVFDSetup& operator = (const cVFDSetup& x); /// Parse our own setup parameters and store their values. bool SetupParse(const char *szName, const char *szValue); - +private: + bool SetupParseInt(const char *szName, const char *szValue, const char *szKey, const int nMin, const int nMax, const int nDefault, int& nValue); }; class cVFDWatch; @@ -1,7 +1,7 @@ /* * targavfd plugin for VDR (C++) * - * (C) 2010-2013 Andreas Brachold <vdr07 AT deltab de> + * (C) 2010-2017 Andreas Brachold <vdr07 AT deltab de> * * This targavfd plugin is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -21,7 +21,7 @@ #include "status.h" #include "setup.h" -static const char *VERSION = "0.3.0"; +static const char *VERSION = "0.3.1"; cPluginTargaVFD::cPluginTargaVFD(void) { @@ -1,7 +1,7 @@ /* * targavfd plugin for VDR (C++) * - * (C) 2010-2013 Andreas Brachold <vdr07 AT deltab de> + * (C) 2010-2017 Andreas Brachold <vdr07 AT deltab de> * * This targavfd plugin is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -240,8 +240,10 @@ void cVFDWatch::Action(void) runTime.Set(); time_t ts = time(NULL); + if(theSetup.m_nSuspendMode != eSuspendMode_Never && theSetup.m_nSuspendTimeOff != theSetup.m_nSuspendTimeOn) { + struct tm *now = localtime_r(&ts, &tm_r); int clock = now->tm_hour * 100 + now->tm_min; if(theSetup.m_nSuspendTimeOff > theSetup.m_nSuspendTimeOn) { //like 8-20 @@ -251,13 +253,16 @@ void cVFDWatch::Action(void) bSuspend = (clock >= theSetup.m_nSuspendTimeOn) || (clock <= theSetup.m_nSuspendTimeOff); } - if(theSetup.m_nSuspendMode == eSuspendMode_Timed + if(theSetup.m_bSuspend_Timed && !ShutdownHandler.IsUserInactive()) { bSuspend = false; } } if(bSuspend != bLastSuspend) { + clear(); bReDraw = true; + bFlush= true; + bLastSuspend = bSuspend; } if(!bSuspend) { @@ -290,6 +295,9 @@ void cVFDWatch::Action(void) bFlush = RenderScreenPages(bReDraw, nPage, nMaxPages); break; } + } + + if(!bSuspend || !theSetup.m_bSuspend_Icons) { if(m_eWatchMode != eLiveTV) { switch(ReplayMode()) { @@ -346,16 +354,12 @@ void cVFDWatch::Action(void) default : break; } - - } // Set Brightness if setup value changed or display set to suspend - if(theSetup.m_nBrightness != nBrightness || - bSuspend != bLastSuspend) { + if(theSetup.m_nBrightness != nBrightness) { nBrightness = theSetup.m_nBrightness; - Brightness(bSuspend ? 0 : nBrightness); - bLastSuspend = bSuspend; + Brightness(nBrightness); bFlush = true; } @@ -1,7 +1,7 @@ /* * targavfd plugin for VDR (C++) * - * (C) 2010-2013 Andreas Brachold <vdr07 AT deltab de> + * (C) 2010-2017 Andreas Brachold <vdr07 AT deltab de> * * This targavfd plugin is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published |