summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-01-06 06:23:36 +0100
committerlouis <louis.braun@gmx.de>2015-01-06 06:23:36 +0100
commit0bcdb0f3866e1fe2251efad395498954527e1c89 (patch)
treedd6921abd436a3535d0f92dd76bdbd8b274dde31
parentacd552d5f37ec4882f624baf8cb860c001cfdd89 (diff)
downloadvdr-plugin-skindesigner-0bcdb0f3866e1fe2251efad395498954527e1c89.tar.gz
vdr-plugin-skindesigner-0bcdb0f3866e1fe2251efad395498954527e1c89.tar.bz2
added customtokens view element in displayreplay
-rw-r--r--HISTORY4
-rw-r--r--displayreplay.c2
-rw-r--r--dtd/displayreplay.dtd8
-rw-r--r--libtemplate/templateview.c6
-rw-r--r--skinskeleton/xmlfiles/displayreplay.xml8
-rw-r--r--views/displayreplayview.c11
-rw-r--r--views/displayreplayview.h1
7 files changed, 38 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index d3c6b15..8fd7225 100644
--- a/HISTORY
+++ b/HISTORY
@@ -122,7 +122,8 @@ Version 0.1.1
- added "temperatures" view element in displaymenumainview to display
cpu and gpu temperature in main menu (scripts to get temperatures
- borrowed from skinflatplus)
+ borrowed from skinflatplus). scripts to get temperatures have to be
+ adapted according the system setup.
- added "time" view element in displaychannelview, displayreplay view
and displaymenuviews to display current time with seconds precision
- added {currenttab}, {prevtab}, {nexttab} Tokens in <tablabels> view
@@ -131,5 +132,6 @@ Version 0.1.1
correctly
- fixed some minor bugs
- added skin "blackhole"
+- added customtokens view element in displayreplay
Version 0.1.2
diff --git a/displayreplay.c b/displayreplay.c
index ec79c3b..9fd8d3f 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -81,7 +81,9 @@ void cSDDisplayReplay::Flush(void) {
replayView->DrawDate();
replayView->DrawTime();
}
+
if (initial) {
+ replayView->DrawCustomTokens();
replayView->DoFadeIn();
initial = false;
} else {
diff --git a/dtd/displayreplay.dtd b/dtd/displayreplay.dtd
index 6e5a111..c2333c3 100644
--- a/dtd/displayreplay.dtd
+++ b/dtd/displayreplay.dtd
@@ -5,7 +5,8 @@
<!ELEMENT displayreplay (background | backgroundmodeonly |datetime | time |
scrapercontent | rectitle | recinfo | currenttime |
totaltime | progressbar | cutmarks | controlicons |
- controliconsmodeonly | jump | message | onpause | onpausemodeonly)*>
+ controliconsmodeonly | jump | message | onpause |
+ onpausemodeonly | customtokens)*>
<!ATTLIST displayreplay
x CDATA #REQUIRED
y CDATA #REQUIRED
@@ -107,4 +108,9 @@
fadetime CDATA #IMPLIED
>
+<!ELEMENT customtokens (area|areascroll)*>
+<!ATTLIST customtokens
+ debug CDATA #IMPLIED
+>
+
%functions; \ No newline at end of file
diff --git a/libtemplate/templateview.c b/libtemplate/templateview.c
index 0671a0a..7b64f3d 100644
--- a/libtemplate/templateview.c
+++ b/libtemplate/templateview.c
@@ -1429,6 +1429,7 @@ void cTemplateViewReplay::SetViewElements(void) {
viewElementsAllowed.insert("message");
viewElementsAllowed.insert("onpause");
viewElementsAllowed.insert("onpausemodeonly");
+ viewElementsAllowed.insert("customtokens");
}
string cTemplateViewReplay::GetViewElementName(eViewElement ve) {
@@ -1482,6 +1483,9 @@ string cTemplateViewReplay::GetViewElementName(eViewElement ve) {
case veOnPauseModeOnly:
name = "On Pause Mode Only";
break;
+ case veCustomTokens:
+ name = "Custom Tokens";
+ break;
default:
name = "Unknown";
break;
@@ -1526,6 +1530,8 @@ void cTemplateViewReplay::AddPixmap(string sViewElement, cTemplatePixmap *pix, v
ve = veOnPause;
} else if (!sViewElement.compare("onpausemodeonly")) {
ve = veOnPauseModeOnly;
+ } else if (!sViewElement.compare("customtokens")) {
+ ve = veCustomTokens;
}
if (ve == veUndefined) {
diff --git a/skinskeleton/xmlfiles/displayreplay.xml b/skinskeleton/xmlfiles/displayreplay.xml
index ee63f7a..8cef153 100644
--- a/skinskeleton/xmlfiles/displayreplay.xml
+++ b/skinskeleton/xmlfiles/displayreplay.xml
@@ -241,4 +241,12 @@
<onpausemodeonly delay="30" fadetime="0">
</onpausemodeonly>
+ <!-- Available Variables customtokens:
+ all custom tokens set by the svdrp command SCTK are available in this viewelement
+ For instance, use an appropriate script which runs periodically as cronjob and
+ sets these custom tokens with svdrpsend or dbus2vdr
+ -->
+ <customtokens>
+ </customtokens>
+
</displayreplay>
diff --git a/views/displayreplayview.c b/views/displayreplayview.c
index 1c8429b..4831161 100644
--- a/views/displayreplayview.c
+++ b/views/displayreplayview.c
@@ -379,6 +379,17 @@ void cDisplayReplayView::ClearOnPause(void) {
}
}
+void cDisplayReplayView::DrawCustomTokens(void) {
+ if (!ViewElementImplemented(veCustomTokens)) {
+ return;
+ }
+ if (!tmplView)
+ return;
+ map < string, string > stringTokens = tmplView->GetCustomStringTokens();
+ map < string, int > intTokens = tmplView->GetCustomIntTokens();
+ DrawViewElement(veCustomTokens, &stringTokens, &intTokens);
+}
+
/****************************************************************************************
* Private Functions
*****************************************************************************************/
diff --git a/views/displayreplayview.h b/views/displayreplayview.h
index cb8f7f7..a79e537 100644
--- a/views/displayreplayview.h
+++ b/views/displayreplayview.h
@@ -33,6 +33,7 @@ public:
void DrawMessage(eMessageType type, const char *text);
void DrawOnPause(bool modeOnly);
void ClearOnPause(void);
+ void DrawCustomTokens(void);
void DoFadeIn(void) { Start(); };
void Flush(void) { DoFlush(); };
};