From 01c6cf0104d8edc7006ec5f8c1569bdd3898daab Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 4 Feb 2013 15:07:27 +0100 Subject: [PATCH 01/17] - yweb: disable horizontal scrolling in screenshot-pages --- src/nhttpd/web/Y_Main.css | 8 ++++++++ src/nhttpd/web/Y_Tools_remote_osd.yhtm | 8 ++++++-- src/nhttpd/web/Y_Version.txt | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/nhttpd/web/Y_Main.css b/src/nhttpd/web/Y_Main.css index 7f48c980d..83ec64950 100644 --- a/src/nhttpd/web/Y_Main.css +++ b/src/nhttpd/web/Y_Main.css @@ -846,3 +846,11 @@ a.timer { .lt_table td { white-space: pre-wrap; } + +/* screenshots */ +td.shot { + vertical-align: top; +} +img#shot { + width: 100%; +} diff --git a/src/nhttpd/web/Y_Tools_remote_osd.yhtm b/src/nhttpd/web/Y_Tools_remote_osd.yhtm index f45c62466..476286fa0 100644 --- a/src/nhttpd/web/Y_Tools_remote_osd.yhtm +++ b/src/nhttpd/web/Y_Tools_remote_osd.yhtm @@ -37,8 +37,12 @@ function do_clearshot2(){ - - + +
{=include-block:Y_Blocks.txt;remote=} + {=include-block:Y_Blocks.txt;remote=} + + +
diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index e8859d88d..224de84ad 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.8.0.31 -date=19.11.2012 +version=2.8.0.32 +date=04.02.2013 type=Release info=Port Coolstream From d8bd46e9d1d94aae3f46ec6a96084399c28150a0 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 4 Feb 2013 22:25:15 +0100 Subject: [PATCH 02/17] - channellist: make miniTV switchable --- data/locale/deutsch.locale | 7 +++++-- data/locale/english.locale | 7 +++++-- src/gui/channellist.cpp | 22 +++++++++++++--------- src/gui/osd_setup.cpp | 15 ++++++++++++--- src/neutrino.cpp | 4 ++-- src/system/locals.h | 7 +++++-- src/system/locals_intern.h | 7 +++++-- src/system/settings.h | 2 +- 8 files changed, 48 insertions(+), 23 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 0cdfc45f8..4fd9fcb3b 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -200,6 +200,10 @@ bouquetname.new Neue Kanäle bouquetname.other Unbekannter Provider bouquetname.removed Gelöschte Kanäle cablesetup.provider Kabelanbieter +channellist.additional Zusatzinformationen +channellist.additional_off aus +channellist.additional_on ein +channellist.additional_on_minitv ein (mit MiniTV) channellist.current_tp Aktueller Transponder channellist.edit Bearbeiten channellist.epgtext_align_left links @@ -220,7 +224,6 @@ channellist.keep_numbers Dauerhafte Kanalnummern channellist.make_hdlist Erzeuge Bouquet mit HD-Kanälen channellist.make_newlist Erzeuge Bouquet mit neuen Kanälen channellist.make_removedlist Erzeuge Bouquet mit gelöschten Kanälen -channellist.minitv Kanalliste mit MiniTV channellist.new_zap_mode Quickzap in Liste channellist.nonefound Es wurden keine Kanäle gefunden!\nFühren Sie bitte eine Kanalsuche durch\n(MENU-Taste -> Service) channellist.provs Anbieter @@ -734,12 +737,12 @@ menu.hint_cache_txt Startet das Zwischenspeichern des Teletext nach\nKanalwechse menu.hint_cec_mode CEC-Modus menu.hint_cec_standby CEC-Standby menu.hint_cec_view_on CEC view ON +menu.hint_channellist_additional Definiert, ob zusätzliche Informationen im Hauptfenster angezeigt werden sollen menu.hint_channellist_colored Definiert ob die aktuelle oder nächste Sendung in einer anderen Farbe dargestellt werden soll menu.hint_channellist_epg_align Hier kann man festlegen, wie der Text für das EPG in der Liste\nrechts vom Programmnamen ausgerichtet wird menu.hint_channellist_extended Bei aktivierter Funktion wird vor dem Sendernamen ein Balken eingeblendet,\nder den Sendungsfortschritt anzeigt menu.hint_channellist_fonts Ändern Sie in der Kanalliste die Schriftgrößen menu.hint_channellist_foot Definiert welche Informationen im unteren Sendungsfenster angezeigt werden sollen -menu.hint_channellist_minitv Schaltet den MiniTV Modus ein/aus menu.hint_channellist_setup Hier können Sie Anzeigeoptionen für die Kanalliste auswählen menu.hint_ci Conditional-Access-Menü zum Einrichten\nIhres CI-Moduls oder der eingebetteten Conax-Karte menu.hint_colors Konfigurieren Sie die Menü-Farben diff --git a/data/locale/english.locale b/data/locale/english.locale index 59e417038..d056c15a4 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -200,6 +200,10 @@ bouquetname.new New channels bouquetname.other Unknown provider bouquetname.removed Removed channels cablesetup.provider cable provider +channellist.additional Additional informations +channellist.additional_off off +channellist.additional_on on +channellist.additional_on_minitv on (with MiniTV) channellist.current_tp Current transponder channellist.edit Edit channellist.epgtext_align_left left @@ -220,7 +224,6 @@ channellist.keep_numbers Persistent channel numbers channellist.make_hdlist Create list of HD channels channellist.make_newlist Create list of new channels channellist.make_removedlist Create list of removed channels -channellist.minitv Channellist with MiniTV channellist.new_zap_mode Quickzap in list channellist.nonefound No channels were found!\nPlease execute a scan\n(MENU-key -> service) channellist.provs Providers @@ -734,12 +737,12 @@ menu.hint_cache_txt Start teletext caching after channel switch menu.hint_cec_mode CEC mode menu.hint_cec_standby CEC standby menu.hint_cec_view_on CEC view ON +menu.hint_channellist_additional Show additional informations\nin main box menu.hint_channellist_colored Use different color for current or next event menu.hint_channellist_epg_align EPG event align menu.hint_channellist_extended Show current event progress bar menu.hint_channellist_fonts Change channel list font sizes menu.hint_channellist_foot Show additional information\nin bottom box -menu.hint_channellist_minitv Switches the MiniTV mode on/off menu.hint_channellist_setup Configure channe list GUI options menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card menu.hint_colors Configure GUI colors diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 7fbe6b0e3..aa3baa67e 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -468,7 +468,7 @@ void CChannelList::calcSize() 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) + if (g_settings.channellist_additional) height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0); CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, name.c_str()); @@ -501,7 +501,7 @@ 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) + if (g_settings.channellist_additional) { width = frameBuffer->getScreenWidth() / 3 * 2; widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX() - 2*ConnectLineBox_Width; @@ -511,7 +511,10 @@ void CChannelList::calcSize() y = frameBuffer->getScreenY(); infozone_width = widthDetails - width; pig_width = infozone_width; - pig_height = (pig_width * 9) / 16; + if (g_settings.channellist_additional == 2) // with miniTV + pig_height = (pig_width * 9) / 16; + else + pig_height = 0; infozone_height = height - theight - pig_height - footerHeight; } else @@ -570,7 +573,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,7 +909,7 @@ int CChannelList::show() void CChannelList::hide() { - if (g_settings.channellist_minitv) + if (g_settings.channellist_additional == 2) // with miniTV { // widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX(); videoDecoder->Pig(-1, -1, -1, -1); @@ -1593,7 +1596,7 @@ void CChannelList::paintDetails(int index) 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 } } - if ((g_settings.channellist_minitv) && (p_event != NULL)) + if ((g_settings.channellist_additional) && (p_event != NULL)) paint_events(index); } @@ -1995,9 +1998,10 @@ void CChannelList::paintHead() 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()); @@ -2137,7 +2141,7 @@ void CChannelList::paint_events(int index) 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, y+ theight+ pig_height + i*ffheight, timewidth, text1, COL_MENUCONTENTINACTIVE, 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); } else diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 3fd4e292d..c2edea012 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -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 diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 3974c1178..f7e09d56b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -605,12 +605,12 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.mode_clock = configfile.getInt32( "mode_clock", 0); g_settings.zapto_pre_time = configfile.getInt32( "zapto_pre_time", 0); g_settings.spectrum = configfile.getBool("spectrum" , false); + g_settings.channellist_additional = configfile.getInt32("channellist_additional", 0); //default off g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false); g_settings.channellist_extended = configfile.getBool("channellist_extended" , true); g_settings.channellist_foot = configfile.getInt32("channellist_foot" , 1);//default next Event g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 1); g_settings.channellist_sort_mode = configfile.getInt32("channellist_sort_mode", 0);//sort mode: alpha, freq, sat - g_settings.channellist_minitv = configfile.getInt32("channellist_minitv", 0); //default off //screen configuration g_settings.screen_xres = configfile.getInt32("screen_xres", 100); @@ -1027,11 +1027,11 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "mode_clock", g_settings.mode_clock ); configfile.setInt32( "zapto_pre_time", g_settings.zapto_pre_time ); configfile.setBool("spectrum", g_settings.spectrum); + configfile.setInt32("channellist_additional", g_settings.channellist_additional); configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right); configfile.setBool("channellist_extended" , g_settings.channellist_extended); configfile.setInt32("channellist_foot" , g_settings.channellist_foot); configfile.setInt32("channellist_new_zap_mode", g_settings.channellist_new_zap_mode); - configfile.setInt32("channellist_minitv", g_settings.channellist_minitv); configfile.setInt32("remote_control_hardware", g_settings.remote_control_hardware); configfile.setBool ( "audiochannel_up_down_enable", g_settings.audiochannel_up_down_enable ); configfile.setInt32("channellist_sort_mode", g_settings.channellist_sort_mode); diff --git a/src/system/locals.h b/src/system/locals.h index 12bac4375..a92c67abd 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -227,6 +227,10 @@ typedef enum LOCALE_BOUQUETNAME_OTHER, LOCALE_BOUQUETNAME_REMOVED, LOCALE_CABLESETUP_PROVIDER, + LOCALE_CHANNELLIST_ADDITIONAL, + LOCALE_CHANNELLIST_ADDITIONAL_OFF, + LOCALE_CHANNELLIST_ADDITIONAL_ON, + LOCALE_CHANNELLIST_ADDITIONAL_ON_MINITV, LOCALE_CHANNELLIST_CURRENT_TP, LOCALE_CHANNELLIST_EDIT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT, @@ -247,7 +251,6 @@ typedef enum LOCALE_CHANNELLIST_MAKE_HDLIST, LOCALE_CHANNELLIST_MAKE_NEWLIST, LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, - LOCALE_CHANNELLIST_MINITV, LOCALE_CHANNELLIST_NEW_ZAP_MODE, LOCALE_CHANNELLIST_NONEFOUND, LOCALE_CHANNELLIST_PROVS, @@ -761,12 +764,12 @@ typedef enum LOCALE_MENU_HINT_CEC_MODE, LOCALE_MENU_HINT_CEC_STANDBY, LOCALE_MENU_HINT_CEC_VIEW_ON, + LOCALE_MENU_HINT_CHANNELLIST_ADDITIONAL, LOCALE_MENU_HINT_CHANNELLIST_COLORED, LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN, LOCALE_MENU_HINT_CHANNELLIST_EXTENDED, LOCALE_MENU_HINT_CHANNELLIST_FONTS, LOCALE_MENU_HINT_CHANNELLIST_FOOT, - LOCALE_MENU_HINT_CHANNELLIST_MINITV, LOCALE_MENU_HINT_CHANNELLIST_SETUP, LOCALE_MENU_HINT_CI, LOCALE_MENU_HINT_COLORS, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 03cea3b94..d65c50631 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -227,6 +227,10 @@ const char * locale_real_names[] = "bouquetname.other", "bouquetname.removed", "cablesetup.provider", + "channellist.additional", + "channellist.additional_off", + "channellist.additional_on", + "channellist.additional_on_minitv", "channellist.current_tp", "channellist.edit", "channellist.epgtext_align_left", @@ -247,7 +251,6 @@ const char * locale_real_names[] = "channellist.make_hdlist", "channellist.make_newlist", "channellist.make_removedlist", - "channellist.minitv", "channellist.new_zap_mode", "channellist.nonefound", "channellist.provs", @@ -761,12 +764,12 @@ const char * locale_real_names[] = "menu.hint_cec_mode", "menu.hint_cec_standby", "menu.hint_cec_view_on", + "menu.hint_channellist_additional", "menu.hint_channellist_colored", "menu.hint_channellist_epg_align", "menu.hint_channellist_extended", "menu.hint_channellist_fonts", "menu.hint_channellist_foot", - "menu.hint_channellist_minitv", "menu.hint_channellist_setup", "menu.hint_ci", "menu.hint_colors", diff --git a/src/system/settings.h b/src/system/settings.h index cb6261825..e13334304 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -416,12 +416,12 @@ struct SNeutrinoSettings int pip_y; int bigFonts; int big_windows; + int channellist_additional; int channellist_epgtext_align_right; int channellist_extended; int channellist_foot; int channellist_new_zap_mode; int channellist_sort_mode; - int channellist_minitv; char repeat_blocker[4]; char repeat_genericblocker[4]; int remote_control_hardware; From ce0025c7cde8bc2016ebe376cc624e632ac36c2e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 4 Feb 2013 23:43:16 +0100 Subject: [PATCH 03/17] - osd_setup.cpp: add 'channellist.additional' to channellist's submenu very ugly: same code two times --- src/gui/osd_setup.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index c2edea012..1d23aa17c 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -902,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); From ee0cb25258a30e455c06bea98b5aab02f3c24fdd Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Feb 2013 00:30:16 +0100 Subject: [PATCH 04/17] - channellist.cpp: fix shortcuts in submenu and add a seperator line --- src/gui/channellist.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index aa3baa67e..075eac562 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -304,6 +304,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 +334,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; From e07e95bfb24a450dd2461df46a50d8c3583c5bb4 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Feb 2013 00:44:13 +0100 Subject: [PATCH 05/17] - osd_setup.cpp: fix color-hotkey for channellist-submenu and add a seperator line --- src/gui/osd_setup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 1d23aa17c..a5e4e8fd6 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -926,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); @@ -940,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); From 3bdb3bbc07d5d0b2f80c9cf6b3a9bb04afa58f44 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Feb 2013 00:58:31 +0100 Subject: [PATCH 06/17] - channellist.cpp: fix wrong time for no further events patch by TangoCash. thx! --- src/gui/channellist.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 075eac562..495ba5c86 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2114,6 +2114,7 @@ void CChannelList::paint_events(int index) evt.description = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); evt.eventID = 0; + evt.startTime = time_t(82800); evtlist.push_back(evt); } @@ -2170,6 +2171,7 @@ void CChannelList::readEvents(const t_channel_id channel_id) CChannelEvent evt; evt.description = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); evt.eventID = 0; + evt.startTime = time_t(82800); evtlist.push_back(evt); } else From 54ed166d1faffa57f215b1a4ba1a46af4c1776a0 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Feb 2013 01:36:28 +0100 Subject: [PATCH 07/17] - channellist.cpp: remove time for no further events thx to TangoCash. --- src/gui/channellist.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 495ba5c86..7055a4259 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2102,7 +2102,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); @@ -2114,7 +2115,6 @@ void CChannelList::paint_events(int index) evt.description = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); evt.eventID = 0; - evt.startTime = time_t(82800); evtlist.push_back(evt); } @@ -2137,15 +2137,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_MENUCONTENTINACTIVE, 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", text1, e->description.c_str()); + startTimeWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(startTime, true); + 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 { @@ -2171,7 +2176,6 @@ void CChannelList::readEvents(const t_channel_id channel_id) CChannelEvent evt; evt.description = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); evt.eventID = 0; - evt.startTime = time_t(82800); evtlist.push_back(evt); } else From d6f4ea5baa296764f00d986498e34b753c6f89f4 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Feb 2013 17:01:18 +0100 Subject: [PATCH 08/17] - channellist.cpp: determinate startTimeWidth from a fixed value --- src/gui/channellist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 7055a4259..914d88ef9 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2145,8 +2145,8 @@ void CChannelList::paint_events(int index) { struct tm *tmStartZeit = localtime(&e->startTime); strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit ); - //printf("%s %s\n", text1, e->description.c_str()); - startTimeWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(startTime, true); + //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; } From d4635b690f00fe5f27a53454e64db84d50633bc1 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Feb 2013 23:56:48 +0100 Subject: [PATCH 09/17] - channellist.cpp: 'fix' the double determination of dimensions/coordinates --- src/gui/channellist.cpp | 93 +++++++++++++++++++---------------------- src/gui/channellist.h | 18 ++++---- 2 files changed, 52 insertions(+), 59 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 914d88ef9..b08e32b6f 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -466,12 +466,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)); + + full_width = frameBuffer->getScreenWidth() - frameBuffer->getScreenX() - 2*ConnectLineBox_Width; if (g_settings.channellist_additional) - height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0); + 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()); @@ -503,27 +510,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_additional) - { - 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; - if (g_settings.channellist_additional == 2) // with miniTV - pig_height = (pig_width * 9) / 16; - else - pig_height = 0; - infozone_height = height - theight - pig_height - footerHeight; - } + infozone_width = full_width - width; + pig_width = infozone_width; + if (g_settings.channellist_additional == 2) // with miniTV + pig_height = (pig_width * 9) / 16; 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) @@ -913,10 +906,10 @@ void CChannelList::hide() { if (g_settings.channellist_additional == 2) // with miniTV { -// widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX(); +// full_width = 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(); } @@ -1505,7 +1498,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 @@ -1529,7 +1522,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; @@ -1537,7 +1530,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()) @@ -1547,7 +1540,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())) { @@ -1556,7 +1549,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 ) { @@ -1564,12 +1557,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; @@ -1581,7 +1574,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}; @@ -1594,8 +1587,8 @@ 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_additional) && (p_event != NULL)) @@ -1627,7 +1620,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); } } } @@ -1637,14 +1630,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); } } } @@ -1733,7 +1726,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) @@ -1975,18 +1968,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; } @@ -1995,7 +1988,7 @@ 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() diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 4cc43c068..5218a2ee7 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -72,16 +72,16 @@ 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; bool historyMode; bool vlist; // "virtual" list, not bouquet From c6155f29b461fb70a50fc759f31e9913fe39bbf8 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 6 Feb 2013 21:19:49 +0100 Subject: [PATCH 10/17] - channellist.cpp: fix restore to fullTV ... when turning miniTV off from the menu inside the channellist --- src/gui/channellist.cpp | 5 +++-- src/gui/channellist.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index b08e32b6f..524266775 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; 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); } @@ -433,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 ? @@ -904,9 +906,8 @@ int CChannelList::show() void CChannelList::hide() { - if (g_settings.channellist_additional == 2) // with miniTV + if ((g_settings.channellist_additional == 2) || (previous_channellist_additional == 2)) // with miniTV { -// full_width = frameBuffer->getScreenWidth() - frameBuffer->getScreenX(); videoDecoder->Pig(-1, -1, -1, -1); } frameBuffer->paintBackgroundBoxRel(x, y, full_width, height+ info_height+ 5); diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 5218a2ee7..4e22099f3 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -82,6 +82,7 @@ private: int pig_height; int infozone_width; int infozone_height; + int previous_channellist_additional; bool historyMode; bool vlist; // "virtual" list, not bouquet From c2668d2f2cff77d13759afbcec9203a5ef35df7e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 6 Feb 2013 22:14:10 +0100 Subject: [PATCH 11/17] - yweb: rework Y_Tools_remote_osd.yhtm * use only one file to make osd-shots * add a (not really) zoom-function * add posibility to change filename * add needed locals * remove Y_Tools_fbshot.yhtm --- src/nhttpd/web/Makefile.am | 1 - src/nhttpd/web/Y_Boxcontrol_Menue.yhtm | 7 ++-- src/nhttpd/web/Y_Main.css | 4 ++ src/nhttpd/web/Y_Tools_fbshot.yhtm | 56 -------------------------- src/nhttpd/web/Y_Tools_remote_osd.yhtm | 35 +++++++++++----- src/nhttpd/web/Y_Version.txt | 4 +- src/nhttpd/web/languages/Deutsch | 2 + src/nhttpd/web/languages/English | 2 + 8 files changed, 38 insertions(+), 73 deletions(-) delete mode 100644 src/nhttpd/web/Y_Tools_fbshot.yhtm diff --git a/src/nhttpd/web/Makefile.am b/src/nhttpd/web/Makefile.am index 7a1a58268..094ff6968 100644 --- a/src/nhttpd/web/Makefile.am +++ b/src/nhttpd/web/Makefile.am @@ -75,7 +75,6 @@ install_DATA = channels.js \ Y_Tools_Boxcontrol.yhtm \ Y_Tools_Check_Install.yhtm \ Y_Tools_Cmd.yhtm \ - Y_Tools_fbshot.yhtm \ Y_Tools_Flash_Menue.yhtm \ Y_Tools_Flash_Upload.yhtm \ Y_Tools_Info_Menue.yhtm \ diff --git a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm index c75361b24..88d93b977 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm @@ -72,8 +72,7 @@ function init(){ {=var-set:lcshot={=if-file-exists:/bin/lcshot~true~{=if-file-exists:/var/bin/lcshot~true~false=}=}=} -{=var-set:fbshot={=if-file-exists:/bin/fbshot~true~{=if-file-exists:/var/bin/fbshot~true~{=if-file-exists:/bin/dboxshot~true~{=if-file-exists:/var/bin/dboxshot~true~false=}=}=}=}=} -{=var-set:dboxshot={=if-file-exists:/bin/dboxshot~true~{=if-file-exists:/var/bin/dboxshot~true~false=}=}=} +{=var-set:fbshot={=if-file-exists:/bin/fbshot~true~{=if-file-exists:/var/bin/fbshot~true~false=}=}=}

{=L:main.boxcontrol=}

@@ -106,13 +105,13 @@ function init(){
  • {=if-equal:{=var-get:fbshot=}~true~ - {=L:bc.menue.osd_screenshot=} + {=L:bc.menue.osd_screenshot=} ~ {=L:bc.menue.osd_screenshot=} =}
  • - {=if-equal:{=var-get:dboxshot=}~true~ + {=if-equal:{=var-get:fbshot=}~true~ {=L:bc.menue.remote_osd=} ~ {=L:bc.menue.remote_osd=} diff --git a/src/nhttpd/web/Y_Main.css b/src/nhttpd/web/Y_Main.css index 83ec64950..45255fb96 100644 --- a/src/nhttpd/web/Y_Main.css +++ b/src/nhttpd/web/Y_Main.css @@ -853,4 +853,8 @@ td.shot { } img#shot { width: 100%; + background-color: #ffffff; +} +img#shot:hover { + cursor: pointer; } diff --git a/src/nhttpd/web/Y_Tools_fbshot.yhtm b/src/nhttpd/web/Y_Tools_fbshot.yhtm deleted file mode 100644 index 9b16935f4..000000000 --- a/src/nhttpd/web/Y_Tools_fbshot.yhtm +++ /dev/null @@ -1,56 +0,0 @@ -{=var-set:cancache=yPInstall=} -{=include-block:Y_Blocks.txt;head=} - - - - -{=var-set:wait_text={=L:bc.osd.shap_wait_text=}=}{=include-block:Y_Blocks.txt;snip_wait=} -
    -
    - {=var-set:help_url=Help-BoxControl-OSD_Screenshot=}{=var-set:menu={=L:bc.menue.osd_screenshot=}=}{=include-block:Y_Blocks.txt;work_menu=}
    -
    - - {=var-set:dboxshot={=if-file-exists:/bin/dboxshot~true~{=if-file-exists:/var/bin/dboxshot~true~false=}=}=} - -  Filename: -
    - -
    -
    - - diff --git a/src/nhttpd/web/Y_Tools_remote_osd.yhtm b/src/nhttpd/web/Y_Tools_remote_osd.yhtm index 476286fa0..4a30ff29f 100644 --- a/src/nhttpd/web/Y_Tools_remote_osd.yhtm +++ b/src/nhttpd/web/Y_Tools_remote_osd.yhtm @@ -7,14 +7,16 @@ function rcsim(_key) { $('statusline').show(); $('buttons').hide(); dbox_rcsim(_key); - window.setTimeout("do_dboxshot()",750); + window.setTimeout("do_snapshot()",750); } -function do_dboxshot(){ - var res = dbox_exec_tools("fbshot fb /tmp/a.png"); +function do_snapshot(){ + var filename = id("filename").value; + var res = dbox_exec_tools("fbshot fb /tmp/"+filename+".png"); var _shot = document.getElementById("shot"); - _shot.src = "/tmp/a.png?"+Math.random(); + _shot.src = "/tmp/"+filename+".png?"+Math.random(); $('statusline').hide(); $('buttons').show(); + show_obj("shot", true); } function do_clearshot(){ window.setTimeout("do_clearshot2()", 500); @@ -22,26 +24,39 @@ function do_clearshot(){ function do_clearshot2(){ dbox_exec_tools("fbshot_clear"); } +function do_zoomshot(){ + // not a really zoom-function + var _remote = document.getElementById('remote'); + + if (_remote.style.display == 'none') + _remote.style.display='inline'; + else + _remote.style.display='none'; +} //]]> - -
    + +
    {=var-set:help_url=Help-BoxControl-Remote_OSD=}{=var-set:menu={=L:bc.menue.remote_osd=}=}{=include-block:Y_Blocks.txt;work_menu=}
    - + wait
    -
    + {=include-block:Y_Blocks.txt;remote=} - +
    diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index 224de84ad..6e468eaee 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.8.0.32 -date=04.02.2013 +version=2.8.0.33 +date=06.02.2013 type=Release info=Port Coolstream diff --git a/src/nhttpd/web/languages/Deutsch b/src/nhttpd/web/languages/Deutsch index 54c919d3e..95a5977ee 100644 --- a/src/nhttpd/web/languages/Deutsch +++ b/src/nhttpd/web/languages/Deutsch @@ -51,6 +51,7 @@ check=Prüfen help=Hilfe attention=Achtung! directory=Verzeichnis +filename=Dateiname restriced_by_management_ip=Zugriff verwehrt wg. ManagementIP # ==========Main Menue @@ -128,6 +129,7 @@ bc.msg.send_message=Nachricht senden ======== Boxcontrol - Remote & OSD bc.osd.shot=Schnappschuss bc.osd.delete_shots=Schnappschuss löschen +bc.osd.zoom_shot=Schnappschuss zoomen bc.osd.shap_wait_text=Schnappschuss wird erstellt ======== Boxcontrol - TV-Screenshot diff --git a/src/nhttpd/web/languages/English b/src/nhttpd/web/languages/English index b4a2e43e9..4bedd9afa 100644 --- a/src/nhttpd/web/languages/English +++ b/src/nhttpd/web/languages/English @@ -51,6 +51,7 @@ check=check help=Help attention=Attention! directory=Directory +filename=Filename restriced_by_management_ip=restricted by ManagementIP #========= MAIN Menue @@ -130,6 +131,7 @@ bc.msg.send_message=send message ======== Boxcontrol - Remote & OSD bc.osd.shot=Shot bc.osd.delete_shots=Delete shots +bc.osd.zoom_shot=Zoom shot bc.osd.shap_wait_text=Take Snapshot ======== Boxcontrol - TV-Screenshot From f2a1895eebd0c63b001fe62a5fb5f96afb25bcb1 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 7 Feb 2013 15:26:10 +0400 Subject: [PATCH 12/17] src/Makefile.am: add libca-cs --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 93560a0cb..1dbe2c091 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -106,7 +106,7 @@ endif if BOXTYPE_COOL neutrino_LDADD += \ - -lcoolstream-mt \ + -lcoolstream-mt -lca-sc \ -lnxp bin_PROGRAMS += drivertool From 31080fa98c63942d32e21389bdaca0a14438228f Mon Sep 17 00:00:00 2001 From: TangoCash Date: Sat, 9 Feb 2013 10:36:11 +0100 Subject: [PATCH 13/17] - channellist.cpp: add epg-desc to blue button ... ... if g_settings.channellist_additional is not off. initially patch by TangoCash with marginal modifications --- src/gui/channellist.cpp | 115 ++++++++++++++++++++++++++++++++++++++-- src/gui/channellist.h | 8 +++ 2 files changed, 119 insertions(+), 4 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 524266775..cc0189d75 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -452,6 +452,7 @@ int CChannelList::doChannelMenu(void) int CChannelList::exec() { displayNext = 0; // always start with current events + displayList = 1; // always start with event list int nNewChannel = show(); if ( nNewChannel > -1 && nNewChannel < (int) chanlist.size()) { if(this->historyMode && chanlist[nNewChannel]) { @@ -698,6 +699,7 @@ int CChannelList::show() } else if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup) { + displayList = 1; int step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1 int new_selected = selected - step; if (new_selected < 0) { @@ -710,6 +712,7 @@ int CChannelList::show() } else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown) { + displayList = 1; int step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1 int new_selected = selected + step; if (new_selected >= (int) chanlist.size()) { @@ -840,9 +843,16 @@ int CChannelList::show() } else if ( msg == CRCInput::RC_blue ) { - displayNext = !displayNext; + if (g_settings.channellist_additional) + displayList = !displayList; + else + displayNext = !displayNext; + paintHead(); // update button bar paint(); + + if (!displayList && g_settings.channellist_additional) + showdescription(selected); } else if ( msg == CRCInput::RC_green ) { @@ -1683,10 +1693,20 @@ void CChannelList::paintButtonBar(bool is_current) int Bindex = 2 + (smode ? 1:0); //manage now/next button - if (displayNext) - Button[Bindex].locale = LOCALE_INFOVIEWER_NOW; + if (g_settings.channellist_additional) + { + if (displayList) + Button[Bindex].locale = LOCALE_FONTSIZE_CHANNELLIST_DESCR; + else + Button[Bindex].locale = LOCALE_FONTMENU_EVENTLIST; + } else - Button[Bindex].locale = LOCALE_INFOVIEWER_NEXT; + { + if (displayNext) + Button[Bindex].locale = LOCALE_INFOVIEWER_NOW; + else + Button[Bindex].locale = LOCALE_INFOVIEWER_NEXT; + } Bindex++; //manage record button @@ -2177,3 +2197,90 @@ void CChannelList::readEvents(const t_channel_id channel_id) return; } + +void CChannelList::showdescription(int index) +{ + CZapitChannel* chan = chanlist[index]; + CChannelEvent *p_event=NULL; + p_event = &chan->currentEvent; + epgData.info2.clear(); + epgText.clear(); + 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); + } + } +} + +void CChannelList::addTextToArray(const std::string & text, int screening) // UTF-8 +{ + //printf("line: >%s<\n", text.c_str() ); + if (text==" ") + { + emptyLineCount ++; + if (emptyLineCount<2) + { + epgText.push_back(epg_pair(text,screening)); + } + } + else + { + emptyLineCount = 0; + epgText.push_back(epg_pair(text,screening)); + } +} + +void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 +{ + std::string aktLine = ""; + std::string aktWord = ""; + int aktWidth = 0; + text += ' '; + char* text_= (char*) text.c_str(); + + while (*text_!=0) + { + if ( (*text_==' ') || (*text_=='\n') || (*text_=='-') || (*text_=='.') ) + { + if (*text_!='\n') + aktWord += *text_; + + int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(aktWord, true); + if ((aktWordWidth+aktWidth)<(infozone_width - 20)) + {//space ok, add + aktWidth += aktWordWidth; + aktLine += aktWord; + + if (*text_=='\n') + { //enter-handler + addTextToArray( aktLine, screening ); + aktLine = ""; + aktWidth= 0; + } + aktWord = ""; + } + else + {//new line needed + addTextToArray( aktLine, screening); + aktLine = aktWord; + aktWidth = aktWordWidth; + aktWord = ""; + if (*text_=='\n') + continue; + } + } + else + { + aktWord += *text_; + } + text_++; + } + //add the rest + addTextToArray( aktLine + aktWord, screening ); +} diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 4e22099f3..699f404d1 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -84,9 +84,11 @@ private: int infozone_height; int previous_channellist_additional; + CEPGData epgData; bool historyMode; bool vlist; // "virtual" list, not bouquet bool displayNext; + bool displayList; int info_height; bool new_mode_active; @@ -108,6 +110,12 @@ private: void paint_events(int index); CChannelEventList evtlist; void readEvents(const t_channel_id channel_id); + void showdescription(int index); + typedef std::pair epg_pair; + std::vector epgText; + int emptyLineCount; + void addTextToArray( const std::string & text, int screening ); + void processTextToArray(std::string text, int screening = 0); public: CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false, bool new_mode_active = false ); From de36ce60c421f0a5991a230b0bbbf950e07d8b7f Mon Sep 17 00:00:00 2001 From: micha-bbg Date: Sun, 10 Feb 2013 10:17:42 +0100 Subject: [PATCH 14/17] update_ext.cpp: Fix wildcard handling for delete list --- src/gui/update_ext.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index 50619921f..601b11647 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -596,13 +596,13 @@ bool CExtUpdate::readBackupList(const std::string & dstPath) // read DeleteList for(it = deleteList.begin(); it != deleteList.end(); ++it) { line = *it; - if (lstat(line.c_str(), &FileInfo) != -1) { - if ((line.find("*") != std::string::npos) || (line.find("?") != std::string::npos)) { - // Wildcards - WRITE_UPDATE_LOG("delete file list: %s\n", line.c_str()); - deleteFileList(line.c_str()); - } - else if (S_ISREG(FileInfo.st_mode)) { + if ((line.find("*") != std::string::npos) || (line.find("?") != std::string::npos)) { + // Wildcards + WRITE_UPDATE_LOG("delete file list: %s\n", line.c_str()); + deleteFileList(line.c_str()); + } + else if (lstat(line.c_str(), &FileInfo) != -1) { + if (S_ISREG(FileInfo.st_mode)) { // File WRITE_UPDATE_LOG("delete file: %s\n", line.c_str()); unlink(line.c_str()); From 15d787f79bd8424b03e3e6112d8a14fabb0ef392 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sun, 10 Feb 2013 21:03:43 +0100 Subject: [PATCH 15/17] - channellist.cpp: enable to lock new_zap_mode --- data/locale/deutsch.locale | 3 +++ data/locale/english.locale | 3 +++ src/gui/channellist.cpp | 26 ++++++++++++++++---------- src/gui/channellist.h | 3 +-- src/gui/miscsettings_menu.cpp | 9 ++++++++- src/system/locals.h | 3 +++ src/system/locals_intern.h | 3 +++ 7 files changed, 37 insertions(+), 13 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 4fd9fcb3b..765b6a7cd 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -225,6 +225,9 @@ channellist.make_hdlist Erzeuge Bouquet mit HD-Kanälen channellist.make_newlist Erzeuge Bouquet mit neuen Kanälen channellist.make_removedlist Erzeuge Bouquet mit gelöschten Kanälen channellist.new_zap_mode Quickzap in Liste +channellist.new_zap_mode_active aktiv +channellist.new_zap_mode_allow erlauben +channellist.new_zap_mode_off aus channellist.nonefound Es wurden keine Kanäle gefunden!\nFühren Sie bitte eine Kanalsuche durch\n(MENU-Taste -> Service) channellist.provs Anbieter channellist.recording_not_possible Aufnahme nicht möglich! diff --git a/data/locale/english.locale b/data/locale/english.locale index d056c15a4..dd9e2e276 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -225,6 +225,9 @@ channellist.make_hdlist Create list of HD channels channellist.make_newlist Create list of new channels channellist.make_removedlist Create list of removed channels channellist.new_zap_mode Quickzap in list +channellist.new_zap_mode_active active +channellist.new_zap_mode_allow allow +channellist.new_zap_mode_off off channellist.nonefound No channels were found!\nPlease execute a scan\n(MENU-key -> service) channellist.provs Providers channellist.recording_not_possible Recording not possible! diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index cc0189d75..c1e34f806 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -96,7 +96,7 @@ extern cVideo * videoDecoder; #define ConnectLineBox_Width 16 -CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool ) +CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist) { frameBuffer = CFrameBuffer::getInstance(); name = pName; @@ -108,7 +108,6 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl this->historyMode = phistoryMode; vlist = _vlist; 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); @@ -539,7 +538,7 @@ bool CChannelList::updateSelection(int newpos) showChannelLogo(); } - if(this->new_mode_active && SameTP()) { + if((g_settings.channellist_new_zap_mode == 2 /* active */) && SameTP()) { actzap = true; zapTo(selected); } @@ -563,8 +562,6 @@ int CChannelList::show() return res; } - this->new_mode_active = 0; - calcSize(); displayNext = false; @@ -777,7 +774,17 @@ int CChannelList::show() } else if (( msg == CRCInput::RC_spkr ) && g_settings.channellist_new_zap_mode ) { if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) { - this->new_mode_active = (this->new_mode_active ? 0 : 1); + switch (g_settings.channellist_new_zap_mode) { + case 2: /* active */ + g_settings.channellist_new_zap_mode = 1; /* allow */ + break; + case 1: /* allow */ + g_settings.channellist_new_zap_mode = 2; /* active */ + break; + default: + break; + + } paintHead(); showChannelLogo(); } @@ -900,7 +907,6 @@ int CChannelList::show() res = bouquetList->exec(true); printf("CChannelList:: bouquetList->exec res %d\n", res); } - this->new_mode_active = 0; if(NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()) return -1; @@ -1151,7 +1157,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */) zapToChannel(chan); tuned = pos; - if(this->new_mode_active) + if(g_settings.channellist_new_zap_mode == 2 /* active */) selected_in_new_mode = pos; else selected = pos; @@ -1187,7 +1193,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel) g_RemoteControl->zapTo_ChannelID(channel->getChannelID(), channel->getName(), !channel->bAlwaysLocked); CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID()); } - if(!this->new_mode_active) { + if(g_settings.channellist_new_zap_mode != 2 /* not active */) { /* remove recordModeActive from infobar */ if(g_settings.auto_timeshift && !CNeutrinoApp::getInstance()->recordingstatus) { g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 0); @@ -1994,7 +2000,7 @@ void CChannelList::paintHead() 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 ? + frameBuffer->paintIcon((g_settings.channellist_new_zap_mode == 2 /* active */) ? NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE, x + full_width - iw1 - iw2 - iw3 - 18, y, theight); diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 699f404d1..567e9dce8 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -91,7 +91,6 @@ private: bool displayList; int info_height; - bool new_mode_active; int ChannelList_Rec; void paintDetails(int index); @@ -118,7 +117,7 @@ private: void processTextToArray(std::string text, int screening = 0); public: - CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false, bool new_mode_active = false ); + CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false); ~CChannelList(); void SetChannelList(ZapitChannelList* channels); diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 9cb4d2692..97f6b0214 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -134,6 +134,13 @@ const CMenuOptionChooser::keyval MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTIONS[MISCSET { 1, LOCALE_FILESYSTEM_IS_UTF8_OPTION_UTF8 } }; +#define CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT 3 +const CMenuOptionChooser::keyval CHANNELLIST_NEW_ZAP_MODE_OPTIONS[CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT] = +{ + { 0, LOCALE_CHANNELLIST_NEW_ZAP_MODE_OFF }, + { 1, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ALLOW }, + { 2, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE } +}; #ifdef CPU_FREQ #define CPU_FREQ_OPTION_COUNT 13 @@ -392,7 +399,7 @@ void CMiscMenue::showMiscSettingsMenuChanlist(CMenuWidget *ms_chanlist) mc->setHint("", LOCALE_MENU_HINT_ZAP_CYCLE); ms_chanlist->addItem(mc); - mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ); + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, CHANNELLIST_NEW_ZAP_MODE_OPTIONS, CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT, true ); mc->setHint("", LOCALE_MENU_HINT_NEW_ZAP_MODE); ms_chanlist->addItem(mc); } diff --git a/src/system/locals.h b/src/system/locals.h index a92c67abd..709e86e34 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -252,6 +252,9 @@ typedef enum LOCALE_CHANNELLIST_MAKE_NEWLIST, LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, LOCALE_CHANNELLIST_NEW_ZAP_MODE, + LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE, + LOCALE_CHANNELLIST_NEW_ZAP_MODE_ALLOW, + LOCALE_CHANNELLIST_NEW_ZAP_MODE_OFF, LOCALE_CHANNELLIST_NONEFOUND, LOCALE_CHANNELLIST_PROVS, LOCALE_CHANNELLIST_RECORDING_NOT_POSSIBLE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index d65c50631..692062856 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -252,6 +252,9 @@ const char * locale_real_names[] = "channellist.make_newlist", "channellist.make_removedlist", "channellist.new_zap_mode", + "channellist.new_zap_mode_active", + "channellist.new_zap_mode_allow", + "channellist.new_zap_mode_off", "channellist.nonefound", "channellist.provs", "channellist.recording_not_possible", From c4f8bf17a96da94a3233e4a7b928149066b63088 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sun, 10 Feb 2013 22:00:22 +0100 Subject: [PATCH 16/17] - neutrino.cpp: remove double determination of g_info.delivery_system --- src/neutrino.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index f7e09d56b..d37359229 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1828,8 +1828,6 @@ TIMER_START(); cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000); g_info.delivery_system = CFEManager::getInstance()->getLiveFE()->getInfo()->type == FE_QPSK ? DVB_S : DVB_C; - - g_info.delivery_system = CFEManager::getInstance()->getLiveFE()->getInfo()->type == FE_QPSK ? DVB_S : DVB_C; #if HAVE_TRIPLEDRAGON /* only SAT-hd1 before rev 8 has fan, rev 1 is TD (compat hack) */ g_info.has_fan = (cs_get_revision() > 1 && cs_get_revision() < 8 && g_info.delivery_system == DVB_S); From e2b22e656e9bc553b6060348eae186ed4f3a1885 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sun, 10 Feb 2013 23:25:16 +0100 Subject: [PATCH 17/17] - yweb: supplement to c2668d2f2cff77d13759afbcec9203a5ef35df7e * add a background-image to zoomshot-button --- src/nhttpd/web/Y_Main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nhttpd/web/Y_Main.css b/src/nhttpd/web/Y_Main.css index 45255fb96..15a1b39f5 100644 --- a/src/nhttpd/web/Y_Main.css +++ b/src/nhttpd/web/Y_Main.css @@ -39,6 +39,7 @@ button[ytype="timedown"]{background-image:url(/images/time_down.png);} button[ytype="timeadd"]{background-image:url(/images/time_add.png);} button[ytype="shot"]{background-image:url(/images/snapshot.png);} button[ytype="clearshot"]{background-image:url(/images/remove.png);} +button[ytype="zoomshot"]{background-image:url(/images/fullscreen.png);} button[ytype="go"]{background-image:url(/images/accept.png);} button[ytype="download"]{background-image:url(/images/wget.gif);} button[ytype="clear"]{background-image:url(/images/remove.png);}