diff options
author | louis <louis.braun@gmx.de> | 2013-09-14 15:33:53 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-14 15:33:53 +0200 |
commit | 5f7c1322d1b379b3434ade772081e4a86849c96c (patch) | |
tree | 1918850d93d021608b405dca62fc327725c4bd6f | |
parent | 48e4fa3c8bf91bb7506059ced8ff333126a0c492 (diff) | |
download | skin-nopacity-5f7c1322d1b379b3434ade772081e4a86849c96c.tar.gz skin-nopacity-5f7c1322d1b379b3434ade772081e4a86849c96c.tar.bz2 |
added event length in header and configurable border in detailed event and recording view
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | displaymenuview.c | 4 | ||||
-rw-r--r-- | menudetailview.c | 48 | ||||
-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 | 4 |
10 files changed, 85 insertions, 37 deletions
@@ -265,3 +265,7 @@ Version 0.1.4 - dedicated theme colors for timer backgrounds in main menu (closes Feature 1463) - dedicated theme colors for RSS Feed (closes Feature 1485) +- added event length in header in detailed EPG and recording view (closes + Feature 1469) +- added separate configurable border around detailed epg view and detailed + recording view @@ -125,6 +125,8 @@ cNopacityConfig::cNopacityConfig() { epgImageWidthLarge = 525; epgImageHeightLarge = 400; menuRecFolderSize = 128; + borderDetailedEPG = 30; + borderDetailedRecordings = 30; fontHeader = 0; fontDate = 0; fontMenuitemLarge = 0; @@ -406,6 +408,8 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "epgImageWidthLarge") == 0) epgImageWidthLarge = atoi(Value); else if (strcmp(Name, "epgImageHeightLarge") == 0) epgImageHeightLarge = atoi(Value); else if (strcmp(Name, "menuRecFolderSize") == 0) menuRecFolderSize = atoi(Value); + else if (strcmp(Name, "borderDetailedEPG") == 0) borderDetailedEPG = atoi(Value); + else if (strcmp(Name, "borderDetailedRecordings") == 0) borderDetailedRecordings = atoi(Value); else if (strcmp(Name, "fontHeader") == 0) fontHeader = atoi(Value); else if (strcmp(Name, "fontDate") == 0) fontDate = atoi(Value); else if (strcmp(Name, "fontMenuitemLarge") == 0) fontMenuitemLarge = atoi(Value); @@ -158,6 +158,8 @@ class cNopacityConfig { int epgImageWidthLarge; int epgImageHeightLarge; int menuRecFolderSize; + int borderDetailedEPG; + int borderDetailedRecordings; int fontHeader; int fontDate; int fontMenuitemLarge; diff --git a/displaymenuview.c b/displaymenuview.c index b12762a..ab4c9b6 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -827,15 +827,17 @@ void cNopacityDisplayMenuView::SetDetailViewSize(eDetailViewType detailViewType, int width = 0; int height = 0; int top = 0; - int contentBorder = 20; + int contentBorder = 30; int detailHeaderHeight = 0; switch (detailViewType) { case dvEvent: detailHeaderHeight = max(config.detailViewLogoHeight, config.epgImageHeight)+4; + contentBorder = config.borderDetailedEPG; break; case dvRecording: detailHeaderHeight = config.epgImageHeight + 4; + contentBorder = config.borderDetailedRecordings; break; case dvText: detailHeaderHeight = 0; diff --git a/menudetailview.c b/menudetailview.c index 160e6c3..abf833d 100644 --- a/menudetailview.c +++ b/menudetailview.c @@ -343,14 +343,14 @@ void cNopacityMenuDetailEventView::SetContentHeight(void) { heightEPGPics = HeightEPGPics(); } - yBanner = 0; - yEPGText = heightBanner; - yActors = heightBanner + heightEPG; - yFanart = heightBanner + heightEPG + heightActors; - yAddInf = heightBanner + heightEPG + heightActors + heightFanart; - yEPGPics = heightBanner + heightEPG + heightActors + heightFanart + heightReruns; + yBanner = border; + yEPGText = yBanner + heightBanner; + yAddInf = yEPGText + heightEPG; + yActors = yAddInf + heightReruns; + yFanart = yActors + heightActors; + yEPGPics = yFanart + heightFanart; - int totalHeight = heightBanner + heightEPG + heightActors + heightFanart + heightReruns + heightEPGPics; + int totalHeight = 2 * border + heightBanner + heightEPG + heightActors + heightFanart + heightReruns + heightEPGPics; //check if pixmap content has to be scrollable if (totalHeight > contentHeight) { contentDrawPortHeight = totalHeight; @@ -466,7 +466,13 @@ void cNopacityMenuDetailEventView::DrawHeader(void) { } int lineHeight = fontHeaderLarge->Height(); - cString dateTime = cString::sprintf("%s %s - %s", *event->GetDateString(), *event->GetTimeString(), *event->GetEndTimeString()); + cString dateTime; + time_t vps = event->Vps(); + if (vps) { + dateTime = cString::sprintf("%s %s - %s (%d %s) VPS: %s", *event->GetDateString(), *event->GetTimeString(), *event->GetEndTimeString(), event->Duration()/60, tr("min"), *TimeString(vps)); + } else { + dateTime = cString::sprintf("%s %s - %s (%d %s)", *event->GetDateString(), *event->GetTimeString(), *event->GetEndTimeString(), event->Duration()/60, tr("min")); + } pixmapHeader->DrawText(cPoint(logoWidth + 2*border, (lineHeight - fontHeader->Height())/2), *dateTime, Theme.Color(clrMenuFontDetailViewHeader), clrTransparent, fontHeader); cTextWrapper title; @@ -655,14 +661,14 @@ void cNopacityMenuDetailRecordingView::SetContentHeight(void) { //additional recording Info int heightAdditionalInfo = (additionalInfo.Lines() + 1) * lineHeight; - yBanner = 0; - yEPGText = heightBanner; - yActors = heightBanner + heightEPG; - yFanart = heightBanner + heightEPG + heightActors; - yEPGPics = heightBanner + heightEPG + heightActors + heightFanart; - yAddInf = heightBanner + heightEPG + heightActors + heightFanart + heightEPGPics; + yBanner = border; + yEPGText = yBanner + heightBanner; + yActors = yEPGText + heightEPG; + yFanart = yActors + heightActors; + yEPGPics = yFanart + heightFanart; + yAddInf = yEPGPics + heightEPGPics; - int totalHeight = heightBanner + heightEPG + heightActors + heightFanart + heightAdditionalInfo + heightEPGPics; + int totalHeight = 2*border + heightBanner + heightEPG + heightActors + heightFanart + heightAdditionalInfo + heightEPGPics; //check if pixmap content has to be scrollable if (totalHeight > contentHeight) { contentDrawPortHeight = totalHeight; @@ -794,7 +800,7 @@ void cNopacityMenuDetailRecordingView::DrawEPGPictures(int height) { void cNopacityMenuDetailRecordingView::DrawHeader(void) { cImageLoader imgLoader; - int widthTextHeader = width - 4 * border; + int widthTextHeader = width - 2 * border; if (imgLoader.LoadRecordingImage(recording->FileName())) { pixmapHeader->DrawImage(cPoint(width - config.epgImageWidth - border, (headerHeight-config.epgImageHeight)/2), imgLoader.GetImage()); if (config.roundedCorners) { @@ -811,8 +817,10 @@ void cNopacityMenuDetailRecordingView::DrawHeader(void) { widthTextHeader -= config.epgImageWidth; } int lineHeight = fontHeaderLarge->Height(); - cString dateTime = cString::sprintf("%s %s", *DateString(recording->Start()), *TimeString(recording->Start())); - pixmapHeader->DrawText(cPoint(2*border, (lineHeight - fontHeader->Height())/2), *dateTime, Theme.Color(clrMenuFontDetailViewHeader), clrTransparent, fontHeader); + int recDuration = recording->LengthInSeconds(); + recDuration = (recDuration>0)?(recDuration / 60):0; + cString dateTime = cString::sprintf("%s %s (%d %s)", *DateString(recording->Start()), *TimeString(recording->Start()), recDuration, tr("min")); + pixmapHeader->DrawText(cPoint(border, (lineHeight - fontHeader->Height())/2), *dateTime, Theme.Color(clrMenuFontDetailViewHeader), clrTransparent, fontHeader); const char *Title = info->Title(); if (isempty(Title)) @@ -821,7 +829,7 @@ void cNopacityMenuDetailRecordingView::DrawHeader(void) { title.Set(Title, fontHeaderLarge, widthTextHeader); int currentLineHeight = lineHeight; for (int i=0; i < title.Lines(); i++) { - pixmapHeader->DrawText(cPoint(2*border, currentLineHeight), title.GetLine(i), Theme.Color(clrMenuFontDetailViewHeaderTitle), clrTransparent, fontHeaderLarge); + pixmapHeader->DrawText(cPoint(border, currentLineHeight), title.GetLine(i), Theme.Color(clrMenuFontDetailViewHeaderTitle), clrTransparent, fontHeaderLarge); currentLineHeight += lineHeight; } @@ -830,7 +838,7 @@ void cNopacityMenuDetailRecordingView::DrawHeader(void) { shortText.Set(info->ShortText(), fontHeader, widthTextHeader); for (int i=0; i < shortText.Lines(); i++) { if ((currentLineHeight + fontHeader->Height()) < headerHeight) { - pixmapHeader->DrawText(cPoint(2*border, currentLineHeight), shortText.GetLine(i), Theme.Color(clrMenuFontDetailViewHeader), clrTransparent, fontHeader); + pixmapHeader->DrawText(cPoint(border, currentLineHeight), shortText.GetLine(i), Theme.Color(clrMenuFontDetailViewHeader), clrTransparent, fontHeader); currentLineHeight += fontHeader->Height(); } else break; diff --git a/po/ca_ES.po b/po/ca_ES.po index 4934a7c..9f06ca2 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: 2013-09-09 17:46+0200\n" +"POT-Creation-Date: 2013-09-14 15:23+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan <gbonich@gmail.com>\n" "Language-Team: \n" @@ -29,6 +29,9 @@ msgstr "Volum" msgid "Actors" msgstr "" +msgid "min" +msgstr "min" + msgid "RERUNS OF THIS SHOW" msgstr "REEMISSIONS" @@ -59,9 +62,6 @@ msgstr "No hi ha informació EPG" msgid "Duration" msgstr "Durada" -msgid "min" -msgstr "min" - msgid "recording" msgstr "gravació" @@ -302,6 +302,9 @@ msgstr "Velocitat desplaçament text finestra EPG" msgid "Height of EPG Info Window (Percent of OSD Height)" msgstr "Alçada Finestra Info EPG (% alçada OSD)" +msgid "Border around detailed EPG view" +msgstr "" + msgid "Display Reruns in detailed EPG View" msgstr "Mostra Reemissions a vista detallada EPG" @@ -362,6 +365,9 @@ msgstr "" msgid "Number of EPG Entries in Schedules Info Window" msgstr "Nombre d'entrades EPG a la Finestra de Programació" +msgid "Border around detailed recording view" +msgstr "" + msgid "Display additional EPG Pictures in detailed recording View" msgstr "Mostra imatges EPG addicionals a vista detallada gravacions" diff --git a/po/de_DE.po b/po/de_DE.po index 00bc393..de4193b 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: 2013-09-09 17:46+0200\n" +"POT-Creation-Date: 2013-09-14 15:23+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -26,6 +26,9 @@ msgstr "Lautstärke" msgid "Actors" msgstr "Schauspieler" +msgid "min" +msgstr "min" + msgid "RERUNS OF THIS SHOW" msgstr "Wiederholungen dieser Sendung" @@ -56,9 +59,6 @@ msgstr "Keine EPG Informationen verfügbar" msgid "Duration" msgstr "Dauer" -msgid "min" -msgstr "min" - msgid "recording" msgstr "Aufnahme" @@ -299,6 +299,9 @@ msgstr "Text Scroll Geschwindigkeit des EPG Fensters" msgid "Height of EPG Info Window (Percent of OSD Height)" msgstr "Höhe des EPG Info Fensters (% der OSD Höhe)" +msgid "Border around detailed EPG view" +msgstr "Rahmen um detailierte EPG Ansicht" + msgid "Display Reruns in detailed EPG View" msgstr "Wiederholungen in der detailierten EPG Ansicht anzeigen" @@ -359,6 +362,9 @@ 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 "Border around detailed recording view" +msgstr "Rahmen um detailierte Aufnahmeansicht" + msgid "Display additional EPG Pictures in detailed recording View" msgstr "Weitere EPG Bilder in der detaillierten Aufnahmeansicht anzeigen" diff --git a/po/it_IT.po b/po/it_IT.po index 180440b..8f18df7 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: 2013-09-09 17:46+0200\n" +"POT-Creation-Date: 2013-09-14 15:23+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -29,6 +29,9 @@ msgstr "Volume" msgid "Actors" msgstr "" +msgid "min" +msgstr "min" + msgid "RERUNS OF THIS SHOW" msgstr "REPLICHE DI QUESTO SPETTACOLO" @@ -59,9 +62,6 @@ msgstr "" msgid "Duration" msgstr "Durata" -msgid "min" -msgstr "min" - msgid "recording" msgstr "registrazione" @@ -302,6 +302,9 @@ msgstr "Velocità scorrimento testo finestra EPG" msgid "Height of EPG Info Window (Percent of OSD Height)" msgstr "Altezza di Finestra info EPG (% altezza OSD)" +msgid "Border around detailed EPG view" +msgstr "" + msgid "Display Reruns in detailed EPG View" msgstr "Mostra repliche in vista dettagli EPG" @@ -362,6 +365,9 @@ msgstr "" msgid "Number of EPG Entries in Schedules Info Window" msgstr "" +msgid "Border around detailed recording view" +msgstr "" + msgid "Display additional EPG Pictures in detailed recording View" msgstr "Mostra immagini EPG aggiuntivo nella vista dettagli registrazione" diff --git a/po/sk_SK.po b/po/sk_SK.po index 0c91eeb..fefd3e7 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinnopacity 0.0.6\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-09-09 17:46+0200\n" +"POT-Creation-Date: 2013-09-14 15:23+0200\n" "PO-Revision-Date: 2013-03-12 15:59+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -29,6 +29,9 @@ msgstr "Hlasitos»" msgid "Actors" msgstr "" +msgid "min" +msgstr "min" + msgid "RERUNS OF THIS SHOW" msgstr "Repríza" @@ -59,9 +62,6 @@ msgstr "" msgid "Duration" msgstr "Då¾ka" -msgid "min" -msgstr "min" - msgid "recording" msgstr "nahraté" @@ -302,6 +302,9 @@ msgstr "Rýchlos» rolovania textu v okne EPG" msgid "Height of EPG Info Window (Percent of OSD Height)" msgstr "Vý¹ka informaèného EPG okna (Percent z OSD vý¹ky)" +msgid "Border around detailed EPG view" +msgstr "" + msgid "Display Reruns in detailed EPG View" msgstr "Zobrazi» reprízy v podrobnostiach EPG" @@ -362,6 +365,9 @@ msgstr "" msgid "Number of EPG Entries in Schedules Info Window" msgstr "" +msgid "Border around detailed recording view" +msgstr "" + msgid "Display additional EPG Pictures in detailed recording View" msgstr "Zobrazi» ïal¹ie EPG obrázky v podrobnom zobrazení nahrávky" @@ -180,6 +180,8 @@ void cNopacitySetup::Store(void) { SetupStore("epgImageWidthLarge", config.epgImageWidthLarge); SetupStore("epgImageHeightLarge", config.epgImageHeightLarge); SetupStore("menuRecFolderSize", config.menuRecFolderSize); + SetupStore("borderDetailedEPG", config.borderDetailedEPG); + SetupStore("borderDetailedRecordings", config.borderDetailedRecordings); SetupStore("fontHeader", config.fontHeader); SetupStore("fontDate", config.fontDate); SetupStore("fontMenuitemLarge", config.fontMenuitemLarge); @@ -371,6 +373,7 @@ void cNopacitySetupMenuDisplaySchedules::Set(void) { Add(new cMenuEditIntItem(tr("EPG Window Scroll Delay in s"), &tmpNopacityConfig->menuInfoScrollDelay, 0, 10)); Add(new cMenuEditStraItem(tr("EPG Window Text Scrolling Speed"), &tmpNopacityConfig->menuInfoScrollSpeed, 4, scrollSpeed)); Add(new cMenuEditIntItem(tr("Height of EPG Info Window (Percent of OSD Height)"), &tmpNopacityConfig->menuHeightInfoWindow, 10, 100)); + Add(new cMenuEditIntItem(tr("Border around detailed EPG view"), &tmpNopacityConfig->borderDetailedEPG, 1, 300)); Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpNopacityConfig->displayRerunsDetailEPGView)); if (tmpNopacityConfig->displayRerunsDetailEPGView) { Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of reruns to display")), &tmpNopacityConfig->numReruns, 1, 10)); @@ -457,6 +460,7 @@ void cNopacitySetupMenuDisplayRecordings::Set(void) { Add(new cMenuEditBoolItem(tr("Use narrow menu"), &tmpNopacityConfig->narrowRecordingMenu)); if (tmpNopacityConfig->narrowRecordingMenu) Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthRecordings, 10, 97)); + Add(new cMenuEditIntItem(tr("Border around detailed recording view"), &tmpNopacityConfig->borderDetailedRecordings, 1, 300)); Add(new cMenuEditStraItem(tr("Display additional EPG Pictures in detailed recording View"), &tmpNopacityConfig->displayAdditionalRecEPGPictures, 3, displayEPGPictures)); if (tmpNopacityConfig->displayAdditionalRecEPGPictures) Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of EPG pictures to display")), &tmpNopacityConfig->numAdditionalRecEPGPictures, 1, 9)); |