From d8bd46e9d1d94aae3f46ec6a96084399c28150a0 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 4 Feb 2013 22:25:15 +0100 Subject: [PATCH] - 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;