diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 3489b8d07..43bebc92c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -218,6 +218,8 @@ channellist.edit Bearbeiten channellist.epgtext_align_left links channellist.epgtext_align_right rechts channellist.extended Sendungsfortschritt anzeigen +channellist.extended_colored mit farbigem Fortschrittsbalken +channellist.extended_simple mit einfachem Fortschrittsbalken channellist.favs Favoriten channellist.foot Kanalinformationen channellist.foot_freq Tuning-Parameter diff --git a/data/locale/english.locale b/data/locale/english.locale index 0b3420de8..e2909c286 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -217,7 +217,9 @@ channellist.current_tp Current transponder channellist.edit Edit channellist.epgtext_align_left left channellist.epgtext_align_right right -channellist.extended Show progressbars +channellist.extended Show event progress +channellist.extended_colored with colored progressbar +channellist.extended_simple with simple progressbar channellist.favs Favoriten channellist.foot Channel Information channellist.foot_freq Sat/Freq Info diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 1681dd831..3e3c8ed77 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2031,9 +2031,15 @@ void CChannelList::paintItem(int pos, const bool firstpaint) l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->getName().c_str()); int pb_space = prg_offset - title_offset; - CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4, pb_space + 2, fheight/2); /* never colored */ - pb.setFrameThickness(2); - int pb_max = pb_space - 4; + bool pb_colored = ((g_settings.channellist_extended == 2) && g_settings.progressbar_color); + int pb_frame = pb_colored ? 0 : 1; + CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4, pb_space, fheight/2, + color, bgcolor, COL_MENUCONTENTDARK_PLUS_0, color, COL_MENUCONTENT_PLUS_1, + pb_colored, 0, 100, 70); + pb.setCornerType(0); + pb.setFrameThickness(pb_frame); + + int pb_max = pb_space - (2*pb_frame); if (!(p_event->description.empty())) { snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l,g_settings.channellist_epgtext_align_right ? " ":" - "); unsigned int ch_name_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(nameAndDescription); @@ -2074,9 +2080,9 @@ void CChannelList::paintItem(int pos, const bool firstpaint) } if (liststart + pos != selected) - pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1); + pb.setPassiveColor(COL_MENUCONTENT_PLUS_3); else - pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENTSELECTED_PLUS_0); + pb.setPassiveColor(COL_MENUCONTENTSELECTED_PLUS_2); pb.setValues(runningPercent, pb_max); pb.paint(); } @@ -2095,9 +2101,9 @@ void CChannelList::paintItem(int pos, const bool firstpaint) else { if(g_settings.channellist_extended) { if (liststart + pos != selected) - pb.setStatusColors(COL_MENUCONTENT_PLUS_2, COL_MENUCONTENT_PLUS_1); + pb.setPassiveColor(COL_MENUCONTENT_PLUS_1); else - pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENTSELECTED_PLUS_0); + pb.setPassiveColor(COL_MENUCONTENTSELECTED_PLUS_2); pb.setValues(0, pb_max); pb.setZeroLine(); pb.paint(); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 7006b7627..e7a0a9aee 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -436,6 +436,14 @@ const CMenuOptionChooser::keyval CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS[CHANNE { 1 , LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT } }; +#define CHANNELLIST_EXTENDED_OPTIONS_COUNT 3 +const CMenuOptionChooser::keyval CHANNELLIST_EXTENDED_OPTIONS[CHANNELLIST_EXTENDED_OPTIONS_COUNT]= +{ + { 0, LOCALE_OPTIONS_OFF }, //none + { 1, LOCALE_CHANNELLIST_EXTENDED_SIMPLE }, //unicolor + { 2, LOCALE_CHANNELLIST_EXTENDED_COLORED } //colored +}; + #define OPTIONS_COLORED_EVENTS_OPTION_COUNT 3 const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_EVENTS_OPTION_COUNT] = { @@ -933,7 +941,7 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist) menu_chanlist->addItem(mc); // extended channel list - mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, CHANNELLIST_EXTENDED_OPTIONS, CHANNELLIST_EXTENDED_OPTIONS_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED); menu_chanlist->addItem(mc); @@ -1114,7 +1122,7 @@ int COsdSetup::showContextChanlistMenu() mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EPG_ALIGN); menu_chanlist->addItem(mc); - mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, CHANNELLIST_EXTENDED_OPTIONS, CHANNELLIST_EXTENDED_OPTIONS_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED); menu_chanlist->addItem(mc); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index e506c37a7..2e922867f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -660,7 +660,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.channellist_additional = configfile.getInt32("channellist_additional", 2); //default minitv g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 0); 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_extended = configfile.getInt32("channellist_extended", 1); 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 @@ -1156,7 +1156,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("eventlist_additional", g_settings.eventlist_additional); 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_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("remote_control_hardware", g_settings.remote_control_hardware); diff --git a/src/system/locals.h b/src/system/locals.h index da3c680f8..51943932f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -245,6 +245,8 @@ typedef enum LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT, LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT, LOCALE_CHANNELLIST_EXTENDED, + LOCALE_CHANNELLIST_EXTENDED_COLORED, + LOCALE_CHANNELLIST_EXTENDED_SIMPLE, LOCALE_CHANNELLIST_FAVS, LOCALE_CHANNELLIST_FOOT, LOCALE_CHANNELLIST_FOOT_FREQ, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 817bf87a8..ad7629dfb 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -245,6 +245,8 @@ const char * locale_real_names[] = "channellist.epgtext_align_left", "channellist.epgtext_align_right", "channellist.extended", + "channellist.extended_colored", + "channellist.extended_simple", "channellist.favs", "channellist.foot", "channellist.foot_freq",