diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f29c211c6..caf0de1b8 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -760,6 +760,8 @@ int COsdSetup::showOsdSetup() int res = osd_menu->exec(NULL, ""); + resetRadioText(); + if (oldVolumeSize != g_settings.volume_size) CVolumeHelper::getInstance()->refresh(); @@ -1597,17 +1599,7 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) return true; } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_RADIOTEXT)) { - if (g_settings.radiotext_enable) { - if (g_Radiotext == NULL) - g_Radiotext = new CRadioText; - if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoModes::mode_radio)) - g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); - } else { - if (g_Radiotext) - g_Radiotext->radiotext_stop(); - delete g_Radiotext; - g_Radiotext = NULL; - } + resetRadioText(); } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_DIGITS)) { CVolumeHelper::getInstance()->refresh(); @@ -1643,6 +1635,25 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) return false; } + +void COsdSetup::resetRadioText() +{ + if (g_settings.radiotext_enable) { + if (g_Radiotext == NULL) + g_Radiotext = new CRadioText; + if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoModes::mode_radio)){ + printf("\033[32m[COsdSetup] %s - %d: %d\033[0m\n", __func__, __LINE__, g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); + g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); + } + } else { + if (g_Radiotext) + g_Radiotext->radiotext_stop(); + delete g_Radiotext; + g_Radiotext = NULL; + } +} + + int COsdSetup::showContextChanlistMenu(CChannelList *parent_channellist) { static int cselected = -1; diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index 698f02e94..af1c911d0 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -85,7 +85,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver void paintWindowSize(int w, int h); void AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry); - + void resetRadioText(); public: enum INFOBAR_CHANNEL_LOGO_POS_OPTIONS {