added {newmails} Token in displaychannel statusinfo

This commit is contained in:
louis 2014-11-15 16:24:07 +01:00
parent c53e9e3a05
commit 5d715edba1
6 changed files with 19 additions and 0 deletions

View File

@ -84,3 +84,5 @@ Version 0.0.5
- added {channelnumber} and {channelname} Tokens in displaymenudetailepg - added {channelnumber} and {channelname} Tokens in displaymenudetailepg
detailheader detailheader
- fixed {hasicon} Token in displaymenu header - fixed {hasicon} Token in displaymenu header
- added {newmails} Token in displaychannel statusinfo, mailbox plugin
has to be installed

View File

@ -90,6 +90,7 @@
{isDolby} true if a dolby audio track is available {isDolby} true if a dolby audio track is available
{isEncrypted} true if channel is encrypted {isEncrypted} true if channel is encrypted
{isRecording} true if currently a recording is running on this channel {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>
<area x="22%" y="94%" width="76%" height="6%" layer="2"> <area x="22%" y="94%" width="76%" height="6%" layer="2">

View File

@ -57,6 +57,7 @@
{isDolby} true if a dolby audio track is available {isDolby} true if a dolby audio track is available
{isEncrypted} true if channel is encrypted {isEncrypted} true if channel is encrypted
{isRecording} true if currently a recording is running on this channel {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>
</statusinfo> </statusinfo>

View File

@ -212,6 +212,7 @@ void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) {
intTokens.insert(pair<string,int>("isDolby", isDolby)); intTokens.insert(pair<string,int>("isDolby", isDolby));
intTokens.insert(pair<string,int>("isEncrypted", isEncrypted)); intTokens.insert(pair<string,int>("isEncrypted", isEncrypted));
intTokens.insert(pair<string,int>("isRecording", isRecording)); intTokens.insert(pair<string,int>("isRecording", isRecording));
intTokens.insert(pair<string,int>("newmails", CheckNewMails()));
DrawViewElement(veStatusInfo, &stringTokens, &intTokens); DrawViewElement(veStatusInfo, &stringTokens, &intTokens);
} }

View File

@ -155,3 +155,16 @@ bool cViewHelpers::SetDevices(bool initial, map<string,int> *intTokens, vector<m
#endif #endif
return true; 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;
}

View File

@ -10,6 +10,7 @@ private:
protected: protected:
void InitDevices(void); void InitDevices(void);
bool SetDevices(bool initial, map<string,int> *intTokens, vector<map<string,string> > *devices); bool SetDevices(bool initial, map<string,int> *intTokens, vector<map<string,string> > *devices);
bool CheckNewMails(void);
public: public:
cViewHelpers(void); cViewHelpers(void);
virtual ~cViewHelpers(void); virtual ~cViewHelpers(void);