diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 5f5c87149..37c46a26a 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -929,6 +929,7 @@ lcd4l_brightness_standby Helligkeit im Standby-Modus lcd4l_clock_a Analog-Uhr im Standby-Modus lcd4l_convert Konvertiere Umlaute lcd4l_display_type Display-Typ +lcd4l_display_type_setup Display-Typ einstellen lcd4l_logodir Senderlogo-Verzeichnis lcd4l_skin Display-Style lcd4l_skin_0 Standard @@ -1251,9 +1252,10 @@ menu.hint_lcd4l_brightness Regelt die Helligkeit des externen Displays im Normal menu.hint_lcd4l_brightness_standby Regelt die Helligkeit des externen Displays im Standby-Modus menu.hint_lcd4l_clock_a Zeigt im Standby-Betrieb eine Analog-Uhr anstatt einer Digital-Uhr menu.hint_lcd4l_convert Konvertiert Umlaute für die eingebaute LCD4Linux-Schriftart -menu.hint_lcd4l_display_type Wählen Sie den Typ den externen Displays +menu.hint_lcd4l_display_type Wählen Sie den Typ des externen Displays +menu.hint_lcd4l_display_type_setup Einstellungen für den Typ des externen Displays menu.hint_lcd4l_logodir Verzeichnis für Senderlogos\nBei ungültigem Eintrag Fallback auf Standard-Logoverzeichnis -menu.hint_lcd4l_skin Auswahl der verfügbaren Darstellungsarten +menu.hint_lcd4l_skin Auswahl der verfügbaren Darstellungsarten\nStandard, Benutzerdefiniert, etc. menu.hint_lcd4l_skin_radio Wechselt die Darstellungsart, wenn der Radio-Modus aktiviert wird menu.hint_lcd4l_support LCD4Linux aktivieren/deaktivieren\nUnterstützte Displays: Pearl DPF, Samsung DPF, VU+SOLO4K, PNG menu.hint_leds_blink Die Power-LEDs blinken, wenn sich der Receiver im Deep-Standby befindet und ein Timer aktiv ist diff --git a/data/locale/english.locale b/data/locale/english.locale index 4f869c688..5d88ed8fb 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -927,7 +927,8 @@ lcd4l_brightness Brightness lcd4l_brightness_standby Brightness in standby lcd4l_clock_a Analog clock in Standby-Mode lcd4l_convert Convert umlauts -lcd4l_display_type Display Type +lcd4l_display_type Display type +lcd4l_display_type_setup Display type setup lcd4l_logodir Channellogo-Directory lcd4l_skin Display-Style lcd4l_skin_0 Standard @@ -1250,10 +1251,11 @@ menu.hint_lcd4l_brightness_standby Adjusts the brightness of external display in menu.hint_lcd4l_clock_a Shows an analog clock instead of a digital clock on display at standby menu.hint_lcd4l_convert Convert umlauts for the built-in LCD4Linux font menu.hint_lcd4l_display_type Choose type of external display +menu.hint_lcd4l_display_type_setup Settings for the type of external display menu.hint_lcd4l_logodir Logo directory.\nFallback to default on invalid entry. -menu.hint_lcd4l_skin Switch between modes -menu.hint_lcd4l_skin_radio Switch the mode, when Radio-Mode is activated -menu.hint_lcd4l_support Activate/deactivate LCD4Linux\nSupported displays: Pearl DPF, Samsung DPF, VU+SOLO4K, PNG +menu.hint_lcd4l_skin Switch between styles\nDefault, User defined, etc. +menu.hint_lcd4l_skin_radio Switch style when Radio-Mode is activated +menu.hint_lcd4l_support Activate/deactivate LCD4Linux\nSupported displays: Pearl DPF, Samsung SPF, VU+SOLO4K, PNG menu.hint_leds_blink Blinking LEDs in deep-standby menu.hint_leds_deepstandby LEDs state in deep-standby mode menu.hint_leds_record LEDs state when box recording diff --git a/src/gui/lcd4l_setup.cpp b/src/gui/lcd4l_setup.cpp index 6554024fb..2b7bc04ee 100644 --- a/src/gui/lcd4l_setup.cpp +++ b/src/gui/lcd4l_setup.cpp @@ -90,6 +90,8 @@ const CMenuOptionChooser::keyval LCD4L_SKIN_OPTIONS[] = CLCD4lSetup::CLCD4lSetup() { width = 40; + + lcd4l_display_type_changed = false; } CLCD4lSetup::~CLCD4lSetup() @@ -119,6 +121,10 @@ int CLCD4lSetup::exec(CMenuTarget* parent, const std::string &actionkey) chooserDir(g_settings.lcd4l_logodir, false, action_str); return menu_return::RETURN_REPAINT; } + else if (actionkey == "typeSetup") + { + return showTypeSetup(); + } res = show(); @@ -140,6 +146,11 @@ bool CLCD4lSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data if (g_settings.lcd4l_support) LCD4l->StartLCD4l(); } + else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCD4L_DISPLAY_TYPE)) + { + g_settings.lcd4l_display_type = temp_lcd4l_display_type; + lcd4l_display_type_changed = true; + } return false; } @@ -148,42 +159,38 @@ int CLCD4lSetup::show() { int shortcut = 1; - int temp_lcd4l_display_type = g_settings.lcd4l_display_type; - int temp_lcd4l_skin = g_settings.lcd4l_skin; - int temp_lcd4l_brightness = g_settings.lcd4l_brightness; + temp_lcd4l_display_type = g_settings.lcd4l_display_type; + temp_lcd4l_skin = g_settings.lcd4l_skin; + temp_lcd4l_brightness = g_settings.lcd4l_brightness; + + CMenuOptionChooser *mc; + CMenuForwarder *mf; // lcd4l setup - CMenuWidget* lcd4lSetup = new CMenuWidget(LOCALE_LCD4L_SUPPORT, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_LCD4L_SETUP); - lcd4lSetup->addIntroItems(); + CMenuWidget *lcd4lSetup = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_LCD4L_SETUP); + lcd4lSetup->addIntroItems(LOCALE_LCD4L_SUPPORT); mc = new CMenuOptionChooser(LOCALE_LCD4L_SUPPORT, &g_settings.lcd4l_support, LCD4L_SUPPORT_OPTIONS, LCD4L_SUPPORT_OPTION_COUNT, true, this, CRCInput::RC_red); mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SUPPORT); lcd4lSetup->addItem(mc); + + lcd4lSetup->addItem(GenericMenuSeparatorLine); + + mc = new CMenuOptionChooser(LOCALE_LCD4L_DISPLAY_TYPE, &temp_lcd4l_display_type, LCD4L_DISPLAY_TYPE_OPTIONS, LCD4L_DISPLAY_TYPE_OPTION_COUNT, true, this, CRCInput::RC_green); + mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE); + lcd4lSetup->addItem(mc); + + mf = new CMenuForwarder(LOCALE_LCD4L_DISPLAY_TYPE_SETUP, true, NULL, this, "typeSetup", CRCInput::RC_yellow); + mf->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE_SETUP); + lcd4lSetup->addItem(mf); + lcd4lSetup->addItem(GenericMenuSeparatorLine); mf = new CMenuForwarder(LOCALE_LCD4L_LOGODIR, true, g_settings.lcd4l_logodir, this, "lcd4l_logodir", CRCInput::convertDigitToKey(shortcut++)); mf->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_LOGODIR); lcd4lSetup->addItem(mf); - mc = new CMenuOptionChooser(LOCALE_LCD4L_DISPLAY_TYPE, &temp_lcd4l_display_type, LCD4L_DISPLAY_TYPE_OPTIONS, LCD4L_DISPLAY_TYPE_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); - mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE); - lcd4lSetup->addItem(mc); - - mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN, &temp_lcd4l_skin, LCD4L_SKIN_OPTIONS, LCD4L_SKIN_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); - mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SKIN); - lcd4lSetup->addItem(mc); - - mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN_RADIO, &g_settings.lcd4l_skin_radio, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); - mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SKIN_RADIO); - lcd4lSetup->addItem(mc); - - nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&temp_lcd4l_brightness, true, 1, LCD4l->GetMaxBrightness(), this); - nc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_BRIGHTNESS); - lcd4lSetup->addItem(nc); - - nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS_STANDBY, (int *)&g_settings.lcd4l_brightness_standby, true, 1, LCD4l->GetMaxBrightness(), this); - nc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_BRIGHTNESS_STANDBY); - lcd4lSetup->addItem(nc); + lcd4lSetup->addItem(GenericMenuSeparator); const char *flag_lcd4l_clock_a = FLAGDIR "/.lcd-clock_a"; int fake_lcd4l_clock_a = file_exists(flag_lcd4l_clock_a); @@ -210,9 +217,10 @@ int CLCD4lSetup::show() bool initlcd4l = false; - if (g_settings.lcd4l_display_type != temp_lcd4l_display_type) + if ((g_settings.lcd4l_display_type != temp_lcd4l_display_type) || lcd4l_display_type_changed) { g_settings.lcd4l_display_type = temp_lcd4l_display_type; + lcd4l_display_type_changed = false; initlcd4l = true; } @@ -233,3 +241,41 @@ int CLCD4lSetup::show() return res; } + +int CLCD4lSetup::showTypeSetup() +{ + if (temp_lcd4l_display_type == CLCD4l::PEARL320x240) + { + // fix brightness values for Pearl DPF + if (temp_lcd4l_brightness > 7) + temp_lcd4l_brightness = 7; + if (g_settings.lcd4l_brightness_standby > 7) + g_settings.lcd4l_brightness_standby = 7; + } + + int shortcut = 1; + + CMenuOptionChooser *mc; + CMenuOptionNumberChooser *nc; + + CMenuWidget *typeSetup = new CMenuWidget(LOCALE_LCD4L_DISPLAY_TYPE_SETUP, NEUTRINO_ICON_SETTINGS, width); + typeSetup->addIntroItems(); //FIXME: show lcd4l display type + + mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN, &temp_lcd4l_skin, LCD4L_SKIN_OPTIONS, LCD4L_SKIN_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); + mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SKIN); + typeSetup->addItem(mc); + + mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN_RADIO, &g_settings.lcd4l_skin_radio, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); + mc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SKIN_RADIO); + typeSetup->addItem(mc); + + nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&temp_lcd4l_brightness, true, 1, LCD4l->GetMaxBrightness(), this); + nc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_BRIGHTNESS); + typeSetup->addItem(nc); + + nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS_STANDBY, (int *)&g_settings.lcd4l_brightness_standby, true, 1, LCD4l->GetMaxBrightness(), this); + nc->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_BRIGHTNESS_STANDBY); + typeSetup->addItem(nc); + + return typeSetup->exec(NULL, ""); +} diff --git a/src/gui/lcd4l_setup.h b/src/gui/lcd4l_setup.h index 511bfa3f3..d92ab3056 100644 --- a/src/gui/lcd4l_setup.h +++ b/src/gui/lcd4l_setup.h @@ -36,12 +36,14 @@ class CLCD4lSetup : public CMenuTarget, CChangeObserver { private: - CMenuOptionNumberChooser *nc; - CMenuOptionChooser *mc; - CMenuForwarder * mf; + bool lcd4l_display_type_changed; + int temp_lcd4l_display_type; + int temp_lcd4l_skin; + int temp_lcd4l_brightness; int width; int show(); + int showTypeSetup(); public: static CLCD4lSetup* getInstance(); diff --git a/src/system/locals.h b/src/system/locals.h index 7aa3d660b..1c8039f15 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -956,6 +956,7 @@ typedef enum LOCALE_LCD4L_CLOCK_A, LOCALE_LCD4L_CONVERT, LOCALE_LCD4L_DISPLAY_TYPE, + LOCALE_LCD4L_DISPLAY_TYPE_SETUP, LOCALE_LCD4L_LOGODIR, LOCALE_LCD4L_SKIN, LOCALE_LCD4L_SKIN_0, @@ -1278,6 +1279,7 @@ typedef enum LOCALE_MENU_HINT_LCD4L_CLOCK_A, LOCALE_MENU_HINT_LCD4L_CONVERT, LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE, + LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE_SETUP, LOCALE_MENU_HINT_LCD4L_LOGODIR, LOCALE_MENU_HINT_LCD4L_SKIN, LOCALE_MENU_HINT_LCD4L_SKIN_RADIO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 152a7690e..e2bcac586 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -956,6 +956,7 @@ const char * locale_real_names[] = "lcd4l_clock_a", "lcd4l_convert", "lcd4l_display_type", + "lcd4l_display_type_setup", "lcd4l_logodir", "lcd4l_skin", "lcd4l_skin_0", @@ -1278,6 +1279,7 @@ const char * locale_real_names[] = "menu.hint_lcd4l_clock_a", "menu.hint_lcd4l_convert", "menu.hint_lcd4l_display_type", + "menu.hint_lcd4l_display_type_setup", "menu.hint_lcd4l_logodir", "menu.hint_lcd4l_skin", "menu.hint_lcd4l_skin_radio",