@@ -3,6 +3,7 @@
*/
#include <math.h>
+#include <vdr/iconpatch.h>
#include "mywhatsonitem.h"
myWhatsOnItem::myWhatsOnItem(const cEvent *Event,cChannel *Channel,bool Next)
@@ -33,6 +34,7 @@
}
}
+
if(event)
{
// calculate progress bar
@@ -45,38 +47,54 @@
progress=10;
// assemble menu item text
- if(enigmatheme)
- {
- for(i=1;i<progress-1;i++)ProgressBar[i]='|';
- if(showchannelnumbers)
- asprintf(&buffer,"%c\t%d\t%-10s \t%s\t %s",m,channel->Number(),channel->ShortName(true),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
- else
- asprintf(&buffer,"%c\t%-10s \t%s\t %s",m,channel->ShortName(true),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
+ // CockyPatch
+ if(enigmatheme) {
+ for(i=1;i<progress-1;i++)ProgressBar[i]='|';
+ if(showchannelnumbers)
+ asprintf(&buffer,"%c\t%d\t%-10s \t%s\t %s",m,channel->Number(),channel->Name(),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
+ else
+ asprintf(&buffer,"%c\t%-10s \t%s\t %s",m,channel->Name(),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
}
else
{
- for(i=0;i<progress;i++)ProgressBar[i]=127;
- if(showchannelnumbers)
- asprintf(&buffer,"%c\t%d\t%-10s\t %s\t%s",m,channel->Number(),channel->ShortName(true),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
- else
- asprintf(&buffer,"%c\t%-10s\t %s\t%s",m,channel->ShortName(true),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
- }
- }
+ for(i=0;i<progress;i++)ProgressBar[i]=127;
+ if (channel->Vpid() != 0 ) {
+ if(showchannelnumbers)
+ asprintf(&buffer,"%c\t%d\t%c %-10s\t %s\t%s",m,channel->Number(),ICON_TV,channel->Name(),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
+ else
+ asprintf(&buffer,"%c%c \t%-10s\t %s\t%s",m,ICON_TV,channel->Name(),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
+ }
+ else
+ {
+ if(showchannelnumbers)
+ asprintf(&buffer,"%c\t%d\t%c %-10s\t %s\t%s",m,channel->Number(),ICON_RADIO,channel->Name(),next?*event->GetTimeString():ProgressBar,event->Title());
+ else
+ asprintf(&buffer,"%c%c \t%-10s\t %s\t%s",m,ICON_RADIO,channel->Name(),(!(event->RunningStatus()==4)&&next)?*event->GetTimeString():ProgressBar,event->Title());
+ }
+}
+}
else
{
if(enigmatheme)
{
if(showchannelnumbers)
- asprintf(&buffer,"%c\t%d\t%-10s\t \t (%s)",m,channel->Number(),channel->ShortName(true),tr("no info"));
+ asprintf(&buffer,"%c\t%d\t%-10s\t \t (%s)",m,channel->Number(),channel->Name(),tr("no info"));
else
- asprintf(&buffer,"%c\t%-10s\t \t (%s)",m,channel->ShortName(true),tr("no info"));
+ asprintf(&buffer,"%c\t%-10s\t \t (%s)",m,channel->Name(),tr("no info"));
}
else
{
+ if (channel->Vpid() != 0 ) {
if(showchannelnumbers)
- asprintf(&buffer,"%c\t%d\t%-10s\t \t(%s)",m,channel->Number(),channel->ShortName(true),tr("no info"));
+ asprintf(&buffer,"%c\t%d\t%c %-10s\t \t(%s)",m,channel->Number(),ICON_TV,channel->Name(),tr("no info"));
+ else
+ asprintf(&buffer,"%c\t%-10s\t \t(%s)",m,channel->Name(),tr("no info"));
+ } else {
+ if(showchannelnumbers)
+ asprintf(&buffer,"%c\t%d\t%c %-10s\t \t(%s)",m,channel->Number(),ICON_RADIO,channel->Name(),tr("no info"));
else
- asprintf(&buffer,"%c\t%-10s\t \t(%s)",m,channel->ShortName(true),tr("no info"));
+ asprintf(&buffer,"%c\t%-10s\t \t(%s)",m,channel->Name(),tr("no info"));
+}
}
}