mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
added {newmails} Token in displaychannel statusinfo
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user