diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 725eee14d..7aa10869e 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1132,6 +1132,11 @@ miscsettings.infobar_disp_5 Logo/Signalbalken miscsettings.infobar_disp_6 Logo+Kanalnummer/Signalbalken miscsettings.infobar_disp_log Logo miscsettings.infobar_logo_hdd_dir Logo Verz. +miscsettings.infobar_progressbar Fortschrittsbalken Opt. +miscsettings.infobar_progressbar_0 Standard +miscsettings.infobar_progressbar_1 unterhalb Kanalname +miscsettings.infobar_progressbar_2 unterhalb Kanalname schmal +miscsettings.infobar_progressbar_3 zwischen EPG-Events schmal miscsettings.infobar_sat_display Kabel-/Satellitenanbieter miscsettings.infobar_show Info bei EPG Änderungen miscsettings.infobar_show_dd_available DD-Verfügbarkeit anzeigen diff --git a/data/locale/english.locale b/data/locale/english.locale index f02f9fd0b..b599fb699 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -928,6 +928,11 @@ menu.hint_pictureviewer_scaling Picture scaling algorithm menu.hint_pictureviewer_slide_time Slideshow interval, in seconds menu.hint_picview View pictures menu.hint_plugins_hdd_dir Select directory to load\nplugins from +miscsettings.infobar_progressbar progressbar options +miscsettings.infobar_progressbar_0 standard +miscsettings.infobar_progressbar_1 below channel name +miscsettings.infobar_progressbar_2 small below channel name +miscsettings.infobar_progressbar_3 narrow between EPG-Events menu.hint_power_leds Configure power-button LEDs behavior menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable menu.hint_pref_subs Select preferred subtitle language\nselect 'none' to disable diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 497140554..08d00c5d8 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -450,6 +450,22 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos) // nicht gefunden / noch nicht geladen /* see the comment in display_Info() for a reasoning for this calculation */ int CurrInfoY = (BoxEndY + ChanNameY + time_height) / 2; // lower end of current info box + if(g_settings.infobar_progressbar){ + int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4; + switch(g_settings.infobar_progressbar) + { + case 1: + case 2: + CurrInfoY += (pb_h/3); + break; + case 3: + CurrInfoY -= (pb_h/3); + break; + default: + break; + } + } + neutrino_locale_t loc; if (! gotTime) loc = LOCALE_INFOVIEWER_WAITTIME; @@ -1415,30 +1431,67 @@ void CInfoViewer::display_Info(const char *current, const char *next, int height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); int CurrInfoY = (BoxEndY + ChanNameY + time_height) / 2; int NextInfoY = CurrInfoY + height; // lower end of next info box - int xStart; int InfoX = ChanInfoX + 10; - xStart = InfoX; + int xStart = InfoX; if (starttimes) xStart += info_time_width + 10; - //colored_events init - bool colored_event_C = false; - bool colored_event_N = false; - if (g_settings.colored_events_infobar == 1) - colored_event_C = true; - if (g_settings.colored_events_infobar == 2) - colored_event_N = true; + int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4; + switch(g_settings.infobar_progressbar) + { + case 1: + case 2: + CurrInfoY += (pb_h/3); + NextInfoY += (pb_h/3); + break; + case 3: + CurrInfoY -= (pb_h/3); + NextInfoY += (pb_h/3); + break; + default: + break; + } if (pb_pos > -1) { int pb_w = 112; + int pb_startx = BoxEndX - pb_w - SHADOW_OFFSET; + int pb_starty = ChanNameY - (pb_h + 10); + int pb_shadow = COL_INFOBAR_SHADOW_PLUS_0; + int pb_color = g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0; + if(g_settings.infobar_progressbar){ + pb_startx = xStart; + pb_w = BoxEndX - 10 - xStart; + pb_shadow = 0; + } + switch(g_settings.infobar_progressbar) + { + case 1: + + pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 6)) ; + pb_h = (pb_h/3); + pb_color = COL_INFOBAR_SHADOW_PLUS_0; + break; + case 2: + pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 5)) ; + pb_h = (pb_h/5); + pb_color = COL_INFOBAR_SHADOW_PLUS_0; + break; + case 3: + pb_starty = CurrInfoY + ((pb_h / 3)-(pb_h/5)) ; + pb_h = (pb_h/5); + break; + default: + break; + } + int pb_p = pb_pos * pb_w / 100; - int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4; if (pb_p > pb_w) pb_p = pb_w; - timescale->paintProgressBar(BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h, pb_p, pb_w, - 0, 0, g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0, COL_INFOBAR_SHADOW_PLUS_0, "", COL_INFOBAR); + + timescale->paintProgressBar(pb_startx, pb_starty, pb_w, pb_h, pb_p, pb_w, + 0, 0, pb_color, pb_shadow, "", COL_INFOBAR); //printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h); } @@ -1452,6 +1505,14 @@ void CInfoViewer::display_Info(const char *current, const char *next, int nextTimeX = BoxEndX - nextTimeW - 10; static int oldCurrTimeX = currTimeX; // remember the last pos. of remaining time, in case we change from 20/100min to 21/99min + //colored_events init + bool colored_event_C = false; + bool colored_event_N = false; + if (g_settings.colored_events_infobar == 1) + colored_event_C = true; + if (g_settings.colored_events_infobar == 2) + colored_event_N = true; + if (current != NULL && update_current) { frameBuffer->paintBox(InfoX, CurrInfoY - height, currTimeX, CurrInfoY, COL_INFOBAR_PLUS_0); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f7bb7a301..0b59388d6 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -727,6 +727,14 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL { 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 }, { 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 } }; +#define LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_COUNT 4 +const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_OPTIONS[LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_COUNT]= +{ + { 0 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_0 }, + { 1 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_1 }, + { 2 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_2 }, + { 3 , LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_3 } +}; //infobar void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) @@ -755,6 +763,11 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) mc->setHint("", LOCALE_MENU_HINT_INFOBAR_SAT); menu_infobar->addItem(mc); + // infobar progress + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR, &g_settings.infobar_progressbar, LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_OPTIONS, LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_COUNT, true); + mc->setHint("", LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR); + menu_infobar->addItem(mc); + // flash/hdd progress mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_SYSFS_HDD, &g_settings.infobar_show_sysfs_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_INFOBAR_FILESYS); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d37359229..744d2ab71 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -383,6 +383,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.progressbar_color = configfile.getBool("progressbar_color", true ); g_settings.infobar_show = configfile.getInt32("infobar_show", 1); g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 ); + g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 0 ); g_settings.casystem_display = configfile.getInt32("casystem_display", 2 );//mini ca mode default g_settings.scrambled_message = configfile.getBool("scrambled_message", true ); g_settings.volume_pos = configfile.getInt32("volume_pos", 0 ); @@ -840,6 +841,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("progressbar_color" , g_settings.progressbar_color ); configfile.setInt32("infobar_show", g_settings.infobar_show); configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo ); + configfile.setInt32("infobar_progressbar" , g_settings.infobar_progressbar ); configfile.setInt32("casystem_display" , g_settings.casystem_display ); configfile.setBool("scrambled_message" , g_settings.scrambled_message ); configfile.setInt32("volume_pos" , g_settings.volume_pos ); diff --git a/src/system/locals.h b/src/system/locals.h index 0b34fd393..0d60d5f1f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1159,6 +1159,11 @@ typedef enum LOCALE_MISCSETTINGS_INFOBAR_DISP_6, LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG, LOCALE_MISCSETTINGS_INFOBAR_LOGO_HDD_DIR, + LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR, + LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_0, + LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_1, + LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_2, + LOCALE_MISCSETTINGS_INFOBAR_PROGRESSBAR_3, LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY, LOCALE_MISCSETTINGS_INFOBAR_SHOW, LOCALE_MISCSETTINGS_INFOBAR_SHOW_DD_AVAILABLE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index c7afa4d8f..bfc2aa6b9 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1159,6 +1159,11 @@ const char * locale_real_names[] = "miscsettings.infobar_disp_6", "miscsettings.infobar_disp_log", "miscsettings.infobar_logo_hdd_dir", + "miscsettings.infobar_progressbar", + "miscsettings.infobar_progressbar_0", + "miscsettings.infobar_progressbar_1", + "miscsettings.infobar_progressbar_2", + "miscsettings.infobar_progressbar_3", "miscsettings.infobar_sat_display", "miscsettings.infobar_show", "miscsettings.infobar_show_dd_available", diff --git a/src/system/settings.h b/src/system/settings.h index b3183671e..713b5161e 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -68,6 +68,7 @@ struct SNeutrinoSettings int fan_speed; int infobar_show; int infobar_show_channellogo; + int infobar_progressbar; int progressbar_color; int casystem_display; int scrambled_message;