From ca748c6f48a8cd2fbe21bd79356e33b5f8e025d6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 18 Sep 2012 11:53:31 +0200 Subject: [PATCH] *COsdSetup: show correct option in infobar tuner icon setup item It could be confused for single stb users to see the option 'ON', although it is not possible. So it's better to show only a possible or real option at item, if stb is in single mode or item is disabled, but the real value of g_settings.infobar_show_tuner is not touched. --- src/gui/osd_setup.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 8dd62f4fc..610642622 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -762,11 +762,18 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) menu_infobar->addItem(mc); // tuner icon + bool mc_active = false; + int show_tuner_icon = 0; + // show possible option if we in single box mode, but don't touch the real settings + int *p_show_tuner_icon = &show_tuner_icon; if (CFEManager::getInstance()->getMode() != CFEManager::FE_MODE_SINGLE){ - mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER, &g_settings.infobar_show_tuner, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - mc->setHint("", LOCALE_MENU_HINT_INFOBAR_TUNER); - menu_infobar->addItem(mc); + mc_active = true; + // use the real value of g_settings.infobar_show_tuner + p_show_tuner_icon = &g_settings.infobar_show_tuner; } + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER, p_show_tuner_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, mc_active); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_TUNER); + menu_infobar->addItem(mc); // show on epg change mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);