From 158d22a3c723a0301f7670e36242a22312e7bcf3 Mon Sep 17 00:00:00 2001 From: focus Date: Fri, 18 Nov 2011 15:22:44 +0000 Subject: [PATCH] add COsdSetup::changeNotify, atm only for new option git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1866 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/osd_setup.cpp | 10 +++++++++- src/gui/osd_setup.h | 5 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index d562eb55c..3249ca691 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -552,7 +552,7 @@ void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts) fontSettings->addItem( new CMenuForwarder(LOCALE_COLORMENU_FONT, true, NULL, this, "select_font", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); fontSettings->addItem( new CMenuForwarder(LOCALE_COLORMENU_FONT_TTX, true, NULL, this, "ttx_font", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); - fontSettings->addItem( new CMenuOptionChooser(LOCALE_COLORMENU_CONTRAST_FONTS, &g_settings.contrast_fonts, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + fontSettings->addItem( new CMenuOptionChooser(LOCALE_COLORMENU_CONTRAST_FONTS, &g_settings.contrast_fonts, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); fontSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_FONTMENU_SIZES)); @@ -634,3 +634,11 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist) menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_FOOT, &g_settings.channellist_foot, CHANNELLIST_FOOT_OPTIONS, CHANNELLIST_FOOT_OPTIONS_COUNT, true)); menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_COLORED_EVENTS, &g_settings.colored_events_channellist, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true)); } + +bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) +{ + if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS)) { + return true; + } + return false; +} diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index 7d8de7b0f..1f75442f7 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -40,7 +40,7 @@ #include - class COsdSetup : public CMenuTarget +class COsdSetup : public CMenuTarget, public CChangeObserver { private: CColorSetupNotifier *colorSetupNotifier; @@ -86,8 +86,7 @@ COsdSetup(bool wizard_mode = OSD_SETUP_MODE_WIZARD_NO); ~COsdSetup(); int exec(CMenuTarget* parent, const std::string & actionKey); - - + bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/); };