summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY5
-rw-r--r--baserender.c2
-rw-r--r--config.c4
-rw-r--r--config.h2
-rw-r--r--displaychannel.c9
-rw-r--r--po/de_DE.po17
-rw-r--r--setup.c17
7 files changed, 53 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index ac0e28eb..8d126ad2 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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;
diff --git a/config.c b/config.c
index 410f8369..35492099 100644
--- a/config.c
+++ b/config.c
@@ -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;
diff --git a/config.h b/config.h
index 599517fb..1b26555d 100644
--- a/config.h
+++ b/config.h
@@ -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?"
diff --git a/setup.c b/setup.c
index 77b1fdff..0c089da3 100644
--- a/setup.c
+++ b/setup.c
@@ -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 ) {