summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-03-23 11:59:38 +0100
committerlouis <louis.braun@gmx.de>2013-03-23 11:59:38 +0100
commitf59b6092b1eb5aa6b76dede334b25903a2f2026a (patch)
tree952e435826f079308592d87de7d7e7c5384d80a1
parent1079718362567290fd53d545710f750e83b26a00 (diff)
downloadskin-nopacity-f59b6092b1eb5aa6b76dede334b25903a2f2026a.tar.gz
skin-nopacity-f59b6092b1eb5aa6b76dede334b25903a2f2026a.tar.bz2
time display for current schedule in channel display configurable (elapsed / remaining)
-rw-r--r--config.c2
-rw-r--r--config.h1
-rw-r--r--displaychannel.c10
-rw-r--r--po/de_DE.po11
-rw-r--r--po/it_IT.po11
-rw-r--r--po/sk_SK.po11
-rw-r--r--setup.c4
-rw-r--r--setup.h1
8 files changed, 45 insertions, 6 deletions
diff --git a/config.c b/config.c
index 9260fb2..8e91c17 100644
--- a/config.c
+++ b/config.c
@@ -25,6 +25,7 @@ cNopacityConfig::cNopacityConfig() {
fontEPGSmallSize = 0;
resolutionIconSize = 100;
statusIconSize = 64;
+ progressCurrentSchedule = 0;
//Display Replay
replayHeight = 25;
replayBorderVertical = 15;
@@ -214,6 +215,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "fontEPGSmallSize") == 0) fontEPGSmallSize = atoi(Value);
else if (strcmp(Name, "resolutionIconSize") == 0) resolutionIconSize = atoi(Value);
else if (strcmp(Name, "statusIconSize") == 0) statusIconSize = atoi(Value);
+ else if (strcmp(Name, "progressCurrentSchedule") == 0) progressCurrentSchedule = atoi(Value);
else if (strcmp(Name, "replayHeight") == 0) replayHeight = atoi(Value);
else if (strcmp(Name, "replayBorderVertical") == 0) replayBorderVertical = atoi(Value);
else if (strcmp(Name, "replayBorderBottom") == 0) replayBorderBottom = atoi(Value);
diff --git a/config.h b/config.h
index e17097a..bd4ea4d 100644
--- a/config.h
+++ b/config.h
@@ -43,6 +43,7 @@ class cNopacityConfig {
int fontEPGSmallSize;
int resolutionIconSize;
int statusIconSize;
+ int progressCurrentSchedule;
//DisplayReplay
int replayHeight;
int replayBorderVertical;
diff --git a/displaychannel.c b/displaychannel.c
index 938e8d0..4a8994c 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -429,8 +429,13 @@ void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fol
int epgWidthShort = fontEPGSmall->Width(e->ShortText());
cString strSeen("");
if (i==0) {
- int seen = (int)(time(NULL) - e->StartTime())/60;
- strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60);
+ if (config.progressCurrentSchedule == 0) {
+ int seen = (int)(time(NULL) - e->StartTime())/60;
+ strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60);
+ } else if (config.progressCurrentSchedule == 1) {
+ int remaining = (int)(e->EndTime() - time(NULL))/60;
+ strSeen = cString::sprintf("-%d/%dmin", remaining, e->Duration()/60);
+ }
} else {
strSeen = cString::sprintf("%dmin", e->Duration()/60);
}
@@ -482,7 +487,6 @@ void cNopacityDisplayChannel::DrawProgressBar(int Current, int Total) {
if (Current > 0) {
tColor colAct = DrawProgressbarBackground(10 + barHeight/2, 4, barFullWidth * percentSeen, barHeight-1);
pixmapProgressBar->DrawEllipse(cRect(10 + barFullWidth * percentSeen, 4, barHeight, barHeight), colAct);
- //pixmapProgressBar->DrawRectangle(cRect( 10 + barHeight/2, 4, barFullWidth * percentSeen, barHeight-1), Theme.Color(clrProgressBar));
}
}
}
diff --git a/po/de_DE.po b/po/de_DE.po
index f6c28ee..c5a9695 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-03-16 11:52+0100\n"
+"POT-Creation-Date: 2013-03-23 11:49+0100\n"
"PO-Revision-Date: 2012-11-11 17:49+0200\n"
"Last-Translator: louis\n"
"Language-Team: \n"
@@ -314,6 +314,12 @@ msgstr "Order Icon Größe"
msgid "do not display"
msgstr "nicht anzeigen"
+msgid "show elapsed time"
+msgstr "vergangene Zeit anzeigen"
+
+msgid "show remaining time"
+msgstr "verbleibende Zeit anzeigen"
+
msgid "Hight of Channel Display (Percent of OSD Height)"
msgstr "Höhe der Kanalwechsel Anzeige (Proz. der OSD Höhe)"
@@ -329,6 +335,9 @@ msgstr "Kanallogo Position"
msgid "Channel Logo Border"
msgstr "Rand um die Kanallogos"
+msgid "Kind of time display for current schedule"
+msgstr "Art der Zeitanzeige für die laufende Sendung"
+
msgid "Display Signal Strength & Quality"
msgstr "Signalstärke- und Qualität anzeigen"
diff --git a/po/it_IT.po b/po/it_IT.po
index 4dd0147..c877d6a 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-03-22 16:23+0100\n"
+"POT-Creation-Date: 2013-03-23 11:49+0100\n"
"PO-Revision-Date: 2013-03-19 22:56+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: \n"
@@ -317,6 +317,12 @@ msgstr "Dim. icona cartella"
msgid "do not display"
msgstr "non mostrare"
+msgid "show elapsed time"
+msgstr ""
+
+msgid "show remaining time"
+msgstr ""
+
msgid "Hight of Channel Display (Percent of OSD Height)"
msgstr "Altezza di Mostra canale (% altezza OSD)"
@@ -332,6 +338,9 @@ msgstr "Posizione logo canale"
msgid "Channel Logo Border"
msgstr "Bordo logo canale"
+msgid "Kind of time display for current schedule"
+msgstr ""
+
msgid "Display Signal Strength & Quality"
msgstr "Mostra qualità e intensità segnale"
diff --git a/po/sk_SK.po b/po/sk_SK.po
index a480a84..505aea2 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-03-16 11:52+0100\n"
+"POT-Creation-Date: 2013-03-23 11:49+0100\n"
"PO-Revision-Date: 2013-03-12 15:59+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n"
@@ -317,6 +317,12 @@ msgstr "Veµkos» ikony prieèinku"
msgid "do not display"
msgstr "nezobrazova»"
+msgid "show elapsed time"
+msgstr ""
+
+msgid "show remaining time"
+msgstr ""
+
msgid "Hight of Channel Display (Percent of OSD Height)"
msgstr "Vý¹ka zobrazenia (Percento z OSD vý¹ky)"
@@ -332,6 +338,9 @@ msgstr "Pozícia loga kanálu"
msgid "Channel Logo Border"
msgstr "Okraj loga kanálu"
+msgid "Kind of time display for current schedule"
+msgstr ""
+
msgid "Display Signal Strength & Quality"
msgstr "Zobrazi» silu a kvalitu signálu"
diff --git a/setup.c b/setup.c
index c999308..ae45b64 100644
--- a/setup.c
+++ b/setup.c
@@ -84,6 +84,7 @@ void cNopacitySetup::Store(void) {
SetupStore("fontEPGSmallSize", config.fontEPGSmallSize);
SetupStore("resolutionIconSize", config.resolutionIconSize);
SetupStore("statusIconSize", config.statusIconSize);
+ SetupStore("progressCurrentSchedule", config.progressCurrentSchedule);
SetupStore("replayHeight", config.replayHeight);
SetupStore("replayBorderVertical", config.replayBorderVertical);
SetupStore("replayBorderBottom", config.replayBorderBottom);
@@ -424,6 +425,8 @@ cNopacitySetupChannelDisplay::cNopacitySetupChannelDisplay(cNopacityConfig* data
logoPos[0] = tr("do not display");
logoPos[1] = tr("left");
logoPos[2] = tr("right");
+ progressStyleCurrentSchedule[0] = tr("show elapsed time");
+ progressStyleCurrentSchedule[1] = tr("show remaining time");
Set();
}
@@ -441,6 +444,7 @@ void cNopacitySetupChannelDisplay::Set(void) {
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Height")), &tmpNopacityConfig->logoHeight, 30, 500));
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Border")), &tmpNopacityConfig->logoBorder, 0, 200));
}
+ Add(new cMenuEditStraItem(tr("Kind of time display for current schedule"), &tmpNopacityConfig->progressCurrentSchedule, 2, progressStyleCurrentSchedule));
Add(new cMenuEditBoolItem(tr("Display Signal Strength & Quality"), &tmpNopacityConfig->displaySignalStrength));
Add(new cMenuEditIntItem(tr("Screen Resolution Icon Size"), &tmpNopacityConfig->resolutionIconSize, 30, 200));
Add(new cMenuEditIntItem(tr("Status Icons Size"), &tmpNopacityConfig->statusIconSize, 30, 150));
diff --git a/setup.h b/setup.h
index 717d55f..051fa66 100644
--- a/setup.h
+++ b/setup.h
@@ -77,6 +77,7 @@ class cNopacitySetupMenuDisplayRecordings : public cMenuSetupSubMenu {
class cNopacitySetupChannelDisplay : public cMenuSetupSubMenu {
protected:
const char *logoPos[3];
+ const char *progressStyleCurrentSchedule[2];
void Set(void);
public:
cNopacitySetupChannelDisplay(cNopacityConfig *data);