diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-12-18 15:21:58 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-01-12 16:09:41 +0100 |
commit | dcf3790bab61864d7b0738848328e522b634a9f1 (patch) | |
tree | d2b099c5791e6b41a9ba26dd2d55a3b7c39f99b4 | |
parent | 5965aff32d9b5a031aa3778e2ff010e9258cc344 (diff) | |
download | skin-nopacity-dcf3790bab61864d7b0738848328e522b634a9f1.tar.gz skin-nopacity-dcf3790bab61864d7b0738848328e522b634a9f1.tar.bz2 |
Added number of errors to recording item in the recordings menu
The number of errors can be viewed in the recordings menu. This is
configurable. Errors can be deactivated or displayed in line 2 or 3.
Also 0 errors may or may not be displayed.
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | menuitem.c | 26 | ||||
-rw-r--r-- | po/ca_ES.po | 17 | ||||
-rw-r--r-- | po/de_DE.po | 17 | ||||
-rw-r--r-- | po/it_IT.po | 17 | ||||
-rw-r--r-- | po/sk_SK.po | 17 | ||||
-rw-r--r-- | setup.c | 7 | ||||
-rw-r--r-- | setup.h | 1 |
8 files changed, 92 insertions, 12 deletions
@@ -134,6 +134,8 @@ void cNopacityConfig::LoadDefaults(void) { conf.insert(std::pair<std::string, int>("detailedViewScrollStep", 1)); conf.insert(std::pair<std::string, int>("menuSchedulesWindowMode", 1)); conf.insert(std::pair<std::string, int>("menuRecordingsWindowMode", 1)); + conf.insert(std::pair<std::string, int>("menuRecordingsErrorMode", 2)); + conf.insert(std::pair<std::string, int>("menuRecordingsDisplayError0", 1)); conf.insert(std::pair<std::string, int>("menuTimersWindowMode", 1)); conf.insert(std::pair<std::string, int>("fontHeader", 0)); conf.insert(std::pair<std::string, int>("fontDate", 0)); @@ -1324,7 +1324,7 @@ void cNopacityRecordingMenuItem::SetTextShortRecording(void) { void cNopacityRecordingMenuItem::DrawRecordingIcons(void) { int iconSize = height / 3; int iconX = pixmapStatic->ViewPort().Width(); - int iconY = height / 2; + int iconY = height - iconSize - fontSmall->Height(); cImage *imgIconNew = imgCache->GetSkinIcon("skinIcons/newrecording", iconSize, iconSize); if (imgIconNew && Recording->IsNew()) { @@ -1362,25 +1362,37 @@ void cNopacityRecordingMenuItem::DrawRecDateTime(void) { Event = Recording->Info()->GetEvent(); cString strDateTime(""); cString strDuration(""); + cString strError(""); +#if (APIVERSNUM >= 20505) + //Errors + const cRecordingInfo *info = Recording->Info(); + if (info->Errors() >= (1 - config.GetValue("menuRecordingsDisplayError0"))) { + strError = cString::sprintf("%s: %d ", tr("errors"), info->Errors()); + } +#endif if (Event) { std::string strDate = *(Event->GetDateString()); cString strTime = Event->GetTimeString(); if (strDate.find("1970") != std::string::npos) { time_t start = Recording->Start(); - strDateTime = cString::sprintf("%s %s", *DateString(start),*TimeString(start)); + strDateTime = cString::sprintf("%s %s", *DateString(start), *TimeString(start)); } else { strDateTime = cString::sprintf("%s - %s", strDate.c_str(), *strTime); } + if (config.GetValue("menuRecordingsErrorMode") == 1) + strDateTime = cString::sprintf("%s, %s", *strDateTime, *strError); int duration = Event->Duration() / 60; int recDuration = Recording->LengthInSeconds(); - recDuration = (recDuration>0)?(recDuration / 60):0; - strDuration = cString::sprintf("%s: %d %s, %s: %d %s", tr("Duration"), duration, tr("min"), tr("recording"), recDuration, tr("min")); + recDuration = (recDuration > 0) ? (recDuration / 60) : 0; + if (config.GetValue("menuRecordingsErrorMode") == 2) + strDuration = cString::sprintf("%s: %d %s, %s: %d %s, %s", tr("Duration"), duration, tr("min"), tr("recording"), recDuration, tr("min"), *strError); + else + strDuration = cString::sprintf("%s: %d %s, %s: %d %s", tr("Duration"), duration, tr("min"), tr("recording"), recDuration, tr("min")); } - - int textHeight = height/2 + (height/4 - fontSmall->Height())/2; + int textHeight = height / 2 + (height / 4 - fontSmall->Height()) / 2; tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem); pixmapStatic->DrawText(cPoint(10 + left, textHeight), *strDateTime, clrFont, clrTransparent, fontSmall); - textHeight += height/4; + textHeight += height / 4; pixmapStatic->DrawText(cPoint(10 + left, textHeight), *strDuration, clrFont, clrTransparent, fontSmall); } diff --git a/po/ca_ES.po b/po/ca_ES.po index 0c20d72..d5237ab 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2021-07-30 12:33+0200\n" +"POT-Creation-Date: 2022-01-12 15:39+0100\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan <gbonich@gmail.com>\n" "Language-Team: \n" @@ -173,6 +173,9 @@ msgstr "Transponedor" msgid "No EPG Information found" msgstr "No hi ha informació EPG" +msgid "errors" +msgstr "" + msgid "Duration" msgstr "Durada" @@ -467,9 +470,21 @@ msgstr "Veure horaris amb informació en temps" msgid "Number of EPG Entries in Schedules Info Window" msgstr "Nombre d'entrades EPG a la Finestra de Programació" +msgid "row 2" +msgstr "" + +msgid "row 3" +msgstr "" + msgid "Mode of recording Window" msgstr "Mode de gravació" +msgid "Show number of errors in the recordings menu" +msgstr "" + +msgid "Display Error 0" +msgstr "" + msgid "Border around detailed recording view" msgstr "Vora al voltant de vista registre detallat" diff --git a/po/de_DE.po b/po/de_DE.po index ffa74e5..33ed671 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2021-07-30 12:33+0200\n" +"POT-Creation-Date: 2022-01-12 15:39+0100\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -170,6 +170,9 @@ msgstr "Transp." msgid "No EPG Information found" msgstr "Keine EPG Informationen verfügbar" +msgid "errors" +msgstr "Fehler" + msgid "Duration" msgstr "Dauer" @@ -464,9 +467,21 @@ msgstr "Programm mit Zeitinformation anzeigen" msgid "Number of EPG Entries in Schedules Info Window" msgstr "Anzahl der EPG Einträge im Programm Info Fenster" +msgid "row 2" +msgstr "Zeile 2" + +msgid "row 3" +msgstr "Zeile 3" + msgid "Mode of recording Window" msgstr "Aufnahme Fenster Modus" +msgid "Show number of errors in the recordings menu" +msgstr "Anzahl Fehler im Aufzeichnungsnmenü anzeigen" + +msgid "Display Error 0" +msgstr "0 Fehler anzeigen" + msgid "Border around detailed recording view" msgstr "Rahmen um detailierte Aufnahmeansicht" diff --git a/po/it_IT.po b/po/it_IT.po index eefe240..77d872a 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2021-07-30 12:33+0200\n" +"POT-Creation-Date: 2022-01-12 15:39+0100\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -173,6 +173,9 @@ msgstr "Transponder" msgid "No EPG Information found" msgstr "" +msgid "errors" +msgstr "" + msgid "Duration" msgstr "Durata" @@ -467,9 +470,21 @@ msgstr "" msgid "Number of EPG Entries in Schedules Info Window" msgstr "" +msgid "row 2" +msgstr "" + +msgid "row 3" +msgstr "" + msgid "Mode of recording Window" msgstr "" +msgid "Show number of errors in the recordings menu" +msgstr "" + +msgid "Display Error 0" +msgstr "" + msgid "Border around detailed recording view" msgstr "" diff --git a/po/sk_SK.po b/po/sk_SK.po index 0af3297..d2a26d9 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinnopacity\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2021-07-30 12:33+0200\n" +"POT-Creation-Date: 2022-01-12 15:39+0100\n" "PO-Revision-Date: 2013-11-11 20:52+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -170,6 +170,9 @@ msgstr "Transp." msgid "No EPG Information found" msgstr "Nena¹li sa EPG informácie" +msgid "errors" +msgstr "" + msgid "Duration" msgstr "Då¾ka" @@ -464,9 +467,21 @@ msgstr "Zobrazi» reláciu s èasom vysielania" msgid "Number of EPG Entries in Schedules Info Window" msgstr "Poèet EPG polo¾iek v okne TV programu" +msgid "row 2" +msgstr "" + +msgid "row 3" +msgstr "" + msgid "Mode of recording Window" msgstr "Spôsob zobrazenia okna nahrávok" +msgid "Show number of errors in the recordings menu" +msgstr "" + +msgid "Display Error 0" +msgstr "" + msgid "Border around detailed recording view" msgstr "Okraj okolo podrobného zobrazenia nahrávky" @@ -149,7 +149,7 @@ cNopacitySetupMenuDisplay::cNopacitySetupMenuDisplay(cNopacityConfig* data) : c scrollSpeed[1] = tr("slow"); scrollSpeed[2] = tr("medium"); scrollSpeed[3] = tr("fast"); - scalePic[0] = tr("no"); + scalePic[0] = trVDR("no"); scalePic[1] = tr("yes"); scalePic[2] = tr("auto"); Set(); @@ -323,6 +323,9 @@ void cNopacitySetupMenuDisplayTimers::Set(void) { cNopacitySetupMenuDisplayRecordings::cNopacitySetupMenuDisplayRecordings(cNopacityConfig* data) : cMenuSetupSubMenu(tr("VDR Menu: Recordings Menu"), data) { windowMode[0] = tr("window"); windowMode[1] = tr("full screen"); + errorMode[0] = tr("no"); + errorMode[1] = tr("row 2"); + errorMode[2] = tr("row 3"); Set(); } @@ -335,6 +338,8 @@ void cNopacitySetupMenuDisplayRecordings::Set(void) { Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthRecordings"), 10, 97)); Add(new cMenuEditIntItem(tr("Number of entires per page"), tmpConf->GetValueRef("numRecordingsMenuItems"), 3, 20)); Add(new cMenuEditStraItem(tr("Mode of recording Window"), tmpConf->GetValueRef("menuRecordingsWindowMode"), 2, windowMode)); + Add(new cMenuEditStraItem(tr("Show number of errors in the recordings menu"), tmpConf->GetValueRef("menuRecordingsErrorMode"), 3, errorMode)); + Add(new cMenuEditBoolItem(tr("Display Error 0"), tmpConf->GetValueRef("menuRecordingsDisplayError0"))); Add(new cMenuEditIntItem(tr("Border around detailed recording view"), tmpConf->GetValueRef("borderDetailedRecordings"), 1, 300)); Add(new cMenuEditBoolItem(tr("Use folder poster if available"), tmpConf->GetValueRef("useFolderPoster"))); Add(new cMenuEditIntItem(tr("Width of manually set recording poster"), tmpConf->GetValueRef("posterWidth"), 100, 1000)); @@ -78,6 +78,7 @@ class cNopacitySetupMenuDisplayTimers : public cMenuSetupSubMenu { class cNopacitySetupMenuDisplayRecordings : public cMenuSetupSubMenu { protected: const char *windowMode[2]; + const char *errorMode[3]; void Set(void); public: cNopacitySetupMenuDisplayRecordings(cNopacityConfig *data); |