diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-05-12 13:39:59 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-05-21 10:46:28 +0200 |
commit | 64fefa4aa00826d4f4aef21428e997d7e6ed1c36 (patch) | |
tree | f9d167e345ab76f9c79be577308d9a2f1e15fe28 | |
parent | 54804b722f04e0e97746243e3563a96c384e0121 (diff) | |
download | skin-nopacity-64fefa4aa00826d4f4aef21428e997d7e6ed1c36.tar.gz skin-nopacity-64fefa4aa00826d4f4aef21428e997d7e6ed1c36.tar.bz2 |
Add setup option to display the channellogobackground only if a channellogo ist present or not present
-rw-r--r-- | displaychannelview.c | 13 | ||||
-rw-r--r-- | po/ca_ES.po | 14 | ||||
-rw-r--r-- | po/de_DE.po | 14 | ||||
-rw-r--r-- | po/it_IT.po | 14 | ||||
-rw-r--r-- | po/sk_SK.po | 14 | ||||
-rw-r--r-- | setup.c | 6 | ||||
-rw-r--r-- | setup.h | 1 |
7 files changed, 54 insertions, 22 deletions
diff --git a/displaychannelview.c b/displaychannelview.c index e0e7f98..caebefc 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -225,15 +225,18 @@ void cNopacityDisplayChannelView::DrawBackground(void) { } void cNopacityDisplayChannelView::DrawChannelLogo(const cChannel *Channel) { - if (config.GetValue("displayType") != dtFlat && config.GetValue("channelUseLogoBackground")) { - cImage *imgLogoBack = imgCache->GetSkinElement(seChannelLogoBack); - if (imgLogoBack) - pixmapLogoBackground->DrawImage(cPoint((geoManager->channelLogoBgWidth - imgLogoBack->Width()) / 2, (geoManager->channelLogoBgHeight - imgLogoBack->Height()) / 2), *imgLogoBack); - } cImage *imgLogo = imgCache->GetLogo(ctLogo, Channel); if (imgLogo) { pixmapLogo->DrawImage(cPoint((geoManager->channelLogoWidth - imgLogo->Width()) / 2, (geoManager->channelLogoHeight - imgLogo->Height()) / 2), *imgLogo); } + + if (config.GetValue("displayType") != dtFlat && ((config.GetValue("channelUseLogoBackground") == 1) + || ((config.GetValue("channelUseLogoBackground") == 2) && imgLogo) + || ((config.GetValue("channelUseLogoBackground") == 3) && !imgLogo))) { + cImage *imgLogoBack = imgCache->GetSkinElement(seChannelLogoBack); + if (imgLogoBack) + pixmapLogoBackground->DrawImage(cPoint((geoManager->channelLogoBgWidth - imgLogoBack->Width()) / 2, (geoManager->channelLogoBgHeight - imgLogoBack->Height()) / 2), *imgLogoBack); + } } void cNopacityDisplayChannelView::ClearChannelLogo(void) { diff --git a/po/ca_ES.po b/po/ca_ES.po index 46a1006..002e1e2 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: 2022-01-12 15:39+0100\n" +"POT-Creation-Date: 2022-05-12 13:42+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan <gbonich@gmail.com>\n" "Language-Team: \n" @@ -482,15 +482,15 @@ 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 "Mode of recording Window" +msgstr "Mode de gravació" + msgid "Border around detailed recording view" msgstr "Vora al voltant de vista registre detallat" @@ -575,6 +575,12 @@ msgstr "" msgid "bottom" msgstr "" +msgid "if channel logo is present" +msgstr "" + +msgid "if channel logo is not present" +msgstr "" + msgid "show elapsed time" msgstr "mostra temps transcorregut" diff --git a/po/de_DE.po b/po/de_DE.po index 68dd316..646de0d 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: 2022-01-12 15:39+0100\n" +"POT-Creation-Date: 2022-05-12 13:42+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -479,15 +479,15 @@ 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 "Mode of recording Window" +msgstr "Aufnahme Fenster Modus" + msgid "Border around detailed recording view" msgstr "Rahmen um detailierte Aufnahmeansicht" @@ -572,6 +572,12 @@ msgstr "mittig" msgid "bottom" msgstr "unten" +msgid "if channel logo is present" +msgstr "wenn ein Kanallogo existiert" + +msgid "if channel logo is not present" +msgstr "wenn kein Kanallogo existiert" + msgid "show elapsed time" msgstr "vergangene Zeit anzeigen" diff --git a/po/it_IT.po b/po/it_IT.po index 8cf07c5..5488522 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: 2022-01-12 15:39+0100\n" +"POT-Creation-Date: 2022-05-12 13:42+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -482,15 +482,15 @@ 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 "Mode of recording Window" +msgstr "" + msgid "Border around detailed recording view" msgstr "" @@ -575,6 +575,12 @@ msgstr "" msgid "bottom" msgstr "" +msgid "if channel logo is present" +msgstr "" + +msgid "if channel logo is not present" +msgstr "" + msgid "show elapsed time" msgstr "" diff --git a/po/sk_SK.po b/po/sk_SK.po index c973809..01d71e3 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: 2022-01-12 15:39+0100\n" +"POT-Creation-Date: 2022-05-12 13:42+0200\n" "PO-Revision-Date: 2013-11-11 20:52+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -479,15 +479,15 @@ 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 "Mode of recording Window" +msgstr "Spôsob zobrazenia okna nahrávok" + msgid "Border around detailed recording view" msgstr "Okraj okolo podrobného zobrazenia nahrávky" @@ -572,6 +572,12 @@ msgstr "" msgid "bottom" msgstr "" +msgid "if channel logo is present" +msgstr "" + +msgid "if channel logo is not present" +msgstr "" + msgid "show elapsed time" msgstr "zobrazi» uplynulý èas" @@ -405,6 +405,10 @@ cNopacitySetupChannelDisplay::cNopacitySetupChannelDisplay(cNopacityConfig* data logoVerticalPos[0] = tr("top"); logoVerticalPos[1] = tr("middle"); logoVerticalPos[2] = tr("bottom"); + useLogoBackground[0] = tr("never"); + useLogoBackground[1] = tr("always"); // default + useLogoBackground[2] = tr("if channel logo is present"); + useLogoBackground[3] = tr("if channel logo is not present"); progressStyleCurrentSchedule[0] = tr("show elapsed time"); progressStyleCurrentSchedule[1] = tr("show remaining time"); Set(); @@ -429,7 +433,7 @@ void cNopacitySetupChannelDisplay::Set(void) { Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo original Width")), tmpConf->GetValueRef("logoWidthOriginal"), 30, 500)); Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo original Height")), tmpConf->GetValueRef("logoHeightOriginal"), 30, 500)); Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Size of the Channel Logo in Percent")), tmpConf->GetValueRef("logoScale"), 50, 100)); - Add(new cMenuEditBoolItem(cString::sprintf("%s%s", *spacer, tr("Use Channel Logo background")), tmpConf->GetValueRef("channelUseLogoBackground"))); + Add(new cMenuEditStraItem(cString::sprintf("%s%s", *spacer, tr("Use Channel Logo background")), tmpConf->GetValueRef("channelUseLogoBackground"), 4, useLogoBackground)); } Add(new cMenuEditStraItem(tr("Kind of time display for current schedule"), tmpConf->GetValueRef("progressCurrentSchedule"), 2, progressStyleCurrentSchedule)); Add(new cMenuEditBoolItem(tr("Display Signal Strength & Quality"), tmpConf->GetValueRef("displaySignalStrength"))); @@ -97,6 +97,7 @@ class cNopacitySetupChannelDisplay : public cMenuSetupSubMenu { protected: const char *logoPos[3]; const char *logoVerticalPos[3]; + const char *useLogoBackground[4]; const char *progressStyleCurrentSchedule[2]; const char *bgStyle[2]; void Set(void); |