diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 5512fe37f..6466de908 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -21,6 +21,7 @@ install_DATA = \ radar5.raw radar6.raw radar7.raw radar8.raw radar9.raw movieplayer.raw rec.png recording.png \ res_1920.png res_1280.png res_1440.png res_1080.png res_720.png res_704.png res_576.png \ res_528.png res_544.png res_480.png res_382.png res_352.png res_288.png res_000.png \ + res_hd.png res_sd.png \ settings.png shell.png softupdate.png streaming.png \ subt.png subt_gray.png timer.png video.png \ volume.png volumebody.png volumeslider2.png volumeslider2alpha.png \ diff --git a/data/icons/res_hd.png b/data/icons/res_hd.png new file mode 100644 index 000000000..6be2c48c7 Binary files /dev/null and b/data/icons/res_hd.png differ diff --git a/data/icons/res_sd.png b/data/icons/res_sd.png new file mode 100644 index 000000000..3f0848993 Binary files /dev/null and b/data/icons/res_sd.png differ diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 81bf9cf46..0e5ee021c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -744,6 +744,8 @@ miscsettings.infobar_disp_3 Logo Infobar / Signalbalken miscsettings.infobar_disp_log Infobar Dis. miscsettings.infobar_sat_display Kabel-/Satellitenanbieter miscsettings.infobar_show Info bei EPG Änderungen +miscsettings.infobar_show_res Auflösung anzeigen +miscsettings.infobar_show_res_simple einfach miscsettings.infobar_show_var_hdd Füllstandanzeige (var & hdd) miscsettings.noaviawatchdog AVIA-Watchdog aktivieren miscsettings.noenxwatchdog eNX-Watchdog aktivieren diff --git a/data/locale/english.locale b/data/locale/english.locale index ef6772e34..475a93e47 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -542,6 +542,8 @@ miscsettings.infobar_disp_3 Logo 3 miscsettings.infobar_disp_log Infoview Dis. miscsettings.infobar_sat_display Satellite display on infobar miscsettings.infobar_show show Info on EPG change +miscsettings.infobar_show_res show resolution on infobar +miscsettings.infobar_show_res_simple simple miscsettings.infobar_show_var_hdd Fill level (var & hdd ) miscsettings.noaviawatchdog enable AVIA watchdog miscsettings.noenxwatchdog enable eNX watchdog diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 5869cb1c2..147839ef2 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -148,6 +148,9 @@ void CInfoViewer::Init() if (icon_xres_width == 0) icon_xres_width = 28; + if (g_settings.infobar_show_res >= 2) + icon_xres_width = 0; + frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED2_GREY, &icon_crypt_width, &dummy_h); if (icon_crypt_width == 0) icon_crypt_width = 24; @@ -988,58 +991,86 @@ void CInfoViewer::showIcon_Resolution() const const char *icon_name = NULL; if (videoDecoder->getBlank()) { icon_name = NEUTRINO_ICON_RESOLUTION_000; - } - else { - videoDecoder->getPictureInfo(xres, yres, framerate); - switch (yres) { - case 1920: - icon_name = NEUTRINO_ICON_RESOLUTION_1920; - break; - case 1088: - icon_name = NEUTRINO_ICON_RESOLUTION_1080; - break; - case 1440: - icon_name = NEUTRINO_ICON_RESOLUTION_1440; - break; - case 1280: - icon_name = NEUTRINO_ICON_RESOLUTION_1280; - break; - case 720: - icon_name = NEUTRINO_ICON_RESOLUTION_720; - break; - case 704: - icon_name = NEUTRINO_ICON_RESOLUTION_704; - break; - case 576: - icon_name = NEUTRINO_ICON_RESOLUTION_576; - break; - case 544: - icon_name = NEUTRINO_ICON_RESOLUTION_544; - break; - case 528: - icon_name = NEUTRINO_ICON_RESOLUTION_528; - break; - case 480: - icon_name = NEUTRINO_ICON_RESOLUTION_480; - break; - case 382: - icon_name = NEUTRINO_ICON_RESOLUTION_382; - break; - case 352: - icon_name = NEUTRINO_ICON_RESOLUTION_352; - break; - case 288: - icon_name = NEUTRINO_ICON_RESOLUTION_288; - break; - default: - icon_name = NEUTRINO_ICON_RESOLUTION_000; - break; + } else { + if (g_settings.infobar_show_res == 0) {//show resolution icon on infobar + videoDecoder->getPictureInfo(xres, yres, framerate); + switch (yres) { + case 1920: + icon_name = NEUTRINO_ICON_RESOLUTION_1920; + break; + case 1088: + icon_name = NEUTRINO_ICON_RESOLUTION_1080; + break; + case 1440: + icon_name = NEUTRINO_ICON_RESOLUTION_1440; + break; + case 1280: + icon_name = NEUTRINO_ICON_RESOLUTION_1280; + break; + case 720: + icon_name = NEUTRINO_ICON_RESOLUTION_720; + break; + case 704: + icon_name = NEUTRINO_ICON_RESOLUTION_704; + break; + case 576: + icon_name = NEUTRINO_ICON_RESOLUTION_576; + break; + case 544: + icon_name = NEUTRINO_ICON_RESOLUTION_544; + break; + case 528: + icon_name = NEUTRINO_ICON_RESOLUTION_528; + break; + case 480: + icon_name = NEUTRINO_ICON_RESOLUTION_480; + break; + case 382: + icon_name = NEUTRINO_ICON_RESOLUTION_382; + break; + case 352: + icon_name = NEUTRINO_ICON_RESOLUTION_352; + break; + case 288: + icon_name = NEUTRINO_ICON_RESOLUTION_288; + break; + default: + icon_name = NEUTRINO_ICON_RESOLUTION_000; + break; + } + } + if (g_settings.infobar_show_res == 1) {//show simple resolution icon on infobar + videoDecoder->getPictureInfo(xres, yres, framerate); + switch (yres) { + case 1920: + case 1440: + case 1280: + case 1088: + case 720: + icon_name = NEUTRINO_ICON_RESOLUTION_HD; + break; + case 704: + case 576: + case 544: + case 528: + case 480: + case 382: + case 352: + case 288: + icon_name = NEUTRINO_ICON_RESOLUTION_SD; + break; + default: + icon_name = NEUTRINO_ICON_RESOLUTION_000; + break; + } } } - - frameBuffer->paintBoxRel(BoxEndX - (icon_xres_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, icon_large_width, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_SMALL, CORNER_BOTTOM); - frameBuffer->paintIcon(icon_name, BoxEndX - (icon_xres_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, InfoHeightY_Info); + if (g_settings.infobar_show_res < 2) { + frameBuffer->paintBoxRel(BoxEndX - (icon_xres_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, icon_large_width, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_SMALL, CORNER_BOTTOM); + frameBuffer->paintIcon(icon_name, BoxEndX - (icon_xres_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, InfoHeightY_Info); + } } + void CInfoViewer::showIcon_SubT() const { bool have_sub = false; @@ -1978,8 +2009,14 @@ void CInfoViewer::paint_ca_icons(int caid, char * icon, int &icon_space_offset) void CInfoViewer::showOne_CAIcon(bool fta) { +if (g_settings.infobar_show_res < 2){ frameBuffer->paintIcon(fta ? NEUTRINO_ICON_SCRAMBLED2_GREY : NEUTRINO_ICON_SCRAMBLED2, BoxEndX - (icon_xres_width + icon_crypt_width + 2*icon_large_width + 2*icon_small_width + 6*2), BBarY, InfoHeightY_Info); + } +else if (g_settings.infobar_show_res == 2){ + frameBuffer->paintIcon(fta ? NEUTRINO_ICON_SCRAMBLED2_GREY : NEUTRINO_ICON_SCRAMBLED2, BoxEndX - (icon_crypt_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, + InfoHeightY_Info); + } } void CInfoViewer::showIcon_CA_Status (int notfirst) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index fdbd301a0..fa7f7238d 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -220,6 +220,14 @@ const CMenuOptionChooser::keyval MENU_DISP_POS_OPTIONS[MENU_DISP_POS_OPTIONS_CO { 4 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT } }; +#define INFOBAR_SHOW_RES_MODE_OPTION_COUNT 3 +const CMenuOptionChooser::keyval INFOBAR_SHOW_RES_MODE_OPTIONS[INFOBAR_SHOW_RES_MODE_OPTION_COUNT] = +{ + { 0, LOCALE_OPTIONS_ON }, + { 1, LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES_SIMPLE }, + { 2, LOCALE_OPTIONS_OFF } +}; + //show osd setup void COsdSetup::showOsdSetup() @@ -522,6 +530,7 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_VIRTUAL_ZAP_MODE, &g_settings.virtual_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY, &g_settings.infobar_sat_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_VAR_HDD, &g_settings.infobar_show_var_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES, &g_settings.infobar_show_res, INFOBAR_SHOW_RES_MODE_OPTIONS, INFOBAR_SHOW_RES_MODE_OPTION_COUNT, true)); menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); } diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index c35ddb591..229d368a8 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -137,6 +137,9 @@ #define NEUTRINO_ICON_RESOLUTION_352 "res_352" #define NEUTRINO_ICON_RESOLUTION_288 "res_288" #define NEUTRINO_ICON_RESOLUTION_000 "res_000" +#define NEUTRINO_ICON_RESOLUTION_HD "res_hd" +#define NEUTRINO_ICON_RESOLUTION_SD "res_sd" + #define DUMMY_ICON "dummy" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6b19174f3..eaba3359d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -484,6 +484,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.menu_pos = configfile.getInt32("menu_pos", 0 ); g_settings.infobar_show_var_hdd = configfile.getBool("infobar_show_var_hdd" , true ); g_settings.show_infomenu = configfile.getInt32("show_infomenu", 0 ); + g_settings.infobar_show_res = configfile.getInt32("infobar_show_res", 0 ); //audio g_settings.audio_AnalogMode = configfile.getInt32( "audio_AnalogMode", 0 ); g_settings.audio_DolbyDigital = configfile.getBool("audio_DolbyDigital" , false); @@ -1031,6 +1032,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("menu_pos" , g_settings.menu_pos); configfile.setInt32("infobar_show_var_hdd" , g_settings.infobar_show_var_hdd ); configfile.setInt32("show_infomenu" , g_settings.show_infomenu ); + configfile.setInt32("infobar_show_res" , g_settings.infobar_show_res ); //audio configfile.setInt32( "audio_AnalogMode", g_settings.audio_AnalogMode ); diff --git a/src/system/locals.h b/src/system/locals.h index 3f45d1e3b..544bb12b1 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -574,6 +574,8 @@ typedef enum { LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG, LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY, LOCALE_MISCSETTINGS_INFOBAR_SHOW, + LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES, + LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES_SIMPLE, LOCALE_MISCSETTINGS_INFOBAR_SHOW_VAR_HDD, LOCALE_MISCSETTINGS_SHOW_INFOMENU, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index eeaf4fb02..e1626842f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -574,6 +574,8 @@ const char *locale_real_names[] = { "miscsettings.infobar_disp_log", "miscsettings.infobar_sat_display", "miscsettings.infobar_show", + "miscsettings.infobar_show_res", + "miscsettings.infobar_show_res_simple", "miscsettings.infobar_show_var_hdd", "miscsettings.show_infomenu", "miscsettings.shutdown_count", diff --git a/src/system/settings.h b/src/system/settings.h index b98be8733..4d995a39b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -73,6 +73,7 @@ struct SNeutrinoSettings int volume_pos; int menu_pos; int infobar_show_var_hdd; + int infobar_show_res; //audio int audio_AnalogMode; int audio_DolbyDigital;