diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-07-19 12:35:51 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-07-19 15:37:20 +0200 |
commit | f15698ebd16d8cf8d7c88d9dc3127e02db148b44 (patch) | |
tree | c5bb5db99d6753b97f67adb3507a90925a7a5ce7 | |
parent | 25ab2d858179e132700c1b8d663159940742f6eb (diff) | |
download | skin-lcarsng-f15698ebd16d8cf8d7c88d9dc3127e02db148b44.tar.gz skin-lcarsng-f15698ebd16d8cf8d7c88d9dc3127e02db148b44.tar.bz2 |
Optional display of errors in info added if "error == 0"
This can be configured in the setup.
-rw-r--r-- | config.c | 30 | ||||
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | displaymenu.c | 4 | ||||
-rw-r--r-- | po/de_DE.po | 5 | ||||
-rw-r--r-- | setup.c | 62 |
5 files changed, 56 insertions, 46 deletions
@@ -6,6 +6,7 @@ cLCARSNGConfig Config; cLCARSNGConfig::cLCARSNGConfig(void) { Margin = 2; + displayError0 = 0; displInfoMenuEPG = 0; displInfoMenuTimer = 0; displInfoMenuRec = 0; @@ -49,7 +50,8 @@ cLCARSNGConfig::cLCARSNGConfig(void) bool cLCARSNGConfig::SetupParse(const char *Name, const char *Value) { - if (!strcasecmp(Name, "Margin")) Margin = atoi(Value); + if (!strcasecmp(Name, "Margin")) Margin = atoi(Value); + else if (!strcasecmp(Name, "DisplayError0")) displayError0 = atoi(Value); else if (!strcasecmp(Name, "DisplInfoMenuEPG")) displInfoMenuEPG = atoi(Value); else if (!strcasecmp(Name, "DisplInfoMenuTimer")) displInfoMenuTimer = atoi(Value); else if (!strcasecmp(Name, "DisplInfoMenuRec")) displInfoMenuRec = atoi(Value); @@ -58,19 +60,19 @@ bool cLCARSNGConfig::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name, "FadeInTime")) fadeinTime = atoi(Value); else if (!strcasecmp(Name, "ScrollPixel")) scrollPixel = atoi(Value); else if (!strcasecmp(Name, "FramesPerSecond")) framesPerSecond = atoi(Value); - else if (!strcasecmp(Name, "MainMenue")) mcMainScaled = atoi(Value); - else if (!strcasecmp(Name, "ScheduleMenue")) mcScheduleScaled = atoi(Value); - else if (!strcasecmp(Name, "ChannelMenue")) mcChannelScaled = atoi(Value); - else if (!strcasecmp(Name, "TimerMenue")) mcTimerScaled = atoi(Value); - else if (!strcasecmp(Name, "RecordingMenue")) mcRecordingScaled = atoi(Value); - else if (!strcasecmp(Name, "PluginMenue")) mcPluginScaled = atoi(Value); - else if (!strcasecmp(Name, "SetupMenue")) mcSetupScaled = atoi(Value); - else if (!strcasecmp(Name, "CommandMenue")) mcCommandScaled = atoi(Value); - else if (!strcasecmp(Name, "EventMenue")) mcEventScaled = atoi(Value); -// else if (!strcasecmp(Name, "TextMenue")) mcTextScaled = atoi(Value); -// else if (!strcasecmp(Name, "FolderMenue")) mcFolderScaled = atoi(Value); -// else if (!strcasecmp(Name, "CamMenue")) mcCamScaled = atoi(Value); - else if (!strcasecmp(Name, "DefaultMenue")) mcDefaultScaled = atoi(Value); + else if (!strcasecmp(Name, "MainMenue")) mcMainScaled = atoi(Value); + else if (!strcasecmp(Name, "ScheduleMenue")) mcScheduleScaled = atoi(Value); + else if (!strcasecmp(Name, "ChannelMenue")) mcChannelScaled = atoi(Value); + else if (!strcasecmp(Name, "TimerMenue")) mcTimerScaled = atoi(Value); + else if (!strcasecmp(Name, "RecordingMenue")) mcRecordingScaled = atoi(Value); + else if (!strcasecmp(Name, "PluginMenue")) mcPluginScaled = atoi(Value); + else if (!strcasecmp(Name, "SetupMenue")) mcSetupScaled = atoi(Value); + else if (!strcasecmp(Name, "CommandMenue")) mcCommandScaled = atoi(Value); + else if (!strcasecmp(Name, "EventMenue")) mcEventScaled = atoi(Value); +// else if (!strcasecmp(Name, "TextMenue")) mcTextScaled = atoi(Value); +// else if (!strcasecmp(Name, "FolderMenue")) mcFolderScaled = atoi(Value); +// else if (!strcasecmp(Name, "CamMenue")) mcCamScaled = atoi(Value); + else if (!strcasecmp(Name, "DefaultMenue")) mcDefaultScaled = atoi(Value); else return false; return true; @@ -8,6 +8,7 @@ enum viewMode { class cLCARSNGConfig { public: int Margin; + int displayError0; int displInfoMenuEPG; int displInfoMenuTimer; int displInfoMenuRec; diff --git a/displaymenu.c b/displaymenu.c index aa02f56..52b4359 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -1507,7 +1507,7 @@ void cLCARSNGDisplayMenu::SetRecording(const cRecording *Recording) xt -= w + xi02 - xi01; } #if (APIVERSNUM >= 20505) - if (Info->Errors() > 0) { + if (Info->Errors() >= (1 - Config.displayError0)) { cString buffer = cString::sprintf(" %d %s ", Info->Errors(), tr("errors")); const cFont *font = cFont::GetFont(fontSml); int w = font->Width(buffer); @@ -1766,7 +1766,7 @@ void cDrawDescription::Draw(void) bool space = false; #if (APIVERSNUM >= 20505) - if (Recording && Info->Errors() >= 0) { + if (Recording && Info->Errors() >= (1 - Config.displayError0)) { cString buffer = cString::sprintf("%s %i ", tr("TS Errors:"), Info->Errors()); w = font->Width(buffer); BracketPixmap->DrawText(cPoint(x00 + textwidth - w, y00), buffer, Theme.Color(clrMenuMainBracket), textColorBg, font, w); // error in recording diff --git a/po/de_DE.po b/po/de_DE.po index 01e89fb..13c7c2c 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: SkinLcarsng 0.0.2\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2021-07-02 15:17+0200\n" +"POT-Creation-Date: 2021-07-19 12:30+0200\n" "PO-Revision-Date: 2017-10-18 12:01+0200\n" "Last-Translator: Karl Melscher <kamel5@gmx.net>\n" "Language-Team: <vdr@linuxtv.org>\n" @@ -69,6 +69,9 @@ msgstr "Schmales Bild" msgid "Margin" msgstr "Rand" +msgid "Display Error 0" +msgstr "0 Fehler anzeigen" + msgid "Display description:" msgstr "Beschreibung anzeigen:" @@ -16,8 +16,10 @@ cLCARSNGSetup::cLCARSNGSetup() { menuView[2] = tr("split screen"); menuView[3] = tr("thin screen"); - Add(new cMenuEditIntItem(tr("Margin"), &tmpConfig.Margin, 0, 5)); + Add(new cMenuEditIntItem(tr("Margin"), &tmpConfig.Margin, 0, 5)); + Add(new cMenuEditBoolItem(tr("Display Error 0"), &tmpConfig.displayError0)); + Add(new cOsdItem("", osUnknown, false)); Add(new cOsdItem(tr("Display description:"), osUnknown, false)); Add(new cMenuEditBoolItem(tr("In menu epg"), &tmpConfig.displInfoMenuEPG)); Add(new cMenuEditBoolItem(tr("In menu timer"), &tmpConfig.displInfoMenuTimer)); @@ -28,20 +30,21 @@ cLCARSNGSetup::cLCARSNGSetup() { Add(new cMenuEditIntItem(tr("ScrollPixel"), &tmpConfig.scrollPixel, 1, 10)); Add(new cMenuEditIntItem(tr("Refreshrate (Frames/s)"), &tmpConfig.framesPerSecond, 10, 60)); - Add(new cOsdItem(tr("Menue view:"), osUnknown, false)); - Add(new cMenuEditStraItem(tr("main menue"), &tmpConfig.mcMainScaled, 2, menuView)); - Add(new cMenuEditStraItem(tr("schedule menue"), &tmpConfig.mcScheduleScaled, 3, menuView)); - Add(new cMenuEditStraItem(tr("event menue"), &tmpConfig.mcEventScaled, 3, menuView)); - Add(new cMenuEditStraItem(tr("channel menue"), &tmpConfig.mcChannelScaled, 4, menuView)); - Add(new cMenuEditStraItem(tr("timer menue"), &tmpConfig.mcTimerScaled, 3, menuView)); - Add(new cMenuEditStraItem(tr("recording menue"), &tmpConfig.mcRecordingScaled, 3, menuView)); - Add(new cMenuEditStraItem(tr("setup menue"), &tmpConfig.mcSetupScaled, 3, menuView)); - Add(new cMenuEditStraItem(tr("command menue"), &tmpConfig.mcCommandScaled, 3, menuView)); - Add(new cMenuEditStraItem(tr("plugin menue"), &tmpConfig.mcPluginScaled, 3, menuView)); -// Add(new cMenuEditStraItem(tr("Text menue"), &tmpConfig.mcTextScaled)); -// Add(new cMenuEditStraItem(tr("Folder menue"), &tmpConfig.mcFolderScaled)); -// Add(new cMenuEditStraItem(tr("Cam menue"), &tmpConfig.mcCamScaled)); - Add(new cMenuEditStraItem(tr("Default view"), &tmpConfig.mcDefaultScaled, 3, menuView)); + Add(new cOsdItem("", osUnknown, false)); + Add(new cOsdItem(tr("Menue view:"), osUnknown, false)); + Add(new cMenuEditStraItem(tr("main menue"), &tmpConfig.mcMainScaled, 2, menuView)); + Add(new cMenuEditStraItem(tr("schedule menue"), &tmpConfig.mcScheduleScaled, 3, menuView)); + Add(new cMenuEditStraItem(tr("event menue"), &tmpConfig.mcEventScaled, 3, menuView)); + Add(new cMenuEditStraItem(tr("channel menue"), &tmpConfig.mcChannelScaled, 4, menuView)); + Add(new cMenuEditStraItem(tr("timer menue"), &tmpConfig.mcTimerScaled, 3, menuView)); + Add(new cMenuEditStraItem(tr("recording menue"), &tmpConfig.mcRecordingScaled, 3, menuView)); + Add(new cMenuEditStraItem(tr("setup menue"), &tmpConfig.mcSetupScaled, 3, menuView)); + Add(new cMenuEditStraItem(tr("command menue"), &tmpConfig.mcCommandScaled, 3, menuView)); + Add(new cMenuEditStraItem(tr("plugin menue"), &tmpConfig.mcPluginScaled, 3, menuView)); +// Add(new cMenuEditStraItem(tr("Text menue"), &tmpConfig.mcTextScaled)); +// Add(new cMenuEditStraItem(tr("Folder menue"), &tmpConfig.mcFolderScaled)); +// Add(new cMenuEditStraItem(tr("Cam menue"), &tmpConfig.mcCamScaled)); + Add(new cMenuEditStraItem(tr("Default view"), &tmpConfig.mcDefaultScaled, 3, menuView)); SetCurrent(Get(currentItem)); Display(); @@ -50,7 +53,8 @@ cLCARSNGSetup::cLCARSNGSetup() { void cLCARSNGSetup::Store(void) { Config = tmpConfig; - SetupStore("Margin", Config.Margin); + SetupStore("Margin", Config.Margin); + SetupStore("DisplayError0", Config.displayError0); SetupStore("DisplInfoMenuEPG", Config.displInfoMenuEPG); SetupStore("DisplInfoMenuTimer", Config.displInfoMenuTimer); SetupStore("DisplInfoMenuRec", Config.displInfoMenuRec); @@ -59,17 +63,17 @@ void cLCARSNGSetup::Store(void) { SetupStore("FadeInTime", Config.fadeinTime); SetupStore("ScrollPixel", Config.scrollPixel); SetupStore("FramesPerSecond", Config.framesPerSecond); - SetupStore("MainMenue", Config.mcMainScaled); - SetupStore("ScheduleMenue", Config.mcScheduleScaled); - SetupStore("ChannelMenue", Config.mcChannelScaled); - SetupStore("TimerMenue", Config.mcTimerScaled); - SetupStore("RecordingMenue", Config.mcRecordingScaled); - SetupStore("PluginMenue", Config.mcPluginScaled); - SetupStore("SetupMenue", Config.mcSetupScaled); - SetupStore("CommandMenue", Config.mcCommandScaled); - SetupStore("EventMenue", Config.mcEventScaled); -// SetupStore("TextMenue", Config.mcTextScaled); -// SetupStore("FolderMenue", Config.mcFolderScaled); -// SetupStore("CamMenue", Config.mcCamScaled); - SetupStore("DefaultMenue", Config.mcDefaultScaled); + SetupStore("MainMenue", Config.mcMainScaled); + SetupStore("ScheduleMenue", Config.mcScheduleScaled); + SetupStore("ChannelMenue", Config.mcChannelScaled); + SetupStore("TimerMenue", Config.mcTimerScaled); + SetupStore("RecordingMenue", Config.mcRecordingScaled); + SetupStore("PluginMenue", Config.mcPluginScaled); + SetupStore("SetupMenue", Config.mcSetupScaled); + SetupStore("CommandMenue", Config.mcCommandScaled); + SetupStore("EventMenue", Config.mcEventScaled); +// SetupStore("TextMenue", Config.mcTextScaled); +// SetupStore("FolderMenue", Config.mcFolderScaled); +// SetupStore("CamMenue", Config.mcCamScaled); + SetupStore("DefaultMenue", Config.mcDefaultScaled); } |