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 --> 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 --> 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("isDolby", isDolby)); intTokens.insert(pair("isEncrypted", isEncrypted)); intTokens.insert(pair("isRecording", isRecording)); + intTokens.insert(pair("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 *intTokens, vectorService("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 *intTokens, vector > *devices); + bool CheckNewMails(void); public: cViewHelpers(void); virtual ~cViewHelpers(void);