mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
osd_setup.cpp: outsource radio text notifier handling into own method
For usage with other functions.
Origin commit data
------------------
Commit: 49667cc83e
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-02-11 (Mon, 11 Feb 2019)
This commit is contained in:
@@ -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;
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user