diff --git a/configure.ac b/configure.ac index 1cd8da37e..81a28c669 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(Tuxbox-Neutrino,3.4.0) +AC_INIT(NI-Neutrino,3.20.0) AM_INIT_AUTOMAKE([1.0.1 nostdinc]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index cf1eaf9c9..feae0a203 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1847,7 +1847,7 @@ moviebrowser.head_recordlist Zuletzt aufgenommen: moviebrowser.help_button_blue Filminfos neu laden moviebrowser.help_button_green Filterfenster einblenden moviebrowser.help_button_left Ansicht ändern -moviebrowser.help_button_menu Hauptmenü öffnen +moviebrowser.help_button_menu Filminfos und Einstellungen moviebrowser.help_button_mute Filme löschen moviebrowser.help_button_okay Filme abspielen moviebrowser.help_button_play Filme markieren @@ -1991,22 +1991,25 @@ movieplayer.bookmarkname_hint2 movieplayer.chapters Kapitel movieplayer.fileplayback Abspielen (Multiformat) movieplayer.head Movieplayer +movieplayer.help_additional Weitere benutzerdefinierte Tastenbelegungen sind unter "Hauptmenü" > "Einstellungen" > "Tasten" > "Bearbeiten" > "Movieplayer" zu finden.\n\nWährend der Wiedergabe von Filmen sind im Hauptmenü einige Menüpunkte deaktiviert. +movieplayer.help_button_1 1 Minute zurück +movieplayer.help_button_2 Zum Filmanfang springen +movieplayer.help_button_3 1 Minute vor +movieplayer.help_button_4 3 Minuten zurück +movieplayer.help_button_5 Zur Filmmitte springen +movieplayer.help_button_6 3 Minuten vor +movieplayer.help_button_7 10 Minuten zurück +movieplayer.help_button_8 Zum Filmende springen +movieplayer.help_button_9 10 Minuten vor +movieplayer.help_button_backward Schneller Rücklauf +movieplayer.help_button_forward Schneller Vorlauf +movieplayer.help_button_menu Hauptmenü öffnen +movieplayer.help_button_pause Pause / Weiter +movieplayer.help_button_stop Stopp movieplayer.plugin Movieplayer-Plugin movieplayer.starting Wiedergabe starten ... movieplayer.titles Titel movieplayer.toomanybookmarks Sie haben bereits zu viele Lesezeichen angelegt.\nEs muß erst ein anderes gelöscht werden. -movieplayer.tshelp1 Stopp -movieplayer.tshelp10 ca. 10 Minuten zurück -movieplayer.tshelp11 ca. 10 Minuten vor -movieplayer.tshelp12 Hilfe: http://www.giggo.de/dbox2/movieplayer.html\n -movieplayer.tshelp2 Auswahl der Tonspur -movieplayer.tshelp3 Pause/Weiter -movieplayer.tshelp4 Bookmark setzen -movieplayer.tshelp5 Zeit einblenden -movieplayer.tshelp6 ca. 1 Minute zurück -movieplayer.tshelp7 ca. 1 Minute vor -movieplayer.tshelp8 ca. 5 Minuten zurück -movieplayer.tshelp9 ca. 5 Minuten vor movieplayer.tsplayback TS Abspielen movieplayer.ytplayback YouTube-Feed Wiedergabe mpkey.audio Tonspuren diff --git a/data/locale/english.locale b/data/locale/english.locale index a60518467..dc0a4377a 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1847,7 +1847,7 @@ moviebrowser.head_recordlist Last recorded: moviebrowser.help_button_blue Reload movie informations moviebrowser.help_button_green Show filter selection moviebrowser.help_button_left Change view -moviebrowser.help_button_menu Open main menu +moviebrowser.help_button_menu Movie infos and settings moviebrowser.help_button_mute Delete movies moviebrowser.help_button_okay Play movies moviebrowser.help_button_play Mark movies @@ -1991,22 +1991,25 @@ movieplayer.bookmarkname_hint2 movieplayer.chapters Chapters movieplayer.fileplayback File play movieplayer.head Movieplayer +movieplayer.help_additional To find more user definable key bindings, see "Mainmenu" > "Settings" > "Keys" > "Edit" > "Movieplayer".\n\nWhile movie playback some menuitems in mainmenu are deactivated. +movieplayer.help_button_1 1 minute backward +movieplayer.help_button_2 Jump to movie's start +movieplayer.help_button_3 1 minute forward +movieplayer.help_button_4 3 minutes backward +movieplayer.help_button_5 Jump to movie's middle +movieplayer.help_button_6 3 minutes forward +movieplayer.help_button_7 10 minutes backward +movieplayer.help_button_8 Jump to movie's end +movieplayer.help_button_9 10 minutes forward +movieplayer.help_button_backward Fast rewind +movieplayer.help_button_forward Fast forward +movieplayer.help_button_menu Open main menu +movieplayer.help_button_pause Pause / Continue +movieplayer.help_button_stop Stop movieplayer.plugin Movieplayer plugin movieplayer.starting Starting playback ... movieplayer.titles Titles movieplayer.toomanybookmarks There are too many bookmarks.\nYou need to delete one of them first. -movieplayer.tshelp1 Stop -movieplayer.tshelp10 approx. 10 minutes back -movieplayer.tshelp11 skip approx. 10 minutes -movieplayer.tshelp12 Help: http://www.giggo.de/dbox2/movieplayer.html\n -movieplayer.tshelp2 Select audio track -movieplayer.tshelp3 Pause/Continue -movieplayer.tshelp4 Create bookmark -movieplayer.tshelp5 Show progress -movieplayer.tshelp6 approx. 1 minute back -movieplayer.tshelp7 skip approx. 1 minute -movieplayer.tshelp8 approx. 5 minutes back -movieplayer.tshelp9 skip approx. 5 minutes movieplayer.tsplayback Play TS movieplayer.ytplayback YouTube videoplayer mpkey.audio Audiotracks diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index 6450a1866..dcd277284 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -2201,9 +2201,9 @@ timing.infobar_movieplayer Infobalk (film modus) timing.infobar_radio Infobalk (radio modus) timing.menu Menu timing.numericzap Numeriek Zap -timing.volumebar Volume balk timing.popup_messages Popup messages timing.static_messages Interactive messages +timing.volumebar Volume balk tmdb.read_data Zoeken TMDB data... unicable.lnb Invoer Unicable unicable.qrg Unicable Frequentie diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index 194fb3a84..1eb61286d 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -2402,9 +2402,9 @@ timing.infobar_movieplayer Stavový riadok (filmový mód) timing.infobar_radio Stavový riadok (rádio mód) timing.menu Ponuka timing.numericzap Prepínanie číslami -timing.volumebar Ukazateľ hlasitosti timing.popup_messages Popup messages timing.static_messages Interactive messages +timing.volumebar Ukazateľ hlasitosti tmdb.api_key TMDb API kľúč tmdb.enabled TMDb podpora tmdb.read_data Vyhľadávanie údajov TMDB... diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am index 827520e9d..aa2eab9cc 100644 --- a/data/themes/Makefile.am +++ b/data/themes/Makefile.am @@ -13,6 +13,7 @@ install_DATA = \ Material_Blue-Grey.theme \ Material_Grey_(Dark).theme \ Material_Grey_(Light).theme \ + Material_Grey_(Medium).theme \ MonoChrom.theme \ Neutrino-3.0.theme \ Olive.theme \ diff --git a/data/themes/Material_Grey_(Dark).theme b/data/themes/Material_Grey_(Dark).theme index 2d65c5b10..4a27a36e5 100644 --- a/data/themes/Material_Grey_(Dark).theme +++ b/data/themes/Material_Grey_(Dark).theme @@ -1,39 +1,39 @@ # https://material.google.com/style/color.html#color-color-palette # http://maettig.com/?page=PHP/CSS_Color_Converter -# 900 -menu_Head_red=13 -menu_Head_green=13 -menu_Head_blue=13 +# black +menu_Head_red=0 +menu_Head_green=0 +menu_Head_blue=0 menu_Head_alpha=10 menu_Head_gradient=0 menu_Head_gradient_direction=1 -# 800 -menu_Content_red=26 -menu_Content_green=26 -menu_Content_blue=26 +# 900 +menu_Content_red=13 +menu_Content_green=13 +menu_Content_blue=13 menu_Content_alpha=10 -# 700 -menu_Content_Selected_red=38 -menu_Content_Selected_green=38 -menu_Content_Selected_blue=38 +# 800 +menu_Content_Selected_red=26 +menu_Content_Selected_green=26 +menu_Content_Selected_blue=26 menu_Content_Selected_alpha=10 -# 800 -menu_Content_inactive_red=26 -menu_Content_inactive_green=26 -menu_Content_inactive_blue=26 +# 900 +menu_Content_inactive_red=13 +menu_Content_inactive_green=13 +menu_Content_inactive_blue=13 menu_Content_inactive_alpha=10 menu_Separator_gradient_enable=0 -# 900 -menu_Foot_red=13 -menu_Foot_green=13 -menu_Foot_blue=13 +# black +menu_Foot_red=0 +menu_Foot_green=0 +menu_Foot_blue=0 menu_Foot_alpha=10 menu_ButtonBar_gradient=0 @@ -42,16 +42,16 @@ menu_ButtonBar_gradient_direction=1 menu_Hint_gradient=0 menu_Hint_gradient_direction=1 -# 800 -infobar_red=26 -infobar_green=26 -infobar_blue=26 +# 900 +infobar_red=13 +infobar_green=13 +infobar_blue=13 infobar_alpha=10 -# 800 -infobar_casystem_red=26 -infobar_casystem_green=26 -infobar_casystem_blue=26 +# 900 +infobar_casystem_red=13 +infobar_casystem_green=13 +infobar_casystem_blue=13 infobar_casystem_alpha=10 infobar_gradient_top=0 diff --git a/data/themes/Material_Grey_(Medium).theme b/data/themes/Material_Grey_(Medium).theme new file mode 100644 index 000000000..2d65c5b10 --- /dev/null +++ b/data/themes/Material_Grey_(Medium).theme @@ -0,0 +1,115 @@ +# https://material.google.com/style/color.html#color-color-palette +# http://maettig.com/?page=PHP/CSS_Color_Converter + +# 900 +menu_Head_red=13 +menu_Head_green=13 +menu_Head_blue=13 +menu_Head_alpha=10 + +menu_Head_gradient=0 +menu_Head_gradient_direction=1 + +# 800 +menu_Content_red=26 +menu_Content_green=26 +menu_Content_blue=26 +menu_Content_alpha=10 + +# 700 +menu_Content_Selected_red=38 +menu_Content_Selected_green=38 +menu_Content_Selected_blue=38 +menu_Content_Selected_alpha=10 + +# 800 +menu_Content_inactive_red=26 +menu_Content_inactive_green=26 +menu_Content_inactive_blue=26 +menu_Content_inactive_alpha=10 + +menu_Separator_gradient_enable=0 + +# 900 +menu_Foot_red=13 +menu_Foot_green=13 +menu_Foot_blue=13 +menu_Foot_alpha=10 + +menu_ButtonBar_gradient=0 +menu_ButtonBar_gradient_direction=1 + +menu_Hint_gradient=0 +menu_Hint_gradient_direction=1 + +# 800 +infobar_red=26 +infobar_green=26 +infobar_blue=26 +infobar_alpha=10 + +# 800 +infobar_casystem_red=26 +infobar_casystem_green=26 +infobar_casystem_blue=26 +infobar_casystem_alpha=10 + +infobar_gradient_top=0 +infobar_gradient_top_direction=1 + +infobar_gradient_body=0 +infobar_gradient_body_direction=1 + +infobar_gradient_bottom=0 +infobar_gradient_bottom_direction=1 + +# 500 +clock_Digit_red=62 +clock_Digit_green=62 +clock_Digit_blue=62 +clock_Digit_alpha=0 + +# 500 +colored_events_red=62 +colored_events_green=62 +colored_events_blue=62 +colored_events_alpha=0 + +colored_events_channellist=2 +colored_events_infobar=2 + +# 50 +menu_Head_Text_red=98 +menu_Head_Text_green=98 +menu_Head_Text_blue=98 +menu_Head_Text_alpha=0 + +# 50 +menu_Content_Text_red=98 +menu_Content_Text_green=98 +menu_Content_Text_blue=98 +menu_Content_Text_alpha=0 + +# 50 +menu_Content_Selected_Text_red=98 +menu_Content_Selected_Text_green=98 +menu_Content_Selected_Text_blue=98 +menu_Content_Selected_Text_alpha=0 + +# 500 +menu_Content_inactive_Text_red=62 +menu_Content_inactive_Text_green=62 +menu_Content_inactive_Text_blue=62 +menu_Content_inactive_Text_alpha=0 + +# 50 +menu_Foot_Text_red=98 +menu_Foot_Text_green=98 +menu_Foot_Text_blue=98 +menu_Foot_Text_alpha=0 + +# 50 +infobar_Text_red=98 +infobar_Text_green=98 +infobar_Text_blue=98 +infobar_Text_alpha=0 diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 7fdb702da..ce7a3dbb2 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -636,9 +636,9 @@ void CComponentsForm::ScrollPage(int direction, bool do_paint) int target_page_id = (int)page_count - 1; int target_page = (int)cur_page; - if (direction == SCROLL_P_DOWN) + if (direction == SCROLL_P_UP) target_page = target_page+1 > target_page_id ? 0 : target_page+1; - else if (direction == SCROLL_P_UP) + else if (direction == SCROLL_P_DOWN) target_page = target_page-1 < 0 ? target_page_id : target_page-1; if (do_paint) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 21e58ed7f..585d27700 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -286,9 +286,9 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna fheight2 = std::max( h1, h2 ); } unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE); - fheight = fheight1 + fheight2 + 2; + fheight = fheight1 + fheight2 + OFFSET_INNER_MIN; fwidth1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth("DDD, :, ") + 4 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getMaxDigitWidth(); - fwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth("[ ] ") + 3 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getMaxDigitWidth() + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(unit_short_minute); + //fwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth("[ ] ") + 3 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getMaxDigitWidth() + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(unit_short_minute); listmaxshow = (height-theight-iheight-0)/fheight; height = theight+iheight+0+listmaxshow*fheight; // recalc height @@ -710,7 +710,7 @@ CTimerd::CTimerEventTypes CEventList::isScheduled(t_channel_id channel_id, CChan void CEventList::paintItem(unsigned int pos, t_channel_id channel_idI) { - int ypos = y+ theight+0 + pos*fheight; + int ypos = y+ theight + pos*fheight; unsigned int currpos = liststart + pos; bool i_selected = currpos == selected; @@ -755,18 +755,19 @@ void CEventList::paintItem(unsigned int pos, t_channel_id channel_idI) // 1st line int fwidth1a=g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth(datetime1_str); + fwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(duration_str); - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5, ypos+ fheight1+3, fwidth1a, datetime1_str, color); + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x + OFFSET_INNER_SMALL, ypos + OFFSET_INNER_MIN + fheight2, fwidth1a, datetime1_str, color); int seit = ( evtlist[currpos].startTime - time(NULL) ) / 60; if ( (seit> 0) && (seit<100) && (!duration_str.empty()) ) { char beginnt[100]; snprintf(beginnt, sizeof(beginnt), "%s %d %s", g_Locale->getText(LOCALE_WORD_IN), seit, unit_short_minute); - int w = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(beginnt) + 10; - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20- w, ypos+ fheight1+3, w, beginnt, color); + int w = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(beginnt); + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x + width - 15 - 2*OFFSET_INNER_MID - fwidth2 - w, ypos + OFFSET_INNER_MIN + fheight2, w, beginnt, color); } - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20, ypos+ fheight1+3, fwidth2, duration_str, color); + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x + width - 15 - OFFSET_INNER_MID - fwidth2, ypos + OFFSET_INNER_MIN + fheight2, fwidth2, duration_str, color); // 2nd line // set status icons @@ -780,28 +781,28 @@ void CEventList::paintItem(unsigned int pos, t_channel_id channel_idI) if (timerID > 0 && CRecordManager::getInstance()->CheckRecordingId_if_Timeshift(timerID)) icontype = NEUTRINO_ICON_AUTO_SHIFT; } - int iw = 0, ih; + int iw = 0, ih = 0; if(icontype != 0) { frameBuffer->getIconSize(icontype, &iw, &ih); - frameBuffer->paintIcon(icontype, x+5, ypos + fheight1+3 - (fheight1 - ih)/2, fheight1); + frameBuffer->paintIcon(icontype, x + OFFSET_INNER_MID, ypos + OFFSET_INNER_MIN + fheight2, fheight1); + iw += OFFSET_INNER_MID; } // detecting timer conflict and set start position of event text depending of possible painted icon bool conflict = HasTimerConflicts(evtlist[currpos].startTime, evtlist[currpos].duration, &item_event_ID); - int i2w = 0, i2h; //printf ("etype %d , conflicts %d -> %s, conflict event_ID %d -> current event_ID %d\n", etype, conflict, evtlist[currpos].description.c_str(), item_event_ID, evtlist[currpos].eventID); - //TODO: solution for zapto timer events + int i2w = 0, i2h = 0; if (conflict && item_event_ID != evtlist[currpos].eventID) { //paint_warning = true; frameBuffer->getIconSize(NEUTRINO_ICON_IMPORTANT, &i2w, &i2h); - frameBuffer->paintIcon(NEUTRINO_ICON_IMPORTANT, x+iw+7, ypos + fheight1+3 - (fheight1 - i2h)/2, fheight1); - iw += i2w+4; + frameBuffer->paintIcon(NEUTRINO_ICON_IMPORTANT, x + iw + OFFSET_INNER_MID, ypos + OFFSET_INNER_MIN + fheight2, fheight1); + iw += i2w + OFFSET_INNER_MID; } // paint 2nd line text - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->RenderString(x+10+iw, ypos+ fheight, width- 25- 20 -iw, evtlist[currpos].description, color); + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->RenderString(x + iw + OFFSET_INNER_MID, ypos + fheight, width - iw - 2*OFFSET_INNER_MID, evtlist[currpos].description, color); } } diff --git a/src/gui/followscreenings.cpp b/src/gui/followscreenings.cpp index 294bfb1c6..f01e528cc 100644 --- a/src/gui/followscreenings.cpp +++ b/src/gui/followscreenings.cpp @@ -92,7 +92,7 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK if (i->eventType == CTimerd::TIMER_RECORD) { if (channel_id == i->channel_id && e->startTime == i->epg_starttime) { Timer.removeTimerEvent(i->eventID); - if (!forwarders.empty() && followlist.size() > 1) + if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == 2 /*always*/)) //NI forwarders[ix]->iconName_Info_right = ""; #if 0 else @@ -115,9 +115,9 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true, ch->bUseCI) == -1) { //NI //FIXME -- no error handling, but this shouldn't happen ... } else { - if (!forwarders.empty() && followlist.size() > 1) + if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == 2 /*always*/)) //NI forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC; - else + else if (g_settings.timer_followscreenings != 2 /*always*/) //NI ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO); return menu_return::RETURN_REPAINT; diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 829793d29..9f585b31c 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -270,6 +270,9 @@ CMovieBrowser::~CMovieBrowser() if (m_movieCover) delete m_movieCover; + + if (m_header) + delete m_header; m_header = NULL; } void CMovieBrowser::clearListLines() @@ -337,6 +340,7 @@ void CMovieBrowser::init(void) m_pcInfo1 = NULL; m_pcInfo2 = NULL; m_pcFilter = NULL; + m_header = NULL; m_windowFocus = MB_FOCUS_BROWSER; m_textTitle = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD); @@ -1166,10 +1170,11 @@ int CMovieBrowser::exec(const char* path) void CMovieBrowser::hide(void) { //TRACE("[mb]->%s\n", __func__); - if (m_channelLogo) - { - delete m_channelLogo; - m_channelLogo = NULL; + if (m_channelLogo){ + delete m_channelLogo; m_channelLogo = NULL; + } + if (m_header) { + delete m_header; m_header = NULL; } old_EpgId = 0; framebuffer->paintBackground(); @@ -1410,7 +1415,7 @@ void CMovieBrowser::refreshChannelLogo(void) int x = m_cBoxFrame.iX + m_cBoxFrameTitleRel.iX + m_cBoxFrameTitleRel.iWidth - m_channelLogo->getWidth() - OFFSET_INNER_MID; int y = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iY + (m_cBoxFrameTitleRel.iHeight - m_channelLogo->getHeight())/2; - m_channelLogo->setXPos(x - pb_hdd_offset); + m_channelLogo->setXPos(x - pb_hdd_offset - m_header->getContextBtnObject()->getWidth()); m_channelLogo->setYPos(y); m_channelLogo->hide(); m_channelLogo->paint(); @@ -1640,7 +1645,7 @@ void CMovieBrowser::info_hdd_level(bool paint_hdd) tmp_blocks_percent_used = blocks_percent_used; const short pbw = 100; const short border = m_cBoxFrameTitleRel.iHeight/4; - CProgressBar pb(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2); + CProgressBar pb(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - m_header->getContextBtnObject()->getWidth() - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2); pb.setType(CProgressBar::PB_REDRIGHT); pb.setValues(blocks_percent_used, 100); pb.paint(false); @@ -1927,9 +1932,11 @@ void CMovieBrowser::refreshTitle(void) int w = m_cBoxFrameTitleRel.iWidth; int h = m_cBoxFrameTitleRel.iHeight; - CComponentsHeader header(x, y, w, h, title.c_str(), icon); - header.paint(CC_SAVE_SCREEN_NO); - newHeader = header.isPainted(); + if (!m_header){ + m_header = new CComponentsHeader(x, y, w, h, title.c_str(), icon, CComponentsHeader::CC_BTN_HELP); + } + m_header->paint(CC_SAVE_SCREEN_NO); + newHeader = m_header->isPainted(); info_hdd_level(true); } @@ -2164,7 +2171,11 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) onDelete(); } } - else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) + else if (msg == CRCInput::RC_help) + { + showHelp(); + } + else if (msg == CRCInput::RC_info) { if (m_movieSelectionHandler != NULL) { @@ -3233,11 +3244,9 @@ void CMovieBrowser::loadAllMovieInfo(void) void CMovieBrowser::showHelp(void) { CMovieHelp help; - help.exec(NULL,NULL); + help.exec(); } - - #define MAX_STRING 30 int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) { @@ -3500,7 +3509,6 @@ bool CMovieBrowser::showMenu(bool calledExternally) /********************************************************************/ /** main menu ******************************************************/ - CMovieHelp* movieHelp = new CMovieHelp(); CNFSSmallMenu* nfs = new CNFSSmallMenu(); if (!calledExternally) { @@ -3514,9 +3522,6 @@ bool CMovieBrowser::showMenu(bool calledExternally) mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD, true, NULL, &dirMenu, NULL, CRCInput::RC_2)); mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES, true, NULL, this, "reload_movie_info", CRCInput::RC_3)); //mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_NFS_HEAD, true, NULL, nfs, NULL, CRCInput::RC_setup)); - mainMenu.addItem(GenericMenuSeparatorLine); - mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_HELP_HEAD, true, NULL, movieHelp, NULL, CRCInput::RC_help)); - //mainMenu.addItem(GenericMenuSeparator); mainMenu.exec(NULL, " "); } else @@ -3588,7 +3593,6 @@ bool CMovieBrowser::showMenu(bool calledExternally) for (i = 0; i < MB_MAX_DIRS; i++) delete notifier[i]; - delete movieHelp; delete nfs; return(true); diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index e26c64903..22b982a87 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -164,6 +164,7 @@ class CMovieBrowser : public CMenuTarget CBox m_cBoxFrameFootRel; CBox m_cBoxFrameTitleRel; + CComponentsHeader *m_header; CComponentsDetailLine *m_detailsLine; CComponentsChannelLogo *m_channelLogo; CComponentsPicture *m_movieCover; diff --git a/src/gui/moviebrowser/mb_help.h b/src/gui/moviebrowser/mb_help.h index 5e20cd69c..64882eba3 100644 --- a/src/gui/moviebrowser/mb_help.h +++ b/src/gui/moviebrowser/mb_help.h @@ -40,8 +40,8 @@ #include -// Class to show Moviebrowser Information, to be used by menu -class CMovieHelp : public CMenuTarget +// Class to show moviebrowser's help, to be used by rc_help key +class CMovieHelp { private: @@ -49,35 +49,29 @@ class CMovieHelp : public CMenuTarget CMovieHelp(){}; ~CMovieHelp(){}; - int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) + void exec() { Helpbox helpbox(g_Locale->getText(LOCALE_HELP_BOX_TITLE)); - helpbox.addLine("Standard functions", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 10, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]); - helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); + helpbox.addSeparator(); + helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE)); helpbox.addSeparatorLine(); - helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine("+/- Change view", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); -#if 0 - helpbox.addPagebreak(); -#endif - helpbox.addLine("During playback", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 10, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]); + helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE)); helpbox.addSeparatorLine(); - helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, "Marking menu", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); - helpbox.addLine(NEUTRINO_ICON_BUTTON_0, "Not perform marking action", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU)); + helpbox.addSeparator(); + helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_LEFT)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RIGHT)); helpbox.addExitKey(CRCInput::RC_ok); helpbox.show(); - int ret = helpbox.exec(); + helpbox.exec(); helpbox.hide(); - - return ret; } }; diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 5361252e4..6e4f7b383 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -85,7 +85,6 @@ //NI InfoIcons #include -extern CInfoIcons *InfoIcons; extern cVideo * videoDecoder; extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ @@ -94,6 +93,8 @@ extern CVolume* g_volume; #define TIMESHIFT_SECONDS 3 #define ISO_MOUNT_POINT "/media/iso" +#define MUTE true +#define NO_MUTE false CMoviePlayerGui* CMoviePlayerGui::instance_mp = NULL; CMoviePlayerGui* CMoviePlayerGui::instance_bg = NULL; @@ -224,6 +225,8 @@ void CMoviePlayerGui::Init(void) blockedFromPlugin = false; m_screensaver = false; m_idletime = time(NULL); + m_mode = CTimeOSD::MODE_HIDE; + m_restore = false; } void CMoviePlayerGui::cutNeutrino() @@ -506,11 +509,33 @@ void CMoviePlayerGui::ClearQueue() milist.clear(); } -void CMoviePlayerGui::EnableClockAndMute(bool enable) + +void CMoviePlayerGui::enableOsdElements(bool mute) { - CAudioMute::getInstance()->enableMuteIcon(enable); - CInfoClock::getInstance()->enableInfoClock(enable); - InfoIcons->enableInfoIcons(enable); //NI InfoIcons + if (mute) + CAudioMute::getInstance()->enableMuteIcon(true); + + CInfoClock::getInstance()->enableInfoClock(true); + CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons + + if (m_restore) { + FileTime.setMode(m_mode); + FileTime.update(position, duration); + } +} + +void CMoviePlayerGui::disableOsdElements(bool mute) +{ + if (mute) + CAudioMute::getInstance()->enableMuteIcon(false); + + CInfoClock::getInstance()->enableInfoClock(false); + CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons + + m_mode = FileTime.getMode(); + m_restore = FileTime.IsVisible(); + if (m_restore) + FileTime.kill(); } void CMoviePlayerGui::makeFilename() @@ -614,7 +639,7 @@ bool CMoviePlayerGui::SelectFile() } #endif else if (isMovieBrowser) { - EnableClockAndMute(false); + disableOsdElements(MUTE); if (moviebrowser->exec(Path_local.c_str())) { Path_local = moviebrowser->getCurrentDir(); CFile *file = NULL; @@ -634,9 +659,9 @@ bool CMoviePlayerGui::SelectFile() ret = prepareFile(&p_movie_info->file); } else menu_ret = moviebrowser->getMenuRet(); - EnableClockAndMute(true); + enableOsdElements(MUTE); } else { // filebrowser - EnableClockAndMute(false); + disableOsdElements(MUTE); while (ret == false && filebrowser->exec(Path_local.c_str()) == true) { Path_local = filebrowser->getCurrentDir(); CFile *file = NULL; @@ -658,7 +683,7 @@ bool CMoviePlayerGui::SelectFile() } } menu_ret = filebrowser->getMenuRet(); - EnableClockAndMute(true); + enableOsdElements(MUTE); } g_settings.network_nfs_moviedir = Path_local; @@ -1263,7 +1288,7 @@ bool CMoviePlayerGui::PlayFileStart(void) if (is_file_player) selectAutoLang(); - EnableClockAndMute(true); + enableOsdElements(MUTE); return res; } @@ -1468,7 +1493,7 @@ void CMoviePlayerGui::PlayFileLoop(void) if (timeshift == TSHIFT_MODE_OFF) callInfoViewer(); } else if (!filelist.empty()) { - EnableClockAndMute(false); + disableOsdElements(MUTE); CFileBrowser *playlist = new CFileBrowser(); CFile *pfile = NULL; pfile = &(*filelist_it); @@ -1491,7 +1516,7 @@ void CMoviePlayerGui::PlayFileLoop(void) filelist_it = filelist.begin() + selected; } delete playlist; - EnableClockAndMute(true); + enableOsdElements(MUTE); } } else if (msg == (neutrino_msg_t) g_settings.mpkey_pause) { if (playstate == CMoviePlayerGui::PAUSE) { @@ -1591,14 +1616,13 @@ void CMoviePlayerGui::PlayFileLoop(void) if (!cancel && (3 == sscanf(Value.c_str(), "%d:%d:%d", &hh, &mm, &ss))) SetPosition(1000 * (hh * 3600 + mm * 60 + ss), true); - } else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) { + } else if (msg == CRCInput::RC_help) { + disableOsdElements(NO_MUTE); + showHelp(); + enableOsdElements(NO_MUTE); + } else if (msg == CRCInput::RC_info) { if (fromInfoviewer) { - CTimeOSD::mode m_mode = FileTime.getMode(); - bool restore = FileTime.IsVisible(); - if (restore) - FileTime.kill(); - CInfoClock::getInstance()->enableInfoClock(false); - InfoIcons->enableInfoIcons(false); //NI InfoIcons + disableOsdElements(NO_MUTE); #ifdef ENABLE_LUA if (isLuaPlay && haveLuaInfoFunc) { int xres = 0, yres = 0, aspectRatio = 0, framerate = -1; @@ -1617,12 +1641,7 @@ void CMoviePlayerGui::PlayFileLoop(void) } #endif fromInfoviewer = false; - CInfoClock::getInstance()->enableInfoClock(true); - InfoIcons->enableInfoIcons(true); //NI InfoIcons - if (restore) { - FileTime.setMode(m_mode); - FileTime.update(position, duration); - } + enableOsdElements(NO_MUTE); } else callInfoViewer(); @@ -2236,21 +2255,9 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/) } } } else if (msg == NeutrinoMessages::SHOW_EPG && p_movie_info) { - CTimeOSD::mode m_mode = FileTime.getMode(); - bool restore = FileTime.IsVisible(); - if (restore) - FileTime.kill(); - CInfoClock::getInstance()->enableInfoClock(false); - InfoIcons->enableInfoIcons(false); //NI InfoIcons - + disableOsdElements(NO_MUTE); g_EpgData->show_mp(p_movie_info, position, duration); - - CInfoClock::getInstance()->enableInfoClock(true); - InfoIcons->enableInfoIcons(true); //NI InfoIcons - if (restore) { - FileTime.setMode(m_mode); - FileTime.update(position, duration); - } + enableOsdElements(NO_MUTE); } return; } @@ -2267,22 +2274,34 @@ void CMoviePlayerGui::UpdatePosition() } } -void CMoviePlayerGui::showHelpTS() +void CMoviePlayerGui::showHelp() { Helpbox helpbox(g_Locale->getText(LOCALE_MESSAGEBOX_INFO)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP1)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP2)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP3)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP4)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP5)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_1, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP6)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_3, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP7)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_4, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP8)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_6, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP9)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_7, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP10)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_9, g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP11)); - helpbox.addLine(g_Locale->getText(LOCALE_MOVIEPLAYER_TSHELP12)); + helpbox.addSeparator(); + helpbox.addLine(NEUTRINO_ICON_BUTTON_PAUSE, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_PAUSE)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_FORWARD, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_FORWARD)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_BACKWARD, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_BACKWARD)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_STOP, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_STOP)); + helpbox.addSeparatorLine(); + helpbox.addLine(NEUTRINO_ICON_BUTTON_1, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_1)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_2, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_2)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_3, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_3)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_4, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_4)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_5, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_5)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_6, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_6)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_7, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_7)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_8, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_8)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_9, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_9)); + helpbox.addSeparatorLine(); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_BUTTON_MENU)); + helpbox.addSeparator(); + helpbox.addLine(g_Locale->getText(LOCALE_MOVIEPLAYER_HELP_ADDITIONAL)); + + helpbox.addExitKey(CRCInput::RC_ok); + helpbox.show(); + helpbox.exec(); + helpbox.hide(); } void CMoviePlayerGui::selectChapter() diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 818b1054f..8dfc5b801 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -189,6 +189,9 @@ class CMoviePlayerGui : public CMenuTarget static CMoviePlayerGui* instance_mp; static CMoviePlayerGui* instance_bg; + CTimeOSD::mode m_mode; + bool m_restore; + void Init(void); void PlayFile(); bool PlayFileStart(); @@ -198,7 +201,7 @@ class CMoviePlayerGui : public CMenuTarget bool StartWebtv(); void quickZap(neutrino_msg_t msg); - void showHelpTS(void); + void showHelp(void); void callInfoViewer(bool init_vzap_it = true); void fillPids(); bool getAudioName(int pid, std::string &apidtitle); @@ -221,7 +224,8 @@ class CMoviePlayerGui : public CMenuTarget void Cleanup(); void ClearFlags(); void ClearQueue(); - void EnableClockAndMute(bool enable); + void enableOsdElements(bool mute); + void disableOsdElements(bool mute); static void *ShowStartHint(void *arg); static void* bgPlayThread(void *arg); static bool sortStreamList(livestream_info_t info1, livestream_info_t info2); diff --git a/src/gui/widget/helpbox.cpp b/src/gui/widget/helpbox.cpp index 66cd9d4f2..7d4816dc1 100644 --- a/src/gui/widget/helpbox.cpp +++ b/src/gui/widget/helpbox.cpp @@ -26,7 +26,6 @@ #include #endif - #include #include #include @@ -36,16 +35,13 @@ using namespace std; Helpbox::Helpbox( const string& Title, const string& Default_Text, const int& text_mode, - const int& line_space, + const int& line_height, Font* default_font_text, const char* Icon): CComponentsWindowMax( Title, Icon, NULL, - CC_SHADOW_ON, - COL_MENUCONTENT_PLUS_6, - COL_MENUCONTENT_PLUS_0, - COL_SHADOW_PLUS_0) + CC_SHADOW_ON) { page = 0; hbox_y = 1; @@ -53,18 +49,17 @@ Helpbox::Helpbox( const string& Title, ccw_footer->setButtonLabel(NEUTRINO_ICON_BUTTON_HOME, LOCALE_MESSAGEBOX_BACK); hbox_font = default_font_text; - if (default_font_text == NULL) + if (hbox_font == NULL) hbox_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]; if (!Default_Text.empty()) - addLine(Default_Text.c_str(), Default_Text, text_mode, line_space, HELPBOX_DEFAULT_LINE_INDENT ,hbox_font); + addLine(Default_Text.c_str(), Default_Text, text_mode, line_height, HELPBOX_DEFAULT_LINE_INDENT, hbox_font); //ensure hided channellist, because shared RC_ok CNeutrinoApp::getInstance()->allowChannelList(false); } - -void Helpbox::addLine(const std::string& icon, const std::string& text, const int& text_mode, const int& line_space, const int& line_indent, Font* font_text) +void Helpbox::addLine(const std::string& icon, const std::string& text, const int& text_mode, const int& line_height, const int& line_indent, Font* font_text) { CComponentsItem *pre_item = !ccw_body->empty() ? ccw_body->back() : NULL; //get the last current item @@ -73,52 +68,61 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in hbox_y = pre_item->getYPos() + pre_item->getHeight(); } - int h_line = line_space; Font* font = hbox_font; - if (font_text){ - h_line = max(h_line, font_text->getHeight()); + if (font_text) font = font_text; - } + + int h_line = getLineHeight(line_height, font); CComponentsFrmChain *line = new CComponentsFrmChain(line_indent, hbox_y, 0, h_line); - if ((hbox_y + h_line)>ccw_body->getHeight()){ - addPagebreak(); - line->setYPos(hbox_y); - } - line->setPageNumber(page); int w_body = ccw_body->getWidth(); - line->setWidth(w_body - line_indent - 40); + line->setWidth(w_body - 2*line_indent); line->setXPos(line_indent); line->setColorBody(ccw_body->getColorBody()); CComponentsPicture *picon = NULL; int w_picon = 0; + int h_picon = 0; if (!icon.empty()){ picon = new CComponentsPicture (0, 0, icon); - w_picon = picon->getHeight(); + w_picon = picon->getWidth(); + h_picon = picon->getHeight(); picon->doPaintBg(false); - picon->setYPos(line->getHeight()/2 - w_picon/2); + picon->setYPos(line->getHeight()/2 - h_picon/2); picon->SetTransparent(CFrameBuffer::TM_BLACK); line->addCCItem(picon); } + int txt_height = 0; if (!text.empty()){ - int x_text = w_picon + (picon ? 10 : 0); - CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, line_space, text, text_mode, font); + int x_text = w_picon + (picon ? OFFSET_INNER_MID : 0); + CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, 0, text, text_mode, font); #if 0 //"contrast agent", if you want to see where the text items are drawn. txt->setColorBody(COL_RED); txt->doPaintBg(true); #endif + int lines = txt->getCTextBoxObject()->getLines(); + txt_height = std::max(lines*font->getHeight(), h_line); + txt->setHeight(txt_height); + line->addCCItem(txt); } + + if (txt_height > line->getHeight()) + line->setHeight(txt_height); + + if ((hbox_y + line->getHeight()) > ccw_body->getHeight()) + { + addPagebreak(); + line->setYPos(hbox_y); + } + line->setPageNumber(page); + addWindowItem(line); } - - - -void Helpbox::addSeparatorLine(const int& line_space, const int& line_indent, bool enable_gradient) +void Helpbox::addSeparatorLine(const int& line_height, const int& line_indent) { CComponentsItem *pre_item = !ccw_body->empty() ? ccw_body->back() : NULL; //get the last current item @@ -127,28 +131,29 @@ void Helpbox::addSeparatorLine(const int& line_space, const int& line_indent, bo hbox_y = pre_item->getYPos() + pre_item->getHeight(); } - int h_line = line_space; - - CComponentsFrmChain *line = new CComponentsFrmChain(line_indent, hbox_y, 0, h_line); + CComponentsFrmChain *line = new CComponentsFrmChain(line_indent, hbox_y, 0, getLineHeight(line_height, hbox_font, true)); line->setPageNumber(page); int w_body = ccw_body->getWidth(); - line->setWidth(w_body - line_indent - 40); + line->setWidth(w_body - 2*line_indent); line->setXPos(line_indent); line->setColorBody(ccw_body->getColorBody()); - CComponentsShapeSquare *sepline = new CComponentsShapeSquare (0, 0, line->getWidth(), 2); + CComponentsShapeSquare *sepline = new CComponentsShapeSquare (0, 0, line->getWidth(), 1); //NI sepline->setYPos(line->getHeight()/2 - sepline->getHeight()/2); - sepline->setColorBody(COL_MENUCONTENTINACTIVE_TEXT); - sepline->enableColBodyGradient(enable_gradient); - sepline->setColBodyGradient(CColorGradient::gradientLight2Dark, CFrameBuffer::gradientHorizontal, CColorGradient::light); + sepline->setColorBody(COL_MENUCONTENT_PLUS_1); //NI + if (g_settings.theme.menu_Separator_gradient_enable) + { + sepline->enableColBodyGradient(true); + sepline->setColBodyGradient(CColorGradient::gradientLight2Dark, CFrameBuffer::gradientHorizontal, CColorGradient::light); + } line->addCCItem(sepline); addWindowItem(line); } -void Helpbox::addSeparator(const int& line_space) +void Helpbox::addSeparator(const int& line_height) { CComponentsItem *pre_item = !ccw_body->empty() ? ccw_body->back() : NULL; //get the last current item @@ -157,7 +162,7 @@ void Helpbox::addSeparator(const int& line_space) hbox_y = pre_item->getYPos() + pre_item->getHeight(); } - CComponentsFrmChain *line = new CComponentsFrmChain(0, hbox_y, 0, line_space); + CComponentsFrmChain *line = new CComponentsFrmChain(0, hbox_y, 0, getLineHeight(line_height, hbox_font, true)); line->setPageNumber(page); int w_body = ccw_body->getWidth(); @@ -167,29 +172,21 @@ void Helpbox::addSeparator(const int& line_space) addWindowItem(line); } - - - - -void Helpbox::addLine(const char *icon, const char *text, const int& text_mode, const int& line_space, const int& line_indent, Font* font_text) +void Helpbox::addLine(const char *icon, const char *text, const int& text_mode, const int& line_height, const int& line_indent, Font* font_text) { - addLine(icon, std::string(text), text_mode, line_space, line_indent, font_text); - + addLine(icon, std::string(text), text_mode, line_height, line_indent, font_text); } - -void Helpbox::addLine(const char *text, const int& text_mode, const int& line_space, const int& line_indent, Font* font_text) +void Helpbox::addLine(const char *text, const int& text_mode, const int& line_height, const int& line_indent, Font* font_text) { - addLine("", std::string(text), text_mode, line_space, line_indent, font_text); + addLine("", std::string(text), text_mode, line_height, line_indent, font_text); } -void Helpbox::addLine(const std::string& text, const int& text_mode, const int& line_space, const int& line_indent, Font* font_text) +void Helpbox::addLine(const std::string& text, const int& text_mode, const int& line_height, const int& line_indent, Font* font_text) { - addLine("", text, text_mode, line_space, line_indent, font_text); + addLine("", text, text_mode, line_height, line_indent, font_text); } - - void Helpbox::addPagebreak(void) { page ++; @@ -197,3 +194,15 @@ void Helpbox::addPagebreak(void) hbox_y = 1; } +int Helpbox::getLineHeight(int line_height, Font* font_text, bool separator) +{ + if (font_text == NULL) + return 0; // should not happen + + int h = max(line_height, font_text->getHeight()); + + if (separator) + return h/2; // separators uses half height + + return h; +} diff --git a/src/gui/widget/helpbox.h b/src/gui/widget/helpbox.h index 86a5aed4b..ed173f7fa 100644 --- a/src/gui/widget/helpbox.h +++ b/src/gui/widget/helpbox.h @@ -29,8 +29,9 @@ #include #include -#define HELPBOX_DEFAULT_LINE_HEIGHT 35 -#define HELPBOX_DEFAULT_LINE_INDENT 10 +#define HELPBOX_DEFAULT_LINE_HEIGHT 0 // use font height as default +#define HELPBOX_DEFAULT_LINE_INDENT OFFSET_INNER_MID +#define HELPBOX_DEFAULT_TEXT_MODE CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH class Helpbox : public CComponentsWindowMax { @@ -39,53 +40,128 @@ private: //start position of items on page int hbox_y; + int getLineHeight(int line_height, Font* font_text, bool separator = false); + ///default font Font* hbox_font; public: + /** + * Creates a window with pre defined items added with addLine() or + * inhertited addWindowItem() methods. This allows to add any compatible cc-items types + * e.g. Text, label, infobox, images ... + * NOTE: addLine() members are used only for compatibilty with older implementation + * of lines. + * @param[in] Title + * @li exepts type std::string, defines caption of window + * @param[in] Default_Text + * @li optional: exepts type std::string, defines a pre defined help text + * @param[in] text_mode + * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @param[in] line_height + * @li optional: exepts type int, defines height of line + * @param[in] line_indent + * @li optional: exepts type int, defines lenght of indent from left + * @param[in] font_text + * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + * @param[in] Icon + * @li exepts type const char*, defins the title bar icon and can be name (see /gui/icons.h) or path to an image file + */ Helpbox( const std::string& Title, const std::string& Default_Text = std::string(), - const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, - const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, + const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, Font* font_text = NULL, const char* Icon = NEUTRINO_ICON_INFO); ///show = paint, for compatibility void show(bool do_save_bg = true){ paint(do_save_bg) ;} + + /**Adds an item with pre defined text + * @param[in] text + * @li exepts type std::string + * @param[in] text_mode + * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @param[in] line_height + * @li optional: exepts type int, defines height of line + * @param[in] line_indent + * @li optional: exepts type int, defines lenght of indent from left + * @param[in] font_text + * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + */ void addLine( const std::string& text, - const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, - const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, + const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT, Font* font_text = NULL); + /**Adds an item with pre defined text + * @param[in] text + * @li exepts type const char * + * @param[in] text_mode + * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @param[in] line_height + * @li optional: exepts type int, defines height of line + * @param[in] line_indent + * @li optional: exepts type int, defines lenght of indent from left + * @param[in] font_text + * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + */ void addLine( const char *text, - const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, - const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, + const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT, Font* font_text = NULL); + /**Adds an item with pre defined icon and text + * @param[in] icon + * @li exepts type std::string, icon can be name (see /gui/icons.h) or path to an image file + * @param[in] text + * @li exepts type std::string + * @param[in] text_mode + * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @param[in] line_height + * @li optional: exepts type int, defines height of line + * @param[in] line_indent + * @li optional: exepts type int, defines lenght of indent from left + * @param[in] font_text + * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + */ void addLine( const std::string& icon, const std::string& text, - const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, - const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, + const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT, Font* font_text = NULL); + /**Adds an item with pre defined icon and text + * @param[in] icon + * @li exepts type const char *, icon can be name (see /gui/icons.h) or path to an image file + * @param[in] text + * @li exepts type const char * + * @param[in] text_mode + * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @param[in] line_height + * @li optional: exepts type int, defines height of line + * @param[in] line_indent + * @li optional: exepts type int, defines lenght of indent from left + * @param[in] font_text + * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + */ void addLine( const char *icon, const char *text, - const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, - const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, + const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT, Font* font_text = NULL); - - ///adds a separator as horizontal line, arg 'line_space' defines the space of full separator height, the separator line itself has a defined height of 2px and is centered within line space. + + ///adds a separator as horizontal line, arg 'line_height' defines the space of full separator height, the separator line itself has a defined height of 2px and is centered within line space. ///arg 'line_indent' defines begin of line from left border within body object. - ///arg 'enable_gradient' enable/disable gradient, Note: default = true, but gradient is only effected, if global/theme gradient settings are enabled! - void addSeparatorLine( const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, - const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT, - bool enable_gradient = true); - ///adds a simple empty separator as horizontal space, arg 'line_space' defines the space of full separator height - void addSeparator( const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT); + ///gradient is only effected, if global/theme gradient settings are enabled! + void addSeparatorLine( const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT); + ///adds a simple empty separator as horizontal space, arg 'line_height' defines the space of full separator height + void addSeparator( const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT); void addPagebreak(); diff --git a/src/system/locals.h b/src/system/locals.h index 1398e685a..ad1f3d555 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2018,22 +2018,25 @@ typedef enum LOCALE_MOVIEPLAYER_CHAPTERS, LOCALE_MOVIEPLAYER_FILEPLAYBACK, LOCALE_MOVIEPLAYER_HEAD, + LOCALE_MOVIEPLAYER_HELP_ADDITIONAL, + LOCALE_MOVIEPLAYER_HELP_BUTTON_1, + LOCALE_MOVIEPLAYER_HELP_BUTTON_2, + LOCALE_MOVIEPLAYER_HELP_BUTTON_3, + LOCALE_MOVIEPLAYER_HELP_BUTTON_4, + LOCALE_MOVIEPLAYER_HELP_BUTTON_5, + LOCALE_MOVIEPLAYER_HELP_BUTTON_6, + LOCALE_MOVIEPLAYER_HELP_BUTTON_7, + LOCALE_MOVIEPLAYER_HELP_BUTTON_8, + LOCALE_MOVIEPLAYER_HELP_BUTTON_9, + LOCALE_MOVIEPLAYER_HELP_BUTTON_BACKWARD, + LOCALE_MOVIEPLAYER_HELP_BUTTON_FORWARD, + LOCALE_MOVIEPLAYER_HELP_BUTTON_MENU, + LOCALE_MOVIEPLAYER_HELP_BUTTON_PAUSE, + LOCALE_MOVIEPLAYER_HELP_BUTTON_STOP, LOCALE_MOVIEPLAYER_PLUGIN, LOCALE_MOVIEPLAYER_STARTING, LOCALE_MOVIEPLAYER_TITLES, LOCALE_MOVIEPLAYER_TOOMANYBOOKMARKS, - LOCALE_MOVIEPLAYER_TSHELP1, - LOCALE_MOVIEPLAYER_TSHELP10, - LOCALE_MOVIEPLAYER_TSHELP11, - LOCALE_MOVIEPLAYER_TSHELP12, - LOCALE_MOVIEPLAYER_TSHELP2, - LOCALE_MOVIEPLAYER_TSHELP3, - LOCALE_MOVIEPLAYER_TSHELP4, - LOCALE_MOVIEPLAYER_TSHELP5, - LOCALE_MOVIEPLAYER_TSHELP6, - LOCALE_MOVIEPLAYER_TSHELP7, - LOCALE_MOVIEPLAYER_TSHELP8, - LOCALE_MOVIEPLAYER_TSHELP9, LOCALE_MOVIEPLAYER_TSPLAYBACK, LOCALE_MOVIEPLAYER_YTPLAYBACK, LOCALE_MPKEY_AUDIO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 5684b10fa..546745a13 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2018,22 +2018,25 @@ const char * locale_real_names[] = "movieplayer.chapters", "movieplayer.fileplayback", "movieplayer.head", + "movieplayer.help_additional", + "movieplayer.help_button_1", + "movieplayer.help_button_2", + "movieplayer.help_button_3", + "movieplayer.help_button_4", + "movieplayer.help_button_5", + "movieplayer.help_button_6", + "movieplayer.help_button_7", + "movieplayer.help_button_8", + "movieplayer.help_button_9", + "movieplayer.help_button_backward", + "movieplayer.help_button_forward", + "movieplayer.help_button_menu", + "movieplayer.help_button_pause", + "movieplayer.help_button_stop", "movieplayer.plugin", "movieplayer.starting", "movieplayer.titles", "movieplayer.toomanybookmarks", - "movieplayer.tshelp1", - "movieplayer.tshelp10", - "movieplayer.tshelp11", - "movieplayer.tshelp12", - "movieplayer.tshelp2", - "movieplayer.tshelp3", - "movieplayer.tshelp4", - "movieplayer.tshelp5", - "movieplayer.tshelp6", - "movieplayer.tshelp7", - "movieplayer.tshelp8", - "movieplayer.tshelp9", "movieplayer.tsplayback", "movieplayer.ytplayback", "mpkey.audio", diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 84d53269d..74b193117 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -1176,7 +1176,10 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time, eventInfo.epg_starttime = epg_starttime; eventInfo.channel_id = channel_id; eventInfo.apids = apids; + eventInfo.autoAdjustToEPG = _autoAdjustToEPG; + eventInfo.recordingSafety = _recordingSafety; eventInfo.channel_ci = channel_ci; //NI + recordingDir = recDir; epgTitle=""; autoAdjustToEPG = _autoAdjustToEPG; diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index 1cf9f5b78..165d74017 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -848,7 +848,7 @@ void CBouquetManager::loadWebtv() if (channel) { epg_id = channel->getChannelID(); - INFO("* auto epg_id found for %s: " PRINTF_CHANNEL_ID_TYPE "\n", title, epg_id); + INFO("* auto epg_id found for %s: " PRINTF_CHANNEL_ID_TYPE "", title, epg_id); } } else diff --git a/src/zapit/src/capmt.cpp b/src/zapit/src/capmt.cpp index 01a686439..6a147a237 100644 --- a/src/zapit/src/capmt.cpp +++ b/src/zapit/src/capmt.cpp @@ -34,6 +34,8 @@ #include #include +#include //NI /* to get g_settings */ + //#define DEBUG_CAPMT CCam::CCam() @@ -290,13 +292,11 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start if((oldmask != newmask) || force_update) { INFO(" ##NI: (oldmask != newmask) || force_update)\n"); - if(start) { - cam->setCaMask(newmask); - cam->setSource(source); - if(newmask != 0 && (!filter_channels || !channel->bUseCI)) { - cam->makeCaPmt(channel, true); - cam->setCaPmt(true); - } + cam->setCaMask(newmask); + cam->setSource(source); + if(newmask != 0 && (!filter_channels || !channel->bUseCI)) { + cam->makeCaPmt(channel, true); + cam->setCaPmt(true); } } @@ -308,7 +308,6 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start StopCam(channel_id, cam); #ifdef BOXMODEL_APOLLO CZapitChannel * chan = CServiceManager::getInstance()->GetCurrentChannel(); - INFO(" ##NI: GetCurrentChannel (%s)\n",chan->getName().c_str()); //NI - this is a hack for rezaping to the recording channe //if commig from movieplayer, disable hack @@ -322,93 +321,80 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start //NI #ifdef BOXMODEL_APOLLO - if(mode) { + // disable if option "usable CI channel while recording" set to "all channels" + if(mode && g_settings.ci_mode != 0 /*all channels*/) { if(start) { if ((tunerno >= 0 && tunerno == cDemux::GetSource(cam->getSource())) || (filter_channels && channel->bUseCI)) { rmode = true; INFO(" ##NI: rmode\n"); } + } else rmode = false; } #endif - //NI - if(oldmask == newmask) { - INFO(" ##NI: (oldmask == newmask) do nothing yet\n"); - } - - if(start) { //NI - INFO(" ##NI: (start)\n"); - CaIdVector caids; - cCA::GetInstance()->GetCAIDS(caids); - //uint8_t list = CCam::CAPMT_FIRST; - uint8_t list = CCam::CAPMT_ONLY; - if (channel_map.size() > 1) - list = CCam::CAPMT_ADD; + CaIdVector caids; + cCA::GetInstance()->GetCAIDS(caids); + //uint8_t list = CCam::CAPMT_FIRST; + uint8_t list = CCam::CAPMT_ONLY; + if (channel_map.size() > 1) + list = CCam::CAPMT_ADD; #ifdef BOXMODEL_APOLLO - INFO(" ##NI: channel_map.size() %d\n",channel_map.size()); + INFO(" ##NI: channel_map.size() %d\n",channel_map.size()); + int ci_use_count = 0; + for (it = channel_map.begin(); it != channel_map.end(); ++it) + { + cam = it->second; + channel = CServiceManager::getInstance()->FindChannel(it->first); - int ci_use_count = 0; - bool ts_use = false; //NI - for (it = channel_map.begin(); it != channel_map.end(); ++it) - { - cam = it->second; - channel = CServiceManager::getInstance()->FindChannel(it->first); - - if(!channel || !channel->scrambled) {//NI - INFO("CI: skip, channel not scrambled [%s]\n",channel->getName().c_str()); - continue; - } - ts_use = true; //NI - - if (tunerno >= 0 && tunerno == cDemux::GetSource(cam->getSource())) { - cCA::GetInstance()->SetTS((CA_DVBCI_TS_INPUT)tunerno); + if (tunerno >= 0 && tunerno == cDemux::GetSource(cam->getSource())) { + cCA::GetInstance()->SetTS((CA_DVBCI_TS_INPUT)tunerno); + ci_use_count++; + break; + } else if (filter_channels) { + if (channel && channel->bUseCI) ci_use_count++; - break; - } else if (filter_channels) { - if (channel && channel->bUseCI) - ci_use_count++; - } else - ci_use_count++; - } - if (ci_use_count == 0 && ts_use) { //NI - don't disable TS if SetTS wouldn't call - INFO("CI: not used for [%s], disabling TS\n",channel->getName().c_str()); - cCA::GetInstance()->SetTS(CA_DVBCI_TS_INPUT_DISABLED); - } + } else + ci_use_count++; + } + if (ci_use_count == 0) { + INFO("CI: not used for [%s], disabling TS\n",channel->getName().c_str()); + cCA::GetInstance()->SetTS(CA_DVBCI_TS_INPUT_DISABLED); + } #endif - for (it = channel_map.begin(); it != channel_map.end(); /*++it*/) - { - cam = it->second; - channel = CServiceManager::getInstance()->FindChannel(it->first); - ++it; - if(!channel || !channel->scrambled) //NI - continue; + for (it = channel_map.begin(); it != channel_map.end(); /*++it*/) + { + cam = it->second; + channel = CServiceManager::getInstance()->FindChannel(it->first); + ++it; + if(!channel) + continue; #if 0 - if (it == channel_map.end()) - list |= CCam::CAPMT_LAST; // FIRST->ONLY or MORE->LAST + if (it == channel_map.end()) + list |= CCam::CAPMT_LAST; // FIRST->ONLY or MORE->LAST #endif - cam->makeCaPmt(channel, false, list, caids); - int len; - unsigned char * buffer = channel->getRawPmt(len); - cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_SMARTCARD); + cam->makeCaPmt(channel, false, list, caids); + int len; + unsigned char * buffer = channel->getRawPmt(len); + cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_SMARTCARD); - if (tunerno >= 0 && tunerno != cDemux::GetSource(cam->getSource())) { - INFO("CI: configured tuner %d do not match %d, skip [%s]\n", tunerno, cam->getSource(), channel->getName().c_str()); - } else if (filter_channels && !channel->bUseCI) { - INFO("CI: filter enabled, CI not used for [%s]\n", channel->getName().c_str()); - } else { - useCI = true; //NI - INFO("CI: use CI for [%s]\n", channel->getName().c_str()); - cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI); - } - //list = CCam::CAPMT_MORE; + if (tunerno >= 0 && tunerno != cDemux::GetSource(cam->getSource())) { + INFO("CI: configured tuner %d do not match %d, skip [%s]\n", tunerno, cam->getSource(), channel->getName().c_str()); + } else if (filter_channels && !channel->bUseCI) { + INFO("CI: filter enabled, CI not used for [%s]\n", channel->getName().c_str()); + } else { + useCI = true; //NI + INFO("CI: use CI for [%s]\n", channel->getName().c_str()); + cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI); } - } //NI + //list = CCam::CAPMT_MORE; + } + return true; } diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index 30ff88d49..ea55844a4 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -319,6 +319,7 @@ bool CFEManager::loadSettings() satconfig.use_usals = 0; satconfig.input = 0; satconfig.configured = 0; + satconfig.delsys = UNKNOWN_DS; satmap.insert(satellite_pair_t(position, satconfig));