mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
EpgPlus: simplify calls of logo attributes and logo instance
This commit is contained in:
@@ -111,20 +111,23 @@ void EpgPlus::Header::paint(const char * Name)
|
||||
std::string caption = Name ? Name : g_Locale->getText(LOCALE_EPGPLUS_HEAD);
|
||||
|
||||
if (this->head == NULL)
|
||||
{
|
||||
this->head = new CComponentsHeader();
|
||||
this->head->setContextButton(CComponentsHeader::CC_BTN_HELP);
|
||||
this->head->enableClock(true, "%H:%M", "%H %M", true);
|
||||
}
|
||||
|
||||
if (this->head)
|
||||
{
|
||||
if (g_settings.channellist_show_channellogo)
|
||||
{
|
||||
// ensure to have clean background
|
||||
this->head->getChannelLogoObject()->hide();
|
||||
this->head->getChannelLogoObject()->allowPaint(false);
|
||||
this->logo = this->head->getChannelLogoObject();
|
||||
this->logo->hide();
|
||||
this->logo->allowPaint(false);
|
||||
}
|
||||
this->head->setDimensionsAll(this->x, this->y, this->width, this->font->getHeight());
|
||||
this->head->setCaption(caption, CTextBox::NO_AUTO_LINEBREAK);
|
||||
this->head->setContextButton(CComponentsHeader::CC_BTN_HELP);
|
||||
this->head->enableClock(true, "%H:%M", "%H %M", true);
|
||||
this->head->paint(CC_SAVE_SCREEN_NO);
|
||||
}
|
||||
}
|
||||
@@ -136,14 +139,14 @@ void EpgPlus::Header::paintChannelLogo(const CZapitChannel * Channel)
|
||||
|
||||
if (this->head)
|
||||
{
|
||||
this->head->getChannelLogoObject()->hide();
|
||||
this->head->getChannelLogoObject()->clearSavedScreen();
|
||||
this->logo->hide();
|
||||
this->logo->clearSavedScreen();
|
||||
if (Channel)
|
||||
{
|
||||
this->head->setChannelLogo(Channel->getChannelID(), Channel->getName());
|
||||
}
|
||||
this->head->getChannelLogoObject()->allowPaint(true);
|
||||
this->head->getChannelLogoObject()->paint();
|
||||
this->logo->allowPaint(true);
|
||||
this->logo->paint();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user