From b56f4ed1492f8e33436069325db89a051596d72b Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 25 Jan 2016 08:04:35 +0100 Subject: [PATCH] - vfd: allow to disable rc-lock message on vfd --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/driver/vfd.cpp | 2 +- src/gui/vfd_setup.cpp | 4 ++++ src/neutrino.cpp | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ src/system/settings.h | 2 ++ 8 files changed, 17 insertions(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b1c7d40fd..debd59fac 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -859,6 +859,7 @@ lcdmenu.dim_brightness nach Dimm-Timeout lcdmenu.dim_time Dimm-Timeout lcdmenu.head VFD/LED Einstellungen lcdmenu.lcdcontroler Helligkeit +lcdmenu.notify_rclock Benachrichtigung bei FB-Sperre lcdmenu.scroll Laufschrift lcdmenu.statusline Statuszeile lcdmenu.statusline.both Lautstärke/Fortschritt @@ -1399,6 +1400,7 @@ menu.hint_vfd_brightnessstandby Definiert die Helligkeit im Standby-Modus menu.hint_vfd_defaults Zurücksetzen der Helligkeitswerte auf die Standardeinstellungen menu.hint_vfd_dimtime Geben Sie einen Wert in Sekunden ein, nachdem sich das Display automatisch auf den gewünschten Wert dimmt menu.hint_vfd_infoline Wählen Sie, was in der Infozeile angezeigt werden soll +menu.hint_vfd_notify_rclock Zeigt eine Meldung im Display, wenn bei gesperrter Fernbedienung eine Taste gedrückt wird menu.hint_vfd_scroll Laufschrift im Display ein- oder ausschalten menu.hint_vfd_statusline Wählen Sie, was in der Statuszeile angezeigt werden soll menu.hint_video Video-Ausgang, Auflösung, Format, Seitenverhältnisse und mehr diff --git a/data/locale/english.locale b/data/locale/english.locale index 68e9acdf9..96593f610 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -859,6 +859,7 @@ lcdmenu.dim_brightness Brightness after dim timeout lcdmenu.dim_time Dim timeout lcdmenu.head VFD/LED Settings lcdmenu.lcdcontroler Brightness +lcdmenu.notify_rclock Notify when RC is locked lcdmenu.scroll Enable text scroll lcdmenu.statusline status line lcdmenu.statusline.both volume / playtime @@ -1399,6 +1400,7 @@ menu.hint_vfd_brightnessstandby Brightness in soft-standby mode menu.hint_vfd_defaults Restore default brightness values menu.hint_vfd_dimtime Auto-dim time, in seconds menu.hint_vfd_infoline Choose what to display in main VFD line +menu.hint_vfd_notify_rclock Displays a notification when a key is pressed while remote control is locked menu.hint_vfd_scroll Enable or disable text scrolling on VFD menu.hint_vfd_statusline Choose what to display in short\nVFD status line menu.hint_video Video output, resolution, format\nAspect ratio, fast mode switch options diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 0490201ae..7af3a18f0 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -406,7 +406,7 @@ void CVFD::showTime(bool force) void CVFD::showRCLock(int duration) { - if (!has_lcd) + if (!has_lcd || !g_settings.lcd_notify_rclock) { sleep(duration); return; diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index b5148232a..b4e3a053f 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -155,6 +155,10 @@ int CVfdSetup::showSetup() oj = new CMenuOptionChooser(LOCALE_LCDMENU_SCROLL, &g_settings.lcd_scroll, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled); oj->setHint("", LOCALE_MENU_HINT_VFD_SCROLL); vfds->addItem(oj); + + oj = new CMenuOptionChooser(LOCALE_LCDMENU_NOTIFY_RCLOCK, &g_settings.lcd_notify_rclock, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled); + oj->setHint("", LOCALE_MENU_HINT_VFD_NOTIFY_RCLOCK); + vfds->addItem(oj); } int res = vfds->exec(NULL, ""); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1dd14710d..0671723b3 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -434,6 +434,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.backlight_standby = configfile.getInt32( "backlight_standby", 0); g_settings.backlight_deepstandby = configfile.getInt32( "backlight_deepstandby", 0); g_settings.lcd_scroll = configfile.getInt32( "lcd_scroll", 1); + g_settings.lcd_notify_rclock = configfile.getInt32("lcd_notify_rclock", 1); g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0); g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120); @@ -984,6 +985,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "backlight_standby", g_settings.backlight_standby); configfile.setInt32( "backlight_deepstandby", g_settings.backlight_deepstandby); configfile.setInt32( "lcd_scroll", g_settings.lcd_scroll); + configfile.setInt32( "lcd_notify_rclock", g_settings.lcd_notify_rclock); //misc configfile.setInt32( "power_standby", g_settings.power_standby); diff --git a/src/system/locals.h b/src/system/locals.h index 5fe1c56e8..0bde8d6b9 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -886,6 +886,7 @@ typedef enum LOCALE_LCDMENU_DIM_TIME, LOCALE_LCDMENU_HEAD, LOCALE_LCDMENU_LCDCONTROLER, + LOCALE_LCDMENU_NOTIFY_RCLOCK, LOCALE_LCDMENU_SCROLL, LOCALE_LCDMENU_STATUSLINE, LOCALE_LCDMENU_STATUSLINE_BOTH, @@ -1426,6 +1427,7 @@ typedef enum LOCALE_MENU_HINT_VFD_DEFAULTS, LOCALE_MENU_HINT_VFD_DIMTIME, LOCALE_MENU_HINT_VFD_INFOLINE, + LOCALE_MENU_HINT_VFD_NOTIFY_RCLOCK, LOCALE_MENU_HINT_VFD_SCROLL, LOCALE_MENU_HINT_VFD_STATUSLINE, LOCALE_MENU_HINT_VIDEO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 33ac965be..bc5c07f62 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -886,6 +886,7 @@ const char * locale_real_names[] = "lcdmenu.dim_time", "lcdmenu.head", "lcdmenu.lcdcontroler", + "lcdmenu.notify_rclock", "lcdmenu.scroll", "lcdmenu.statusline", "lcdmenu.statusline.both", @@ -1426,6 +1427,7 @@ const char * locale_real_names[] = "menu.hint_vfd_defaults", "menu.hint_vfd_dimtime", "menu.hint_vfd_infoline", + "menu.hint_vfd_notify_rclock", "menu.hint_vfd_scroll", "menu.hint_vfd_statusline", "menu.hint_video", diff --git a/src/system/settings.h b/src/system/settings.h index df64721d2..728ae275b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -684,6 +684,8 @@ struct SNeutrinoSettings int backlight_standby; int backlight_deepstandby; int lcd_scroll; + int lcd_notify_rclock; + //#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str()) #define FILESYSTEM_ENCODING_TO_UTF8(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str()) #define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())