summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-11-15 16:24:07 +0100
committerlouis <louis.braun@gmx.de>2014-11-15 16:24:07 +0100
commit5d715edba1256fc31bf846e9d5e5b2a5fb152aff (patch)
treefdbbc9dce91cded228e6236c1ec0914aa47267dc
parentc53e9e3a05ce74c47b6931907a655a0863a8478d (diff)
downloadvdr-plugin-skindesigner-5d715edba1256fc31bf846e9d5e5b2a5fb152aff.tar.gz
vdr-plugin-skindesigner-5d715edba1256fc31bf846e9d5e5b2a5fb152aff.tar.bz2
added {newmails} Token in displaychannel statusinfo
-rw-r--r--HISTORY2
-rw-r--r--skins/metrixhd/xmlfiles/displaychannel.xml1
-rw-r--r--skinskeleton/xmlfiles/displaychannel.xml1
-rw-r--r--views/displaychannelview.c1
-rw-r--r--views/viewhelpers.c13
-rw-r--r--views/viewhelpers.h1
6 files changed, 19 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index 181a4db..981d680 100644
--- a/HISTORY
+++ b/HISTORY
@@ -84,3 +84,5 @@ Version 0.0.5
- added {channelnumber} and {channelname} Tokens in displaymenudetailepg
detailheader
- fixed {hasicon} Token in displaymenu header
+- added {newmails} Token in displaychannel statusinfo, mailbox plugin
+ has to be installed
diff --git a/skins/metrixhd/xmlfiles/displaychannel.xml b/skins/metrixhd/xmlfiles/displaychannel.xml
index 5fb6dc0..e4a0409 100644
--- a/skins/metrixhd/xmlfiles/displaychannel.xml
+++ b/skins/metrixhd/xmlfiles/displaychannel.xml
@@ -90,6 +90,7 @@
{isDolby} true if a dolby audio track is available
{isEncrypted} true if channel is encrypted
{isRecording} true if currently a recording is running on this channel
+ {newmails} true if mailbox plugin is installed and new mails are available
-->
<statusinfo>
<area x="22%" y="94%" width="76%" height="6%" layer="2">
diff --git a/skinskeleton/xmlfiles/displaychannel.xml b/skinskeleton/xmlfiles/displaychannel.xml
index 27fc428..a95fa66 100644
--- a/skinskeleton/xmlfiles/displaychannel.xml
+++ b/skinskeleton/xmlfiles/displaychannel.xml
@@ -57,6 +57,7 @@
{isDolby} true if a dolby audio track is available
{isEncrypted} true if channel is encrypted
{isRecording} true if currently a recording is running on this channel
+ {newmails} true if mailbox plugin is installed and new mails are available
-->
<statusinfo>
</statusinfo>
diff --git a/views/displaychannelview.c b/views/displaychannelview.c
index 0c0d8fd..9a85ab4 100644
--- a/views/displaychannelview.c
+++ b/views/displaychannelview.c
@@ -212,6 +212,7 @@ void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) {
intTokens.insert(pair<string,int>("isDolby", isDolby));
intTokens.insert(pair<string,int>("isEncrypted", isEncrypted));
intTokens.insert(pair<string,int>("isRecording", isRecording));
+ intTokens.insert(pair<string,int>("newmails", CheckNewMails()));
DrawViewElement(veStatusInfo, &stringTokens, &intTokens);
}
diff --git a/views/viewhelpers.c b/views/viewhelpers.c
index 29c139d..abb46a3 100644
--- a/views/viewhelpers.c
+++ b/views/viewhelpers.c
@@ -155,3 +155,16 @@ bool cViewHelpers::SetDevices(bool initial, map<string,int> *intTokens, vector<m
#endif
return true;
}
+
+bool cViewHelpers::CheckNewMails(void) {
+ static cPlugin *pMailbox = cPluginManager::GetPlugin("mailbox");
+ if (!pMailbox) {
+ return false;
+ }
+ bool newMail = false;
+ if (pMailbox->Service("MailBox-HasNewMail-1.0", &newMail)) {
+ return newMail;
+ }
+ return false;
+}
+
diff --git a/views/viewhelpers.h b/views/viewhelpers.h
index 4de9ce8..7946b53 100644
--- a/views/viewhelpers.h
+++ b/views/viewhelpers.h
@@ -10,6 +10,7 @@ private:
protected:
void InitDevices(void);
bool SetDevices(bool initial, map<string,int> *intTokens, vector<map<string,string> > *devices);
+ bool CheckNewMails(void);
public:
cViewHelpers(void);
virtual ~cViewHelpers(void);