diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index d7e805874..1e4de2fa7 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1799,7 +1799,7 @@ void CChannelList::showChannelLogo() return; if(g_settings.channellist_show_channellogo){ - header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName()); + header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName(), (CCHeaderTypes::cc_logo_alignment_t)g_settings.channellist_show_channellogo); header->getChannelLogoObject()->hide(); header->getChannelLogoObject()->clearSavedScreen(); header->getChannelLogoObject()->paint(); diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index e3b4c7eb8..5cd4884a8 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -144,7 +144,7 @@ void EpgPlus::Header::paintChannelLogo(const CZapitChannel *Channel) this->logo->clearSavedScreen(); if (Channel) { - this->head->setChannelLogo(Channel->getChannelID(), Channel->getName()); + this->head->setChannelLogo(Channel->getChannelID(), Channel->getName(), (CCHeaderTypes::cc_logo_alignment_t)g_settings.channellist_show_channellogo); } this->logo->allowPaint(true); this->logo->paint(); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index ab6ac802c..bdd1d3fe3 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -912,7 +912,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start // set channel logo if (g_settings.channellist_show_channellogo) - header->setChannelLogo(channel_id, channel_name); + header->setChannelLogo(channel_id, channel_name, (CCHeaderTypes::cc_logo_alignment_t)g_settings.channellist_show_channellogo); //paint head header->paint(CC_SAVE_SCREEN_NO); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index eb422ecb9..dca742677 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -901,7 +901,7 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s if (header->isPainted()) header->getChannelLogoObject()->hide(); if (g_settings.channellist_show_channellogo) - header->setChannelLogo(_channel_id,_channelname); + header->setChannelLogo(_channel_id,_channelname, (CCHeaderTypes::cc_logo_alignment_t)g_settings.channellist_show_channellogo); header->setCaption(_channelname, CCHeaderTypes::CC_TITLE_LEFT); header->paint(CC_SAVE_SCREEN_NO); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 898339823..26ad8ad37 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -89,7 +89,6 @@ COsdSetup::COsdSetup(int wizard_mode) colorInfoclockNotifier = NULL; screensaverNotifier = NULL; channellistNotifier = NULL; - channellogoNotifier = NULL; infobarHddNotifier = NULL; osd_menu = NULL; submenu_menus = NULL; @@ -569,6 +568,15 @@ const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPT { CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL }, }; +#define OPTIONS_CHANNELLOGO_POSITION_COUNT 4 +const CMenuOptionChooser::keyval OPTIONS_CHANNELLOGO_POSITION[OPTIONS_CHANNELLOGO_POSITION_COUNT] = +{ + { 0, LOCALE_OPTIONS_OFF }, // off + { CCHeaderTypes::CC_LOGO_RIGHT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT }, // right + { CCHeaderTypes::CC_LOGO_LEFT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT }, // left + { CCHeaderTypes::CC_LOGO_CENTER, LOCALE_SETTINGS_POS_DEFAULT_CENTER } // centered +}; + // show osd setup int COsdSetup::showOsdSetup() { @@ -777,7 +785,6 @@ int COsdSetup::showOsdSetup() delete colorInfoclockNotifier; delete screensaverNotifier; delete channellistNotifier; - delete channellogoNotifier; delete infobarHddNotifier; delete osd_menu; return res; @@ -1237,7 +1244,6 @@ void COsdSetup::showOsdChannellogosSetup(CMenuWidget *menu_channellogos) { menu_channellogos->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLOGOS); - channellogoNotifier = new COnOffNotifier(); CMenuOptionChooser * mc; CMenuForwarder * mf; @@ -1249,7 +1255,7 @@ void COsdSetup::showOsdChannellogosSetup(CMenuWidget *menu_channellogos) menu_channellogos->addItem(GenericMenuSeparatorLine); // show channellogos - mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_CHANNELLOGO, &g_settings.channellist_show_channellogo, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, channellogoNotifier); + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_CHANNELLOGO, &g_settings.channellist_show_channellogo, OPTIONS_CHANNELLOGO_POSITION, OPTIONS_CHANNELLOGO_POSITION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_CHANNELLOGO); menu_channellogos->addItem(mc); @@ -1257,7 +1263,6 @@ void COsdSetup::showOsdChannellogosSetup(CMenuWidget *menu_channellogos) mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_EVENTLOGO, &g_settings.channellist_show_eventlogo, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.channellist_show_channellogo); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_EVENTLOGO); menu_channellogos->addItem(mc); - channellogoNotifier->addItem(mc); } // infobar diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index 130a12b46..959b70987 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -55,7 +55,6 @@ class COsdSetup : public CMenuTarget, public CChangeObserver COnOffNotifier* colorInfoclockNotifier; COnOffNotifier* screensaverNotifier; COnOffNotifier* channellistNotifier; - COnOffNotifier* channellogoNotifier; COnOffNotifier* infobarHddNotifier; CGenericMenuActivate casystemActivate; CGenericMenuActivate screensaverActivate; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b1353ad55..a0d3c2784 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1245,7 +1245,7 @@ int CNeutrinoApp::loadSetup(const char *fname) g_settings.channellist_foot = configfile.getInt32("channellist_foot", 1); g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 0); g_settings.channellist_numeric_adjust = configfile.getInt32("channellist_numeric_adjust", 0); - g_settings.channellist_show_channellogo = configfile.getInt32("channellist_show_channellogo", 1); + g_settings.channellist_show_channellogo = configfile.getInt32("channellist_show_channellogo", CCHeaderTypes::CC_LOGO_RIGHT); g_settings.channellist_show_eventlogo = configfile.getInt32("channellist_show_eventlogo", 1); g_settings.channellist_show_infobox = configfile.getInt32("channellist_show_infobox", 1); g_settings.channellist_show_numbers = configfile.getInt32("channellist_show_numbers", 1);