summaryrefslogtreecommitdiff
path: root/views
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 /views
parentc53e9e3a05ce74c47b6931907a655a0863a8478d (diff)
downloadvdr-plugin-skindesigner-5d715edba1256fc31bf846e9d5e5b2a5fb152aff.tar.gz
vdr-plugin-skindesigner-5d715edba1256fc31bf846e9d5e5b2a5fb152aff.tar.bz2
added {newmails} Token in displaychannel statusinfo
Diffstat (limited to 'views')
-rw-r--r--views/displaychannelview.c1
-rw-r--r--views/viewhelpers.c13
-rw-r--r--views/viewhelpers.h1
3 files changed, 15 insertions, 0 deletions
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);