summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--po/de_DE.po22
-rw-r--r--po/it_IT.po26
-rw-r--r--setup.c9
-rw-r--r--setup.h3
-rw-r--r--watch.c55
-rw-r--r--watch.h2
7 files changed, 78 insertions, 40 deletions
diff --git a/HISTORY b/HISTORY
index a9fab4a..840f386 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,7 @@
VDR Plugin 'targavfd' Revision History
-------------------------------------
+- New option, show replay progress as bargraph (Request #666)
- Fix display wrong time for HD recording if they greater than one hour (Bug #1568)
2013-04-12: Version 0.2.1
diff --git a/po/de_DE.po b/po/de_DE.po
index 9b19cf3..9d3a19e 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> 2009, 2010.
+# Andreas Brachold <vdr07 AT deltab de> 2009 - 2013.
msgid ""
msgstr ""
-"Project-Id-Version: vdr-targavfd-plugin 0.0.5\n"
+"Project-Id-Version: vdr-targavfd-plugin 0.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-11-19 19:25+0100\n"
+"POT-Creation-Date: 2013-10-31 18:08+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"
@@ -73,14 +73,17 @@ msgstr "Ende Modus"
msgid "Never"
msgstr "Nie"
-msgid "Timed"
-msgstr "Zeitlich"
+msgid "as volume short time"
+msgstr "als Lautstärke (kurz)"
-msgid "Ever"
-msgstr "Immer"
+msgid "as volume"
+msgstr "als Lautstärke"
-msgid "Show volume bargraph"
-msgstr "Lautstärkebargraph anzeigen"
+msgid "as replay progress"
+msgstr "als Wiedergabefortschritt"
+
+msgid "Show bargraph"
+msgstr "Bargraph anzeigen"
msgid "Resume on activities"
msgstr "Reaktivieren bei Aktivität"
@@ -105,3 +108,4 @@ msgstr "Kein aktiver Timer"
msgid "Unknown title"
msgstr "Unbekannter Titel"
+
diff --git a/po/it_IT.po b/po/it_IT.po
index 2710ca2..117e640 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-targavfd-plugin 0.0.5\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-11-19 19:25+0100\n"
+"POT-Creation-Date: 2013-10-31 18: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"
@@ -76,14 +76,17 @@ msgstr "Modalità d'uscita"
msgid "Never"
msgstr "Mai"
-msgid "Timed"
-msgstr "Temporizzato"
+msgid "as volume short time"
+msgstr ""
+
+msgid "as volume"
+msgstr ""
-msgid "Ever"
-msgstr "Sempre"
+msgid "as replay progress"
+msgstr ""
-msgid "Show volume bargraph"
-msgstr "Mostra grafico a barre del volume"
+msgid "Show bargraph"
+msgstr ""
msgid "Resume on activities"
msgstr "Riprendi attività"
@@ -108,3 +111,12 @@ 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"
diff --git a/setup.c b/setup.c
index cd650a3..8c3d6f8 100644
--- a/setup.c
+++ b/setup.c
@@ -1,7 +1,7 @@
/*
* targavfd plugin for VDR (C++)
*
- * (C) 2010 Andreas Brachold <vdr07 AT deltab de>
+ * (C) 2010-2013 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
@@ -276,10 +276,11 @@ cVFDMenuSetup::cVFDMenuSetup(cVFDWatch* pDev)
static const char * szVolumeMode[eVolumeMode_LASTITEM];
szVolumeMode[eVolumeMode_ShowNever] = tr("Never");
- szVolumeMode[eVolumeMode_ShowTimed] = tr("Timed");
- szVolumeMode[eVolumeMode_ShowEver] = tr("Ever");
+ szVolumeMode[eVolumeMode_ShowTimed] = tr("as volume short time");
+ szVolumeMode[eVolumeMode_ShowEver] = tr("as volume");
+ szVolumeMode[eVolumeMode_Progress] = tr("as replay progress");
- Add(new cMenuEditStraItem (tr("Show volume bargraph"),
+ Add(new cMenuEditStraItem (tr("Show bargraph"),
&m_tmpSetup.m_nVolumeMode,
memberof(szVolumeMode), szVolumeMode));
diff --git a/setup.h b/setup.h
index 747f190..35009c1 100644
--- a/setup.h
+++ b/setup.h
@@ -1,7 +1,7 @@
/*
* targavfd plugin for VDR (C++)
*
- * (C) 2010 Andreas Brachold <vdr07 AT deltab de>
+ * (C) 2010-2013 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
@@ -30,6 +30,7 @@ enum eVolumeMode {
eVolumeMode_ShowNever /**< Show the volume bar never */
,eVolumeMode_ShowTimed /**< Show the volume bar short time */
,eVolumeMode_ShowEver /**< Show the volume bar ever */
+ ,eVolumeMode_Progress /**< Show the volume bar as time progress */
,eVolumeMode_LASTITEM
};
diff --git a/watch.c b/watch.c
index 6873ec4..c00157e 100644
--- a/watch.c
+++ b/watch.c
@@ -249,14 +249,15 @@ void cVFDWatch::Action(void)
}
if(!bSuspend) {
- // every second the clock need updates.
- if (theSetup.m_nRenderMode == eRenderMode_DualLine) {
+ // every second the clock need updates.
if((0 == (nCnt % 2))) {
bReDraw = CurrentTime(ts);
if(m_eWatchMode != eLiveTV) {
- bReDraw |= ReplayTime();
+ bReDraw |= ReplayTime();
+ } else {
+ m_nReplayCurrent = ts - chPresentTime;
+ m_nReplayTotal = chFollowingTime - chPresentTime;
}
- }
}
bFlush = RenderScreen(bReDraw);
@@ -289,19 +290,34 @@ void cVFDWatch::Action(void)
}
// update volume - bargraph or mute symbol
- if(theSetup.m_nVolumeMode != eVolumeMode_ShowNever) {
- if(m_bVolumeMute) {
- nIcons |= eIconMUTE;
- } else {
- if(theSetup.m_nVolumeMode == eVolumeMode_ShowEver
- || ( theSetup.m_nVolumeMode == eVolumeMode_ShowTimed
- && (ts - tsVolumeLast) < 15 )) { // if timed - delay 15 seconds
- nIcons |= eIconVOLUME;
- const int nVolSteps = (MAXVOLUME/14);
- nIcons |= (((1 << (m_nLastVolume / nVolSteps)) - 1) << 0x0B);
- }
- }
+ if(m_bVolumeMute) {
+ nIcons |= eIconMUTE;
}
+ switch(theSetup.m_nVolumeMode)
+ {
+ case eVolumeMode_ShowTimed: {
+ if((ts - tsVolumeLast) > 15 )
+ break;
+ }
+ case eVolumeMode_ShowEver: {
+ const int nVolSteps = (MAXVOLUME/14);
+ nIcons |= eIconVOLUME;
+ nIcons |= (((1 << (m_nLastVolume / nVolSteps)) - 1) << 0x0B);
+ break;
+ }
+ case eVolumeMode_Progress: {
+ const int nBarSteps = (m_nReplayTotal/14);
+ if(nBarSteps > 0) {
+ nIcons |= (((1 << (m_nReplayCurrent / nBarSteps)) - 1) << 0x0B);
+ }
+ break;
+ }
+ case eVolumeMode_ShowNever:
+ default :
+ break;
+ }
+
+
}
// Set Brightness if setup value changed or display set to suspend
@@ -654,15 +670,16 @@ const char * cVFDWatch::FormatReplayTime(int current, int total, double dFrameRa
}
bool cVFDWatch::ReplayTime() {
- int current = 0,total = 0;
double dFrameRate;
#if VDRVERSNUM >= 10701
dFrameRate = DEFAULTFRAMESPERSECOND;
#else
dFrameRate = FRAMESPERSEC;
#endif
- if(ReplayPosition(current,total,dFrameRate)) {
- const char * sz = FormatReplayTime(current,total,dFrameRate);
+ m_nReplayCurrent = 0;
+ m_nReplayTotal = 0;
+ if(ReplayPosition(m_nReplayCurrent,m_nReplayTotal,dFrameRate)) {
+ const char * sz = FormatReplayTime(m_nReplayCurrent,m_nReplayTotal,dFrameRate);
if(!replayTime || strcmp(sz,*replayTime)) {
if(replayTime)
delete replayTime;
diff --git a/watch.h b/watch.h
index 92b4408..018c191 100644
--- a/watch.h
+++ b/watch.h
@@ -79,6 +79,8 @@ private:
bool m_bVolumeMute;
time_t tsVolumeLast;
+ int m_nReplayCurrent;
+ int m_nReplayTotal;
cString* osdTitle;
cString* osdItem;