diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 2fd253a77..9248cb2cc 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -523,6 +523,7 @@ fontmenu.sizes Schriftgrössen fontsize.channel_num_zap Direktauswahl fontsize.channellist Kanalliste fontsize.channellist_descr Beschreibung +fontsize.channellist_event Eventliste fontsize.channellist_number Nummer fontsize.epg_date EPG Datum fontsize.epg_info1 EPG Info 1 @@ -802,6 +803,7 @@ menu.hint_infobar_fonts Ändern Sie in der Infobar die Schriftgrößen menu.hint_infobar_logo Logo- und Signal-Optionen menu.hint_infobar_logo_dir Hier wählen Sie das Verzeichnis für die Senderlogos menu.hint_infobar_on_epg Zeigt einen Hinweis bei EPG-Änderungen +menu.hint_infobar_progressbar Wählt die Optionen des Fortschrittsbalken in der Infobar menu.hint_infobar_radiotext Zeigt Radiotext in einen Fenster, wenn verfügbar menu.hint_infobar_res Zeige die gesendete Auflösung in Symbolen menu.hint_infobar_sat Zeigt die aktuellen Satelliten- oder Kabel-Provider @@ -1131,6 +1133,11 @@ miscsettings.infobar_disp_5 Logo/Signalbalken miscsettings.infobar_disp_6 Logo+Kanalnummer/Signalbalken miscsettings.infobar_disp_log Logo miscsettings.infobar_logo_hdd_dir Logo Verz. +miscsettings.infobar_progressbar Fortschrittsbalken Opt. +miscsettings.infobar_progressbar_0 Standard +miscsettings.infobar_progressbar_1 unterhalb Kanalname +miscsettings.infobar_progressbar_2 unterhalb Kanalname schmal +miscsettings.infobar_progressbar_3 zwischen EPG-Events schmal miscsettings.infobar_sat_display Kabel-/Satellitenanbieter miscsettings.infobar_show Info bei EPG Änderungen miscsettings.infobar_show_dd_available DD-Verfügbarkeit anzeigen diff --git a/data/locale/english.locale b/data/locale/english.locale index c4a6a514b..ce239dccc 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -523,12 +523,13 @@ fontmenu.sizes Font sizes fontsize.channel_num_zap direct selection fontsize.channellist Channellist fontsize.channellist_descr Description +fontsize.channellist_event Event list fontsize.channellist_number Number fontsize.epg_date EPG Date fontsize.epg_info1 EPG Info 1 fontsize.epg_info2 EPG Info 2 fontsize.epg_title EPG Title -fontsize.eventlist_datetime Date / Dime +fontsize.eventlist_datetime Date / Time fontsize.eventlist_itemlarge Large fontsize.eventlist_itemsmall Small fontsize.eventlist_title Title @@ -802,6 +803,7 @@ menu.hint_infobar_fonts Change infobar font sizes menu.hint_infobar_logo Logo / signal options menu.hint_infobar_logo_dir Select directory to search for channels logo menu.hint_infobar_on_epg Show infobar on current EPG event change +menu.hint_infobar_progressbar Selects the options of Progressbar in the Infobar menu.hint_infobar_radiotext Show radiotext window menu.hint_infobar_res Show channel resolution icons menu.hint_infobar_sat Show current satellite or cable provider @@ -1133,6 +1135,11 @@ miscsettings.infobar_disp_5 Logo+signal miscsettings.infobar_disp_6 Logo+channel number+signal miscsettings.infobar_disp_log Logo miscsettings.infobar_logo_hdd_dir Logo dir +miscsettings.infobar_progressbar progressbar options +miscsettings.infobar_progressbar_0 standard +miscsettings.infobar_progressbar_1 below channel name +miscsettings.infobar_progressbar_2 small below channel name +miscsettings.infobar_progressbar_3 narrow between EPG-Events miscsettings.infobar_sat_display Satellite display on infobar miscsettings.infobar_show show Info on EPG change miscsettings.infobar_show_dd_available show DD availability diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 8ff854ed4..a01c64ca5 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -1545,8 +1545,19 @@ bool CEventsThread::addEvents() for (SIevents::const_iterator e = eit.events().begin(); e != eit.events().end(); ++e) { if (!(e->times.empty())) { +#if 0 if ( ( e->times.begin()->startzeit < zeit + secondsToCache ) && - ( ( e->times.begin()->startzeit + (long)e->times.begin()->dauer ) > zeit - oldEventsAre ) ) + ( ( e->times.begin()->startzeit + (long)e->times.begin()->dauer ) > zeit - oldEventsAre ) && + ( e->times.begin()->dauer < 60 ) ) { + char x_startTime[10]; + struct tm *x_tmStartTime = localtime(&e->times.begin()->startzeit); + strftime(x_startTime, sizeof(x_startTime)-1, "%H:%M", x_tmStartTime ); + printf("####[%s - #%d] - startzeit: %s, dauer: %d, channel_id: 0x%llX\n", __FUNCTION__, __LINE__, x_startTime, e->times.begin()->dauer, e->get_channel_id()); + } +#endif + if ( ( e->times.begin()->startzeit < zeit + secondsToCache ) && + ( ( e->times.begin()->startzeit + (long)e->times.begin()->dauer ) > zeit - oldEventsAre ) && + ( e->times.begin()->dauer > 1 ) ) { addEvent(*e, wait_for_time ? zeit: 0, e->table_id == 0x4e); event_count++; diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index c1e34f806..34a01ff60 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -110,6 +110,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl selected_chid = 0; footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar previous_channellist_additional = -1; + eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT; //printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout); } @@ -2119,15 +2120,16 @@ void CChannelList::paint_pig (int _x, int _y, int w, int h) void CChannelList::paint_events(int index) { + ffheight = g_Font[eventFont]->getHeight(); readEvents(chanlist[index]->channel_id); frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); char startTime[10]; + int eventStartTimeWidth = g_Font[eventFont]->getRenderWidth("22:22") + 5; // use a fixed value int startTimeWidth = 0; CChannelEventList::iterator e; time_t azeit; time(&azeit); - int ffheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(); if ( evtlist.empty() ) { @@ -2166,11 +2168,10 @@ void CChannelList::paint_events(int index) 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; + startTimeWidth = eventStartTimeWidth; + g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, COL_MENUCONTENTINACTIVE, 0, true); } - 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); + g_Font[eventFont]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, COL_MENUCONTENTDARK, 0, true); } else { @@ -2206,6 +2207,7 @@ void CChannelList::readEvents(const t_channel_id channel_id) void CChannelList::showdescription(int index) { + ffheight = g_Font[eventFont]->getHeight(); CZapitChannel* chan = chanlist[index]; CChannelEvent *p_event=NULL; p_event = &chan->currentEvent; @@ -2214,13 +2216,10 @@ void CChannelList::showdescription(int index) CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData); if (!(epgData.info2.empty())) { - int ffheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(); frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); processTextToArray(epgData.info2); - for (unsigned int i = 1; (i < epgText.size()+1) && ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)); i++) - { - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, infozone_width - 20, epgText[i-1].first, COL_MENUCONTENTDARK , 0, true); - } + for (int i = 1; (i < (int)epgText.size()+1) && ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)); i++) + g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, infozone_width - 20, epgText[i-1].first, COL_MENUCONTENTDARK , 0, true); } } @@ -2257,7 +2256,7 @@ void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 if (*text_!='\n') aktWord += *text_; - int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(aktWord, true); + int aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord, true); if ((aktWordWidth+aktWidth)<(infozone_width - 20)) {//space ok, add aktWidth += aktWordWidth; diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 567e9dce8..7fa9e8ed0 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -67,6 +67,8 @@ private: int fheight; // Fonthoehe Channellist-Inhalt int theight; // Fonthoehe Channellist-Titel int footerHeight; + int eventFont; + int ffheight; std::string name; ZapitChannelList chanlist; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 087550a1b..860ab35e4 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -450,6 +450,22 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos) // nicht gefunden / noch nicht geladen /* see the comment in display_Info() for a reasoning for this calculation */ int CurrInfoY = (BoxEndY + ChanNameY + time_height) / 2; // lower end of current info box + if(g_settings.infobar_progressbar){ + int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4; + switch(g_settings.infobar_progressbar) + { + case 1: + case 2: + CurrInfoY += (pb_h/3); + break; + case 3: + CurrInfoY -= (pb_h/3); + break; + default: + break; + } + } + neutrino_locale_t loc; if (! gotTime) loc = LOCALE_INFOVIEWER_WAITTIME; @@ -717,7 +733,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con std::string prov_name = pname; prov_name=prov_name.substr(prov_name.find_first_of("]")+1); - int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName); + int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName, true);// UTF-8 chname_width += (chname_width/(ChannelName.size()-1)/2); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString( ChanNameX + 10 + ChanNumWidth + chname_width, ChanNameY + time_height -SHADOW_OFFSET/2, @@ -1416,30 +1432,67 @@ void CInfoViewer::display_Info(const char *current, const char *next, int height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); int CurrInfoY = (BoxEndY + ChanNameY + time_height) / 2; int NextInfoY = CurrInfoY + height; // lower end of next info box - int xStart; int InfoX = ChanInfoX + 10; - xStart = InfoX; + int xStart = InfoX; if (starttimes) xStart += info_time_width + 10; - //colored_events init - bool colored_event_C = false; - bool colored_event_N = false; - if (g_settings.colored_events_infobar == 1) - colored_event_C = true; - if (g_settings.colored_events_infobar == 2) - colored_event_N = true; + int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4; + switch(g_settings.infobar_progressbar) + { + case 1: + case 2: + CurrInfoY += (pb_h/3); + NextInfoY += (pb_h/3); + break; + case 3: + CurrInfoY -= (pb_h/3); + NextInfoY += (pb_h/3); + break; + default: + break; + } if (pb_pos > -1) { int pb_w = 112; + int pb_startx = BoxEndX - pb_w - SHADOW_OFFSET; + int pb_starty = ChanNameY - (pb_h + 10); + int pb_shadow = COL_INFOBAR_SHADOW_PLUS_0; + int pb_color = g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0; + if(g_settings.infobar_progressbar){ + pb_startx = xStart; + pb_w = BoxEndX - 10 - xStart; + pb_shadow = 0; + } + switch(g_settings.infobar_progressbar) + { + case 1: + + pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 6)) ; + pb_h = (pb_h/3); + pb_color = COL_INFOBAR_SHADOW_PLUS_0; + break; + case 2: + pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 5)) ; + pb_h = (pb_h/5); + pb_color = COL_INFOBAR_SHADOW_PLUS_0; + break; + case 3: + pb_starty = CurrInfoY + ((pb_h / 3)-(pb_h/5)) ; + pb_h = (pb_h/5); + break; + default: + break; + } + int pb_p = pb_pos * pb_w / 100; - int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4; if (pb_p > pb_w) pb_p = pb_w; - timescale->paintProgressBar(BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h, pb_p, pb_w, - 0, 0, g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0, COL_INFOBAR_SHADOW_PLUS_0, "", COL_INFOBAR); + + timescale->paintProgressBar(pb_startx, pb_starty, pb_w, pb_h, pb_p, pb_w, + 0, 0, pb_color, pb_shadow, "", COL_INFOBAR); //printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h); } @@ -1453,6 +1506,14 @@ void CInfoViewer::display_Info(const char *current, const char *next, int nextTimeX = BoxEndX - nextTimeW - 10; static int oldCurrTimeX = currTimeX; // remember the last pos. of remaining time, in case we change from 20/100min to 21/99min + //colored_events init + bool colored_event_C = false; + bool colored_event_N = false; + if (g_settings.colored_events_infobar == 1) + colored_event_C = true; + if (g_settings.colored_events_infobar == 2) + colored_event_N = true; + if (current != NULL && update_current) { frameBuffer->paintBox(InfoX, CurrInfoY - height, currTimeX, CurrInfoY, COL_INFOBAR_PLUS_0); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index a5e4e8fd6..874dbf1f1 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -81,11 +81,12 @@ COsdSetup::~COsdSetup() } //font settings -const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[4] = +const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[5] = { SNeutrinoSettings::FONT_TYPE_CHANNELLIST, SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR, SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER, + SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT, SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP }; @@ -131,7 +132,7 @@ const SNeutrinoSettings::FONT_TYPES other_font_sizes[5] = font_sizes_groups font_sizes_groups[6] = { {LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS }, - {LOCALE_FONTMENU_CHANNELLIST, 4, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, + {LOCALE_FONTMENU_CHANNELLIST, 5, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, {LOCALE_FONTMENU_EVENTLIST , 4, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS }, {LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS }, @@ -160,6 +161,7 @@ font_sizes_struct neutrino_font[FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_CHANNELLIST , 20, FONT_STYLE_BOLD , 1}, {LOCALE_FONTSIZE_CHANNELLIST_DESCR , 20, FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_CHANNELLIST_NUMBER , 14, FONT_STYLE_BOLD , 2}, + {LOCALE_FONTSIZE_CHANNELLIST_EVENT , 17, FONT_STYLE_REGULAR, 2}, {LOCALE_FONTSIZE_CHANNEL_NUM_ZAP , 40, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_INFOBAR_NUMBER , 50, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_INFOBAR_CHANNAME , 30, FONT_STYLE_BOLD , 0}, @@ -725,6 +727,14 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL { 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 }, { 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 } }; +#define LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_COUNT 4 +const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_OPTIONS[LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_COUNT]= +{ + { 0 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_0 }, + { 1 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_1 }, + { 2 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_2 }, + { 3 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_3 } +}; //infobar void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) @@ -753,6 +763,11 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) mc->setHint("", LOCALE_MENU_HINT_INFOBAR_SAT); menu_infobar->addItem(mc); + // infobar progress + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR, &g_settings.infobar_progressbar, LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_OPTIONS, LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_PROGRESSBAR); + menu_infobar->addItem(mc); + // flash/hdd progress mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_SYSFS_HDD, &g_settings.infobar_show_sysfs_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_INFOBAR_FILESYS); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 69b540db5..f0c809326 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -393,6 +393,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.progressbar_color = configfile.getBool("progressbar_color", true ); g_settings.infobar_show = configfile.getInt32("infobar_show", 1); g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 ); + g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 0 ); g_settings.casystem_display = configfile.getInt32("casystem_display", 2 );//mini ca mode default g_settings.scrambled_message = configfile.getBool("scrambled_message", true ); g_settings.volume_pos = configfile.getInt32("volume_pos", 0 ); @@ -855,6 +856,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("progressbar_color" , g_settings.progressbar_color ); configfile.setInt32("infobar_show", g_settings.infobar_show); configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo ); + configfile.setInt32("infobar_progressbar" , g_settings.infobar_progressbar ); configfile.setInt32("casystem_display" , g_settings.casystem_display ); configfile.setBool("scrambled_message" , g_settings.scrambled_message ); configfile.setInt32("volume_pos" , g_settings.volume_pos ); diff --git a/src/nhttpd/doc/nhttpd_controlapi.html b/src/nhttpd/doc/nhttpd_controlapi.html index e87fa6c56..2632352cc 100644 --- a/src/nhttpd/doc/nhttpd_controlapi.html +++ b/src/nhttpd/doc/nhttpd_controlapi.html @@ -1829,11 +1829,17 @@ Die Pluginliste wird neu geladen.