CChannelList: Use CComponentsChannelLogo for display channellogo

Origin commit data
------------------
Branch: ni/coolstream
Commit: 2ecd9918cb
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-06-28 (Sat, 28 Jun 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2014-06-28 16:23:11 +02:00
parent 02d85fad41
commit c1174ba5ab
2 changed files with 16 additions and 11 deletions

View File

@@ -119,6 +119,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
cc_minitv = NULL;
logo_off = 0;
pig_on_win = false;
CChannelLogo = NULL;
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
}
@@ -141,6 +142,11 @@ CChannelList::~CChannelList()
if (headerClock->isClockRun())
headerClock->stopThread();
}
if (CChannelLogo) {
delete CChannelLogo;
CChannelLogo = NULL;
}
}
void CChannelList::ClearList(void)
{
@@ -1766,19 +1772,16 @@ void CChannelList::paintItem2DetailsLine (int pos)
void CChannelList::showChannelLogo()
{
if(g_settings.channellist_show_channellogo){
static int logo_w = 0;
static int logo_h = 0;
int logo_w_max = full_width / 4;
if (logo_w && logo_h)
frameBuffer->paintBoxRel(x + full_width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0);
std::string lname;
if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->getName(), lname, &logo_w, &logo_h)) {
if((logo_h > theight) || (logo_w > logo_w_max))
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, theight);
g_PicViewer->DisplayImage(lname, x + full_width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h);
if (CChannelLogo) {
CChannelLogo->hide();
delete CChannelLogo;
}
CChannelLogo = new CComponentsChannelLogo(0, 0, logo_w_max, theight,
chanlist[selected]->getName(), chanlist[selected]->channel_id);
CChannelLogo->setXPos(x + full_width - logo_off - CChannelLogo->getWidth());
CChannelLogo->setYPos(y + (theight - CChannelLogo->getHeight()) / 2);
CChannelLogo->paint();
}
}