From d546fc42a948bacecda92f2a97b4757a589ca9d6 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 7 May 2012 15:58:58 +0400 Subject: [PATCH] gui/vfd_setup.cpp: fix memleak - CLedControlNotifier Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/94486c03d105812547bd2c923bd81e6152e0cc42 Author: [CST] Focus Date: 2012-05-07 (Mon, 07 May 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/vfd_setup.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index 420368cb1..87fdf57c7 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -164,7 +164,7 @@ void CVfdSetup::showBrightnessSetup(CMenuWidget *mn_widget) void CVfdSetup::showLedSetup(CMenuWidget *mn_led_widget) { mn_led_widget->addIntroItems(LOCALE_LEDCONTROLER_MENU); - mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_TV, &g_settings.led_tv_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true, new CLedControlNotifier())); + mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_TV, &g_settings.led_tv_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true, this)); mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_STANDBY, &g_settings.led_standby_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true)); mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_DEEPSTANDBY, &g_settings.led_deep_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true)); mn_led_widget->addItem(new CMenuOptionChooser(LOCALE_LEDCONTROLER_MODE_RECORD, &g_settings.led_rec_mode, LEDMENU_OPTIONS, LEDMENU_OPTION_COUNT, true)); @@ -189,5 +189,9 @@ bool CVfdSetup::changeNotify(const neutrino_locale_t OptionName, void */* data * { CVFD::getInstance()->setBrightnessDeepStandby(brightnessdeepstandby); } + else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LEDCONTROLER_MODE_TV)) + { + CVFD::getInstance()->setled(); + } return true; }