Feature #1806 ยป 0001-moved-epg-source-channel-mapping-menu-up.patch
setup.cpp | ||
---|---|---|
#include <vdr/osdbase.h>
|
||
#include <vdr/i18n.h>
|
||
#include <vdr/remote.h>
|
||
#include <time.h>
|
||
#define CHNUMWIDTH (numdigits(Channels.MaxNumber())+1)
|
||
... | ... | |
int current=Current();
|
||
Clear();
|
||
cOsdItem *first=NewTitle(tr("epg source channel options"));
|
||
hasmaps=false;
|
||
cOsdItem *first=NewTitle(tr("epg source channel mappings"));
|
||
Add(first,true);
|
||
for (int i=0; i<lmap->NumChannelIDs(); i++)
|
||
{
|
||
cChannel *chan=Channels.GetByChannelID(lmap->ChannelIDs()[i]);
|
||
if (chan)
|
||
{
|
||
cString buffer = cString::sprintf("%-*i %s", CHNUMWIDTH, chan->Number(),chan->Name());
|
||
Add(new cOsdItem(buffer),true);
|
||
if (!hasmaps) cm=Current();
|
||
hasmaps=true;
|
||
}
|
||
else
|
||
{
|
||
// invalid channelid? remove from list
|
||
lmap->RemoveChannel(lmap->ChannelIDs()[i],true);
|
||
}
|
||
}
|
||
lmap->RemoveInvalidChannels();
|
||
if (!hasmaps)
|
||
{
|
||
Add(new cOsdItem(tr("none")),true);
|
||
cm=Current();
|
||
}
|
||
Add(NewTitle(tr("epg source channel options")),true);
|
||
Add(new cMyMenuEditBitItem(tr("type of processing"),&flags,OPT_APPEND,tr("merge"),tr("create")),true);
|
||
c1=Current();
|
||
... | ... | |
Add(new cMyMenuEditBitItem(tr(" add shorttext/title from list"),&flags,OPT_SEASON_STEXTITLE),true);
|
||
}
|
||
hasmaps=false;
|
||
Add(NewTitle(tr("epg source channel mappings")),true);
|
||
for (int i=0; i<lmap->NumChannelIDs(); i++)
|
||
{
|
||
cChannel *chan=Channels.GetByChannelID(lmap->ChannelIDs()[i]);
|
||
if (chan)
|
||
{
|
||
cString buffer = cString::sprintf("%-*i %s", CHNUMWIDTH, chan->Number(),chan->Name());
|
||
Add(new cOsdItem(buffer),true);
|
||
if (!hasmaps) cm=Current();
|
||
hasmaps=true;
|
||
}
|
||
else
|
||
{
|
||
// invalid channelid? remove from list
|
||
lmap->RemoveChannel(lmap->ChannelIDs()[i],true);
|
||
}
|
||
}
|
||
lmap->RemoveInvalidChannels();
|
||
if (!hasmaps)
|
||
{
|
||
Add(new cOsdItem(tr("none")),true);
|
||
cm=Current();
|
||
}
|
||
if (current==-1)
|
||
{
|
||
SetCurrent(first);
|
||
CursorDown();
|
||
cRemote::Put(kUp); // this also refreshes the coloured buttons properly
|
||
}
|
||
else
|
||
{
|