diff options
-rw-r--r-- | HISTORY | 5 | ||||
-rw-r--r-- | baserender.c | 2 | ||||
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | displaychannel.c | 9 | ||||
-rw-r--r-- | po/de_DE.po | 17 | ||||
-rw-r--r-- | setup.c | 17 |
7 files changed, 53 insertions, 3 deletions
@@ -1,6 +1,11 @@ VDR Plugin 'skinflatplus' Revision History --------------------------------------- +2014-08-10: Version 0.4.1 +- [add] option to hide "clock" text +- [add] option to set program past/remaining time format (past/remaining, past, remaining) +- [update] plugin settings column width from 30 to 35 + 2014-08-09: Version 0.4.0 - [update] topbar position of text - [update] MVThemes diff --git a/baserender.c b/baserender.c index 23401a77..3d71d59f 100644 --- a/baserender.c +++ b/baserender.c @@ -304,6 +304,8 @@ void cFlatBaseRender::TopBarUpdate(void) { cString time = TimeString(t); cString time2 = cString::sprintf("%s %s", *time, tr("clock")); + if( Config.TopBarHideClockText ) + time2 = cString::sprintf("%s", *time); int timeWidth = topBarFontClock->Width(*time2) + marginItem*2; int Right = TopBarWidth - timeWidth; @@ -26,6 +26,7 @@ cFlatConfig::cFlatConfig(void) { ChannelSimpleAspectFormat = true; ChannelBitrateShow = false; ChannelBitrateShowCalcInterval = 20; + ChannelTimeLeft = 0; RecordingResolutionAspectShow = true; RecordingFormatShow = true; @@ -68,6 +69,7 @@ cFlatConfig::cFlatConfig(void) { ScrollerType = 0; TopBarFontClockScale = 0.01; + TopBarHideClockText = 0; TVScraperChanInfoShowPoster = 1; TVScraperChanInfoPosterSize = 0.01; @@ -257,6 +259,8 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "TopBarFontClockScale") == 0) TopBarFontClockScale = atod(Value); else if (strcmp(Name, "TimeSecsScale") == 0) TimeSecsScale = atod(Value); else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) ChannelBitrateShowCalcInterval = atoi(Value); + else if (strcmp(Name, "TopBarHideClockText") == 0) TopBarHideClockText = atoi(Value); + else if (strcmp(Name, "ChannelTimeLeft") == 0) ChannelTimeLeft = atoi(Value); else return false; @@ -199,6 +199,7 @@ class cFlatConfig int ChannelSimpleAspectFormat; int ChannelBitrateShow; int ChannelBitrateShowCalcInterval; // hidden config + int ChannelTimeLeft; int RecordingResolutionAspectShow; int RecordingFormatShow; int RecordingSimpleAspectFormat; @@ -212,6 +213,7 @@ class cFlatConfig int TopBarRecConflictsHigh; int MenuItemIconsShow; int TopBarMenuIconShow; + int TopBarHideClockText; double MainMenuItemScale; diff --git a/displaychannel.c b/displaychannel.c index 9f253aee..0b76f0f9 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -359,7 +359,14 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi int s = (int)(time(NULL) - Present->StartTime()) / 60; int sleft = (Present->Duration() / 60) - s; - cString seen = cString::sprintf("%d-/%d+ %d min", s, sleft, Present->Duration() / 60); + cString seen; + if( Config.ChannelTimeLeft == 0 ) + seen = cString::sprintf("%d-/%d+ %d min", s, sleft, Present->Duration() / 60); + else if( Config.ChannelTimeLeft == 1 ) + seen = cString::sprintf("%d- %d min", s, Present->Duration() / 60); + else if( Config.ChannelTimeLeft == 2 ) + seen = cString::sprintf("%d+ %d min", sleft, Present->Duration() / 60); + int seenWidth = fontSml->Width(*seen) + fontSml->Width(" "); epg = Present->Title(); diff --git a/po/de_DE.po b/po/de_DE.po index c21d0808..5364cb89 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinflat 0.4.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-08-09 10:05+0200\n" +"POT-Creation-Date: 2014-08-10 11:31+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -252,6 +252,15 @@ msgstr "" msgid "round bar" msgstr "" +msgid "past / remaining" +msgstr "vergangen / verbleibend" + +msgid "past" +msgstr "vergangen" + +msgid "remaining" +msgstr "verbleibend" + msgid "General settings" msgstr "Allgemeine Einstellungen" @@ -333,6 +342,9 @@ msgstr "TopBar zeige Aufnahme" msgid "TopBar show conflicts" msgstr "TopBar zeige Konflikte" +msgid "TopBar hide clock text" +msgstr "TopBar verstecke Uhr Text" + msgid "TopBar clock font scale" msgstr "TopBar Uhr Skalierung" @@ -408,6 +420,9 @@ msgstr "Zeige Video/Audio Bitrate" msgid "Simple aspect & format" msgstr "Einfache Aspekt und Formatanzeige" +msgid "program past/remaining time format" +msgstr "Programm vergangen/verbleibend Format" + msgid "Channelinfo border by decor-file?" msgstr "Kanalinfo Rand von Decordatei?" @@ -13,6 +13,7 @@ cStringList MessageColorPositions; cStringList ScrollerTypes; cStringList ScrollBarTypes; cStringList DiskUsageFree; +cStringList ChannelTimeLefts; int ConfigFileSelection; @@ -105,6 +106,12 @@ void cFlatSetup::Setup(void) { ScrollBarTypes.Append( strdup( tr("rect bar")) ); ScrollBarTypes.Append( strdup( tr("round bar")) ); + ChannelTimeLefts.Clear(); + ChannelTimeLefts.Append( strdup( tr("past / remaining")) ); + ChannelTimeLefts.Append( strdup( tr("past")) ); + ChannelTimeLefts.Append( strdup( tr("remaining")) ); + + Add(new cOsdItem(tr("General settings"), osUnknown, true)); Add(new cOsdItem(tr("Channelinfo settings"), osUnknown, true)); Add(new cOsdItem(tr("Menu settings"), osUnknown, true)); @@ -260,6 +267,8 @@ void cFlatSetup::Store(void) { SetupStore("TimeSecsScale", dtoa(Config.TimeSecsScale)); SetupStore("ChannelBitrateShow", Config.ChannelBitrateShow); SetupStore("ChannelBitrateShowCalcInterval", Config.ChannelBitrateShowCalcInterval); + SetupStore("TopBarHideClockText", Config.TopBarHideClockText); + SetupStore("ChannelTimeLeft", Config.ChannelTimeLeft); Config.Init(); } @@ -399,6 +408,8 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "TopBarFontClockScale") == 0) SetupConfig->TopBarFontClockScale = atod(Value); else if (strcmp(Name, "TimeSecsScale") == 0) SetupConfig->TimeSecsScale = atod(Value); else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) SetupConfig->ChannelBitrateShowCalcInterval = atoi(Value); + else if (strcmp(Name, "TopBarHideClockText") == 0) SetupConfig->TopBarHideClockText = atoi(Value); + else if (strcmp(Name, "ChannelTimeLeft") == 0) SetupConfig->ChannelTimeLeft = atoi(Value); else return false; @@ -521,13 +532,15 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) { Config.Store("TimeSecsScale", dtoa(Config.TimeSecsScale), *Filename); Config.Store("ChannelBitrateShow", SetupConfig->ChannelBitrateShow, *Filename); Config.Store("ChannelBitrateShowCalcInterval", SetupConfig->ChannelBitrateShowCalcInterval, *Filename); + Config.Store("TopBarHideClockText", SetupConfig->TopBarHideClockText, *Filename); + Config.Store("ChannelTimeLeft", SetupConfig->ChannelTimeLeft, *Filename); cString msg = cString::sprintf("%s %s", tr("saved settings in file:"), *File); Skins.Message(mtInfo, msg); } //------------------------------------------------------------------------------------------------------------------ -cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cFlatConfig* data) : cOsdMenu(Title, 30) { +cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cFlatConfig* data) : cOsdMenu(Title, 35) { SetupConfig = data; ItemLastSel = -1; } @@ -583,6 +596,7 @@ void cFlatSetupGeneral::Setup(void) { Add(new cMenuEditPrcItem(tr("TopBar font size"), &SetupConfig->TopBarFontSize, 0.01, 0.2, 1)); Add(new cMenuEditBoolItem(tr("TopBar show recording"), &SetupConfig->TopBarRecordingShow)); Add(new cMenuEditBoolItem(tr("TopBar show conflicts"), &SetupConfig->TopBarRecConflictsShow)); + Add(new cMenuEditBoolItem(tr("TopBar hide clock text"), &SetupConfig->TopBarHideClockText)); Add(new cMenuEditPrcItem(tr("TopBar clock font scale"), &SetupConfig->TopBarFontClockScale, 0.005, 0.02, 1)); Add(new cMenuEditIntItem(tr("Conflicts min value for red"), &SetupConfig->TopBarRecConflictsHigh)); Add(new cMenuEditIntItem(tr("Message bottom offset"), &SetupConfig->MessageOffset)); @@ -696,6 +710,7 @@ void cFlatSetupChannelInfo::Setup(void) { Add(new cMenuEditBoolItem(tr("Show format (hd/sd)"), &SetupConfig->ChannelFormatShow)); Add(new cMenuEditBoolItem(tr("Show video/audio bitrate"), &SetupConfig->ChannelBitrateShow)); Add(new cMenuEditBoolItem(tr("Simple aspect & format"), &SetupConfig->ChannelSimpleAspectFormat)); + Add(new cMenuEditStraItem(tr("program past/remaining time format"), &SetupConfig->ChannelTimeLeft, ChannelTimeLefts.Size(), &ChannelTimeLefts[0])); Add(new cMenuEditBoolItem(tr("Channelinfo border by decor-file?"), &SetupConfig->decorBorderChannelByTheme)); if( SetupConfig->decorBorderChannelByTheme ) { |