mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-18 02:43:42 +02:00
Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++
This commit is contained in:
@@ -110,6 +110,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
|
||||
selected_chid = 0;
|
||||
this->new_mode_active = false;
|
||||
footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar
|
||||
previous_channellist_additional = -1;
|
||||
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
|
||||
}
|
||||
|
||||
@@ -304,6 +305,7 @@ int CChannelList::doChannelMenu(void)
|
||||
{
|
||||
int i = 0;
|
||||
int select = -1;
|
||||
int shortcut = 0;
|
||||
static int old_selected = 0;
|
||||
char cnt[5];
|
||||
bool enabled = true;
|
||||
@@ -333,9 +335,10 @@ int CChannelList::doChannelMenu(void)
|
||||
menu->addItem(new CMenuForwarder(LOCALE_FAVORITES_MENUEADD, true, NULL, selector, cnt, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE), old_selected == i++);
|
||||
snprintf(cnt, sizeof(cnt), "%d", i);
|
||||
bool reset_enabled = chanlist[selected]->flags & CZapitChannel::NEW;
|
||||
menu->addItem(new CMenuForwarder(LOCALE_CHANNELLIST_RESET_FLAGS, reset_enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(0)), old_selected == i++);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_CHANNELLIST_RESET_FLAGS, reset_enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
|
||||
snprintf(cnt, sizeof(cnt), "%d", i);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, selector, cnt, CRCInput::convertDigitToKey(0)), old_selected == i++);
|
||||
menu->addItem(new CMenuSeparator(CMenuSeparator::LINE));
|
||||
menu->addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
|
||||
menu->exec(NULL, "");
|
||||
delete menu;
|
||||
delete selector;
|
||||
@@ -431,6 +434,7 @@ int CChannelList::doChannelMenu(void)
|
||||
break;
|
||||
case 5: // settings
|
||||
{
|
||||
previous_channellist_additional = g_settings.channellist_additional;
|
||||
COsdSetup osd_setup;
|
||||
osd_setup.showContextChanlistMenu();
|
||||
//FIXME check font/options changed ?
|
||||
@@ -464,12 +468,19 @@ int CChannelList::exec()
|
||||
void CChannelList::calcSize()
|
||||
{
|
||||
const int pic_h = 39;
|
||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
|
||||
width = w_max (((g_settings.channellist_extended)?(frameBuffer->getScreenWidth() / 20 * (fw+6)):(frameBuffer->getScreenWidth() / 20 * (fw+5))), 100);
|
||||
widthDetails = width;
|
||||
height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2));
|
||||
if (g_settings.channellist_minitv)
|
||||
height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0);
|
||||
|
||||
full_width = frameBuffer->getScreenWidth() - frameBuffer->getScreenX() - 2*ConnectLineBox_Width;
|
||||
if (g_settings.channellist_additional)
|
||||
width = full_width / 3 * 2;
|
||||
else
|
||||
width = full_width;
|
||||
|
||||
height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0);
|
||||
|
||||
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - full_width) / 2;
|
||||
if (x < ConnectLineBox_Width)
|
||||
x = ConnectLineBox_Width;
|
||||
y = frameBuffer->getScreenY();
|
||||
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, name.c_str());
|
||||
|
||||
@@ -501,24 +512,13 @@ void CChannelList::calcSize()
|
||||
height = theight + footerHeight + listmaxshow * fheight;
|
||||
info_height = 2*fheight + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight() + 10;
|
||||
|
||||
if (g_settings.channellist_minitv)
|
||||
{
|
||||
width = frameBuffer->getScreenWidth() / 3 * 2;
|
||||
widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX() - 2*ConnectLineBox_Width;
|
||||
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - widthDetails) / 2;
|
||||
if (x < ConnectLineBox_Width)
|
||||
x = ConnectLineBox_Width;
|
||||
y = frameBuffer->getScreenY();
|
||||
infozone_width = widthDetails - width;
|
||||
pig_width = infozone_width;
|
||||
infozone_width = full_width - width;
|
||||
pig_width = infozone_width;
|
||||
if (g_settings.channellist_additional == 2) // with miniTV
|
||||
pig_height = (pig_width * 9) / 16;
|
||||
infozone_height = height - theight - pig_height - footerHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
|
||||
y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - (height+ info_height)) / 2;
|
||||
}
|
||||
pig_height = 0;
|
||||
infozone_height = height - theight - pig_height - footerHeight;
|
||||
}
|
||||
|
||||
bool CChannelList::updateSelection(int newpos)
|
||||
@@ -570,7 +570,7 @@ int CChannelList::show()
|
||||
COSDFader fader(g_settings.menu_Content_alpha);
|
||||
fader.StartFadeIn();
|
||||
|
||||
if (g_settings.channellist_minitv)
|
||||
if (g_settings.channellist_additional)
|
||||
{
|
||||
frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0);
|
||||
}
|
||||
@@ -906,12 +906,11 @@ int CChannelList::show()
|
||||
|
||||
void CChannelList::hide()
|
||||
{
|
||||
if (g_settings.channellist_minitv)
|
||||
if ((g_settings.channellist_additional == 2) || (previous_channellist_additional == 2)) // with miniTV
|
||||
{
|
||||
// widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX();
|
||||
videoDecoder->Pig(-1, -1, -1, -1);
|
||||
}
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, widthDetails, height+ info_height+ 5);
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, full_width, height+ info_height+ 5);
|
||||
clearItem2DetailsLine();
|
||||
}
|
||||
|
||||
@@ -1500,7 +1499,7 @@ void CChannelList::paintDetails(int index)
|
||||
p_event = &chanlist[index]->currentEvent;
|
||||
}
|
||||
|
||||
frameBuffer->paintBoxRel(x+2, y + height + 2, widthDetails-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round
|
||||
frameBuffer->paintBoxRel(x+2, y + height + 2, full_width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round
|
||||
|
||||
if (!p_event->description.empty()) {
|
||||
char cNoch[50] = {0}; // UTF-8
|
||||
@@ -1524,7 +1523,7 @@ void CChannelList::paintDetails(int index)
|
||||
std::string text2= p_event->text;
|
||||
|
||||
int xstart = 10;
|
||||
if (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (widthDetails - 30 - seit_len) )
|
||||
if (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (full_width - 30 - seit_len) )
|
||||
{
|
||||
// zu breit, Umbruch versuchen...
|
||||
int pos;
|
||||
@@ -1532,7 +1531,7 @@ void CChannelList::paintDetails(int index)
|
||||
pos = text1.find_last_of("[ -.]+");
|
||||
if ( pos!=-1 )
|
||||
text1 = text1.substr( 0, pos );
|
||||
} while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (widthDetails - 30 - seit_len) ) );
|
||||
} while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (full_width - 30 - seit_len) ) );
|
||||
|
||||
std::string text3 = ""; /* not perfect, but better than crashing... */
|
||||
if (p_event->description.length() > text1.length())
|
||||
@@ -1542,7 +1541,7 @@ void CChannelList::paintDetails(int index)
|
||||
text3= text3+ " - ";
|
||||
|
||||
xstart += g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text3, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, widthDetails - 30- noch_len, text3, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, full_width - 30- noch_len, text3, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
|
||||
if (!(text2.empty())) {
|
||||
@@ -1551,7 +1550,7 @@ void CChannelList::paintDetails(int index)
|
||||
text2 = text2.substr( 0, text2.find('\n') );
|
||||
#if 0 //FIXME: to discuss, eat too much cpu time if string long enough
|
||||
int pos = 0;
|
||||
while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text2, true) > (widthDetails - 30 - noch_len) ) ) {
|
||||
while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text2, true) > (full_width - 30 - noch_len) ) ) {
|
||||
pos = text2.find_last_of(" ");
|
||||
|
||||
if ( pos!=-1 ) {
|
||||
@@ -1559,12 +1558,12 @@ void CChannelList::paintDetails(int index)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ 2* fheight, widthDetails- xstart- 30- noch_len, text2, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ 2* fheight, full_width- xstart- 30- noch_len, text2, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, widthDetails - 30 - seit_len, text1, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ widthDetails- 10- seit_len, y+ height+ 5+ fheight, seit_len, cSeit, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ widthDetails- 10- noch_len, y+ height+ 5+ 2* fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, full_width - 30 - seit_len, text1, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- seit_len, y+ height+ 5+ fheight, seit_len, cSeit, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- noch_len, y+ height+ 5+ 2* fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
}
|
||||
if(g_settings.channellist_foot == 0) {
|
||||
transponder t;
|
||||
@@ -1576,7 +1575,7 @@ void CChannelList::paintDetails(int index)
|
||||
else
|
||||
desc = desc + " (" + CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition()) + ")";
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, widthDetails - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
else if( !displayNext && g_settings.channellist_foot == 1) { // next Event
|
||||
char buf[128] = {0};
|
||||
@@ -1589,11 +1588,11 @@ void CChannelList::paintDetails(int index)
|
||||
snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str());
|
||||
int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom, true); // UTF-8
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, widthDetails - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST :COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ widthDetails- 10- from_len, y+ height+ 5+ 3*fheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST :COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 3*fheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
}
|
||||
}
|
||||
if ((g_settings.channellist_minitv) && (p_event != NULL))
|
||||
if ((g_settings.channellist_additional) && (p_event != NULL))
|
||||
paint_events(index);
|
||||
}
|
||||
|
||||
@@ -1622,7 +1621,7 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
details_line.paint();
|
||||
|
||||
//info box frame
|
||||
frameBuffer->paintBoxFrame(x, ypos2, widthDetails, info_height, 2, col1, RADIUS_LARGE);
|
||||
frameBuffer->paintBoxFrame(x, ypos2, full_width, info_height, 2, col1, RADIUS_LARGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1632,14 +1631,14 @@ void CChannelList::showChannelLogo()
|
||||
if(g_settings.infobar_show_channellogo){
|
||||
static int logo_w = 0;
|
||||
static int logo_h = 0;
|
||||
int logo_w_max = widthDetails / 4;
|
||||
frameBuffer->paintBoxRel(x + widthDetails - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0);
|
||||
int logo_w_max = full_width / 4;
|
||||
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 + widthDetails - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h);
|
||||
g_PicViewer->DisplayImage(lname, x + full_width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1728,7 +1727,7 @@ void CChannelList::paintButtonBar(bool is_current)
|
||||
|
||||
//paint buttons
|
||||
int y_foot = y + (height - footerHeight);
|
||||
::paintButtons(x, y_foot, widthDetails,num_buttons, Button, footerHeight,0,false,COL_INFOBAR_SHADOW,NULL,0,true, buttonID_rest);
|
||||
::paintButtons(x, y_foot, full_width,num_buttons, Button, footerHeight,0,false,COL_INFOBAR_SHADOW,NULL,0,true, buttonID_rest);
|
||||
}
|
||||
|
||||
void CChannelList::paintItem(int pos)
|
||||
@@ -1970,18 +1969,18 @@ void CChannelList::paintHead()
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE, &iw3, &ih);
|
||||
|
||||
// head
|
||||
frameBuffer->paintBoxRel(x,y, widthDetails,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
||||
frameBuffer->paintBoxRel(x,y, full_width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
||||
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + widthDetails - iw1 - 10, y, theight); //y+ 5 );
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + widthDetails - iw1 - iw2 - 14, y, theight);//y + 5); // icon for bouquet list button
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + full_width - iw1 - 10, y, theight); //y+ 5 );
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + full_width - iw1 - iw2 - 14, y, theight);//y + 5); // icon for bouquet list button
|
||||
if (g_settings.channellist_new_zap_mode)
|
||||
frameBuffer->paintIcon(this->new_mode_active ?
|
||||
NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE,
|
||||
x + widthDetails - iw1 - iw2 - iw3 - 18, y, theight);
|
||||
x + full_width - iw1 - iw2 - iw3 - 18, y, theight);
|
||||
|
||||
if (gotTime) {
|
||||
int iw3x = (g_settings.channellist_new_zap_mode) ? iw3 : -4;
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + widthDetails - iw1 - iw2 - iw3x - 28 -timestr_len,
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + full_width - iw1 - iw2 - iw3x - 28 -timestr_len,
|
||||
y+theight, timestr_len, timestr, COL_MENUHEAD, 0, true); // UTF-8
|
||||
timestr_len += 4;
|
||||
}
|
||||
@@ -1990,14 +1989,15 @@ void CChannelList::paintHead()
|
||||
if (g_settings.channellist_new_zap_mode)
|
||||
timestr_len += iw3 + 10;
|
||||
logo_off = timestr_len + 10;
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, widthDetails - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, full_width - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8
|
||||
}
|
||||
|
||||
void CChannelList::paint()
|
||||
{
|
||||
if (g_settings.channellist_minitv)
|
||||
if (g_settings.channellist_additional == 2) // with miniTV
|
||||
{
|
||||
paint_pig(x+width, y+theight+1, pig_width, pig_height);
|
||||
// 5px offset - same value as in list below
|
||||
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
|
||||
}
|
||||
|
||||
numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(MaxChanNr().c_str());
|
||||
@@ -2096,7 +2096,8 @@ void CChannelList::paint_events(int index)
|
||||
readEvents(chanlist[index]->channel_id);
|
||||
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0);
|
||||
|
||||
char text1[10];
|
||||
char startTime[10];
|
||||
int startTimeWidth = 0;
|
||||
CChannelEventList::iterator e;
|
||||
time_t azeit;
|
||||
time(&azeit);
|
||||
@@ -2130,15 +2131,20 @@ void CChannelList::paint_events(int index)
|
||||
}
|
||||
if (e == evtlist.end())
|
||||
break;
|
||||
|
||||
//Display the remaining events
|
||||
struct tm *tmStartZeit = localtime(&e->startTime);
|
||||
strftime(text1, sizeof(text1), "%H:%M", tmStartZeit );
|
||||
//printf("%s %s\n", text1, e->description.c_str());
|
||||
int timewidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(text1, true);
|
||||
if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height))
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, timewidth, text1, COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+timewidth+5, y+ theight+ pig_height + i*ffheight, infozone_width - timewidth - 20, e->description, COL_MENUCONTENTDARK, 0, true);
|
||||
if (e->eventID)
|
||||
{
|
||||
struct tm *tmStartZeit = localtime(&e->startTime);
|
||||
strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit );
|
||||
//printf("%s %s\n", startTime, e->description.c_str());
|
||||
startTimeWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth("88:88"); // use a fixed value
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, COL_MENUCONTENTINACTIVE, 0, true);
|
||||
startTimeWidth = startTimeWidth +5;
|
||||
}
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -72,16 +72,17 @@ private:
|
||||
ZapitChannelList chanlist;
|
||||
CZapProtection* zapProtection;
|
||||
|
||||
int width;
|
||||
int widthDetails;
|
||||
int height;
|
||||
int x;
|
||||
int y;
|
||||
int full_width;
|
||||
int width;
|
||||
int height;
|
||||
int x;
|
||||
int y;
|
||||
int logo_off;
|
||||
int pig_width;
|
||||
int pig_height;
|
||||
int infozone_width;
|
||||
int infozone_height;
|
||||
int pig_width;
|
||||
int pig_height;
|
||||
int infozone_width;
|
||||
int infozone_height;
|
||||
int previous_channellist_additional;
|
||||
|
||||
bool historyMode;
|
||||
bool vlist; // "virtual" list, not bouquet
|
||||
|
@@ -354,6 +354,14 @@ const CMenuOptionChooser::keyval INFOBAR_SHOW_RES_MODE_OPTIONS[INFOBAR_SHOW_RES_
|
||||
{ 2, LOCALE_OPTIONS_OFF }
|
||||
};
|
||||
|
||||
#define CHANNELLIST_ADDITIONAL_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval CHANNELLIST_ADDITIONAL_OPTIONS[CHANNELLIST_ADDITIONAL_OPTION_COUNT] =
|
||||
{
|
||||
{ 0, LOCALE_CHANNELLIST_ADDITIONAL_OFF },
|
||||
{ 1, LOCALE_CHANNELLIST_ADDITIONAL_ON },
|
||||
{ 2, LOCALE_CHANNELLIST_ADDITIONAL_ON_MINITV }
|
||||
};
|
||||
|
||||
#define CHANNELLIST_FOOT_OPTIONS_COUNT 3
|
||||
const CMenuOptionChooser::keyval CHANNELLIST_FOOT_OPTIONS[CHANNELLIST_FOOT_OPTIONS_COUNT]=
|
||||
{
|
||||
@@ -796,9 +804,10 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist)
|
||||
CMenuOptionChooser * mc;
|
||||
|
||||
menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST);
|
||||
// channel list with minitv
|
||||
mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MINITV, &g_settings.channellist_minitv, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_MINITV);
|
||||
|
||||
// channellist additional
|
||||
mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_ADDITIONAL, &g_settings.channellist_additional, CHANNELLIST_ADDITIONAL_OPTIONS, CHANNELLIST_ADDITIONAL_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_ADDITIONAL);
|
||||
menu_chanlist->addItem(mc);
|
||||
|
||||
// epg align
|
||||
@@ -893,9 +902,15 @@ int COsdSetup::showContextChanlistMenu()
|
||||
menu_chanlist->enableFade(false);
|
||||
menu_chanlist->setSelected(cselected);
|
||||
|
||||
CMenuOptionChooser * mc;
|
||||
|
||||
menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST);//, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
|
||||
|
||||
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true);
|
||||
mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_ADDITIONAL, &g_settings.channellist_additional, CHANNELLIST_ADDITIONAL_OPTIONS, CHANNELLIST_ADDITIONAL_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_ADDITIONAL);
|
||||
menu_chanlist->addItem(mc);
|
||||
|
||||
mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN);
|
||||
menu_chanlist->addItem(mc);
|
||||
|
||||
@@ -911,6 +926,8 @@ int COsdSetup::showContextChanlistMenu()
|
||||
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_COLORED);
|
||||
menu_chanlist->addItem(mc);
|
||||
|
||||
menu_chanlist->addItem(new CMenuSeparator(CMenuSeparator::LINE));
|
||||
|
||||
CMenuWidget *fontSettingsSubMenu = new CMenuWidget(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_KEYBINDING);
|
||||
fontSettingsSubMenu->enableSaveScreen(true);
|
||||
fontSettingsSubMenu->enableFade(false);
|
||||
@@ -925,7 +942,7 @@ int COsdSetup::showContextChanlistMenu()
|
||||
fontSettingsSubMenu->addItem(GenericMenuSeparatorLine);
|
||||
fontSettingsSubMenu->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, font_sizes_groups[i].actionkey));
|
||||
|
||||
CMenuForwarder * mf = new CMenuDForwarder(LOCALE_FONTMENU_HEAD, true, NULL, fontSettingsSubMenu, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||
CMenuForwarder * mf = new CMenuDForwarder(LOCALE_FONTMENU_HEAD, true, NULL, fontSettingsSubMenu, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
|
||||
mf->setHint("", LOCALE_MENU_HINT_FONTS);
|
||||
menu_chanlist->addItem(mf);
|
||||
|
||||
|
Reference in New Issue
Block a user