- osd-setup: some more code nicenings

Conflicts:
	src/gui/osd_setup.cpp
	src/gui/osd_setup.h

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-06-17 23:01:08 +02:00
committed by Thilo Graf
parent c406ff3bec
commit eade2d1f4f
2 changed files with 167 additions and 126 deletions

View File

@@ -286,7 +286,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
} }
return res; return res;
} }
else if (actionKey == "font_scaling") { else if (actionKey == "font_scaling")
{
int fs_x = g_settings.font_scaling_x; int fs_x = g_settings.font_scaling_x;
int fs_y = g_settings.font_scaling_y; int fs_y = g_settings.font_scaling_y;
@@ -307,13 +308,15 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
res = fontscale.exec(NULL, ""); res = fontscale.exec(NULL, "");
if (fs_x != g_settings.font_scaling_x || fs_y != g_settings.font_scaling_y) { if (fs_x != g_settings.font_scaling_x || fs_y != g_settings.font_scaling_y)
{
printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", g_settings.font_scaling_x, g_settings.font_scaling_y); printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", g_settings.font_scaling_x, g_settings.font_scaling_y);
CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST | CNeutrinoFonts::FONTSETUP_DYN_FONT); CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST | CNeutrinoFonts::FONTSETUP_DYN_FONT);
} }
return res; return res;
} }
else if(actionKey=="window_size") { else if (actionKey=="window_size")
{
int old_window_width = g_settings.window_width; int old_window_width = g_settings.window_width;
int old_window_height = g_settings.window_height; int old_window_height = g_settings.window_height;
@@ -322,25 +325,31 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
bool loop=true; bool loop=true;
while (loop) { while (loop)
{
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, true); g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, true);
if (msg <= CRCInput::RC_MaxRC) if (msg <= CRCInput::RC_MaxRC)
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
if ( msg == CRCInput::RC_ok ) { if (msg == CRCInput::RC_ok)
{
memset(window_size_value, 0, sizeof(window_size_value)); memset(window_size_value, 0, sizeof(window_size_value));
snprintf(window_size_value, sizeof(window_size_value), "%d / %d", g_settings.window_width, g_settings.window_height); snprintf(window_size_value, sizeof(window_size_value), "%d / %d", g_settings.window_width, g_settings.window_height);
mfWindowSize->setOption(window_size_value); mfWindowSize->setOption(window_size_value);
CNeutrinoApp::getInstance()->channelList->ResetModules(); CNeutrinoApp::getInstance()->channelList->ResetModules();
break; break;
} else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout)) { }
else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout))
{
g_settings.window_width = old_window_width; g_settings.window_width = old_window_width;
g_settings.window_height = old_window_height; g_settings.window_height = old_window_height;
loop = false; loop = false;
} else if ((msg == CRCInput::RC_page_up) || (msg == CRCInput::RC_page_down) || }
else if ((msg == CRCInput::RC_page_up) || (msg == CRCInput::RC_page_down) ||
(msg == CRCInput::RC_left) || (msg == CRCInput::RC_right) || (msg == CRCInput::RC_left) || (msg == CRCInput::RC_right) ||
(msg == CRCInput::RC_up) || (msg == CRCInput::RC_down)) { (msg == CRCInput::RC_up) || (msg == CRCInput::RC_down))
{
int dir = 1; int dir = 1;
if ((msg == CRCInput::RC_page_down) || (msg == CRCInput::RC_left) || (msg == CRCInput::RC_down)) if ((msg == CRCInput::RC_page_down) || (msg == CRCInput::RC_left) || (msg == CRCInput::RC_down))
@@ -358,9 +367,14 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
paintWindowSize(g_settings.window_width, g_settings.window_height); paintWindowSize(g_settings.window_width, g_settings.window_height);
} else if ((msg == CRCInput::RC_left) || (msg == CRCInput::RC_right)) { }
} else if (msg > CRCInput::RC_MaxRC) { else if ((msg == CRCInput::RC_left) || (msg == CRCInput::RC_right))
if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { {
}
else if (msg > CRCInput::RC_MaxRC)
{
if (CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all)
{
loop = false; loop = false;
res = menu_return::RETURN_EXIT_ALL; res = menu_return::RETURN_EXIT_ALL;
} }
@@ -370,7 +384,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
return res; return res;
} }
else if(actionKey=="osd.def") { else if (actionKey=="osd.def")
{
for (int i = 0; i < SNeutrinoSettings::HANDLING_INFOBAR_SETTING_COUNT; i++) for (int i = 0; i < SNeutrinoSettings::HANDLING_INFOBAR_SETTING_COUNT; i++)
g_settings.handling_infobar[i] = handling_infobar_setting[i].default_timing; g_settings.handling_infobar[i] = handling_infobar_setting[i].default_timing;
@@ -378,25 +393,32 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
g_settings.timing[i] = timing_setting[i].default_timing; g_settings.timing[i] = timing_setting[i].default_timing;
return res; return res;
} }
else if(actionKey=="logo_dir") { else if (actionKey=="logo_dir")
{
const char *action_str = "logo"; const char *action_str = "logo";
chooserDir(g_settings.logo_hdd_dir, false, action_str); chooserDir(g_settings.logo_hdd_dir, false, action_str);
return res; return res;
} }
else if(actionKey=="screenshot_dir") { else if (actionKey=="screenshot_dir")
{
const char *action_str = "screenshot"; const char *action_str = "screenshot";
chooserDir(g_settings.screenshot_dir, true, action_str); chooserDir(g_settings.screenshot_dir, true, action_str);
return res; return res;
} }
else if(actionKey=="screensaver_dir") { else if(actionKey=="screensaver_dir")
{
const char *action_str = "screensaver"; const char *action_str = "screensaver";
chooserDir(g_settings.screensaver_dir, false, action_str); chooserDir(g_settings.screensaver_dir, false, action_str);
return res; return res;
} }
else if(strncmp(actionKey.c_str(), "fontsize.d", 10) == 0) { else if(strncmp(actionKey.c_str(), "fontsize.d", 10) == 0)
for (unsigned int i = 0; i < FONT_GROUP_COUNT; i++) { {
if (actionKey == font_sizes_groups[i].actionkey) { for (unsigned int i = 0; i < FONT_GROUP_COUNT; i++)
for (unsigned int j = 0; j < font_sizes_groups[i].count; j++) { {
if (actionKey == font_sizes_groups[i].actionkey)
{
for (unsigned int j = 0; j < font_sizes_groups[i].count; j++)
{
SNeutrinoSettings::FONT_TYPES k = font_sizes_groups[i].content[j]; SNeutrinoSettings::FONT_TYPES k = font_sizes_groups[i].content[j];
CNeutrinoApp::getInstance()->getConfigFile()->setInt32(locale_real_names[neutrino_font[k].name], neutrino_font[k].defaultsize); CNeutrinoApp::getInstance()->getConfigFile()->setInt32(locale_real_names[neutrino_font[k].name], neutrino_font[k].defaultsize);
} }
@@ -562,7 +584,8 @@ int COsdSetup::showOsdSetup()
osd_menu->addIntroItems(LOCALE_MAINSETTINGS_OSD); osd_menu->addIntroItems(LOCALE_MAINSETTINGS_OSD);
// item menu colors // item menu colors
if (osd_menu_colors == NULL){ if (osd_menu_colors == NULL)
{
osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS);
showOsdMenueColorSetup(osd_menu_colors); showOsdMenueColorSetup(osd_menu_colors);
} }
@@ -677,15 +700,18 @@ int COsdSetup::showOsdSetup()
size_t resCount = frameBuffer->osd_resolutions.size(); size_t resCount = frameBuffer->osd_resolutions.size();
struct CMenuOptionChooser::keyval_ext kext[resCount]; struct CMenuOptionChooser::keyval_ext kext[resCount];
char valname[resCount][255]; char valname[resCount][255];
if (resCount > 0) { if (resCount > 0)
for (size_t i = 0; i < resCount; i++) { {
for (size_t i = 0; i < resCount; i++)
{
kext[i].key = i; kext[i].key = i;
kext[i].value = NONEXISTANT_LOCALE; kext[i].value = NONEXISTANT_LOCALE;
snprintf(valname[i], sizeof(valname[resCount]), "%dx%d", frameBuffer->osd_resolutions[i].xRes, frameBuffer->osd_resolutions[i].yRes); snprintf(valname[i], sizeof(valname[resCount]), "%dx%d", frameBuffer->osd_resolutions[i].xRes, frameBuffer->osd_resolutions[i].yRes);
kext[i].valname = valname[i]; kext[i].valname = valname[i];
} }
} }
else { else
{
kext[0].key = 0; kext[0].key = 0;
kext[0].value = NONEXISTANT_LOCALE; kext[0].value = NONEXISTANT_LOCALE;
kext[0].valname = "-"; kext[0].valname = "-";
@@ -742,7 +768,8 @@ int COsdSetup::showOsdSetup()
if (oldVolumeSize != g_settings.volume_size) if (oldVolumeSize != g_settings.volume_size)
CVolumeHelper::getInstance()->refresh(); CVolumeHelper::getInstance()->refresh();
if (oldInfoClockSize != g_settings.infoClockFontSize) { if (oldInfoClockSize != g_settings.infoClockFontSize)
{
CInfoClock::getInstance()->setHeight(g_settings.infoClockFontSize); CInfoClock::getInstance()->setHeight(g_settings.infoClockFontSize);
CVolumeHelper::getInstance()->refresh(); CVolumeHelper::getInstance()->refresh();
if (CNeutrinoApp::getInstance()->isMuted()) if (CNeutrinoApp::getInstance()->isMuted())
@@ -1021,7 +1048,8 @@ private:
protected: protected:
std::string getOption(fb_pixel_t * bgcol __attribute__((unused)) = NULL) { std::string getOption(fb_pixel_t * bgcol __attribute__((unused)) = NULL)
{
return to_string(configfile->getInt32(locale_real_names[name], defaultvalue)); return to_string(configfile->getInt32(locale_real_names[name], defaultvalue));
} }
@@ -1050,7 +1078,8 @@ public:
return input.exec(parent, action_Key); return input.exec(parent, action_Key);
} }
std::string &getValue(void) { std::string &getValue(void)
{
value = getOption(); value = getOption();
return value; return value;
} }
@@ -1091,8 +1120,6 @@ void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts)
mf->setHint("", LOCALE_MENU_HINT_FONT_SCALING); mf->setHint("", LOCALE_MENU_HINT_FONT_SCALING);
fontSettings->addItem(mf); fontSettings->addItem(mf);
//fontSettings->addItem( new CMenuForwarder(LOCALE_EPGPLUS_SELECT_FONT_NAME, true, NULL, this, "select_font"));
mn_widget_id_t w_index = MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU; mn_widget_id_t w_index = MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU;
for (unsigned int i = 0; i < FONT_GROUP_COUNT; i++) for (unsigned int i = 0; i < FONT_GROUP_COUNT; i++)
{ {
@@ -1312,7 +1339,8 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar)
show_tuner_icon = 0; show_tuner_icon = 0;
// show possible option if we in single box mode, but don't touch the real settings // show possible option if we in single box mode, but don't touch the real settings
int *p_show_tuner_icon = &show_tuner_icon; int *p_show_tuner_icon = &show_tuner_icon;
if (CFEManager::getInstance()->getFrontendCount() > 1) { if (CFEManager::getInstance()->getFrontendCount() > 1)
{
mc_active = true; mc_active = true;
// use the real value of g_settings.infobar_show_tuner // use the real value of g_settings.infobar_show_tuner
p_show_tuner_icon = &g_settings.infobar_show_tuner; p_show_tuner_icon = &g_settings.infobar_show_tuner;
@@ -1379,14 +1407,6 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist)
menu_chanlist->addItem(mc); menu_chanlist->addItem(mc);
channellistNotifier->addItem(mc); channellistNotifier->addItem(mc);
//NI
#if 0
//show channel logo
mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_CHANNELLOGO, &g_settings.channellist_show_channellogo, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_CHANNELLOGO);
menu_chanlist->addItem(mc);
#endif
// show numbers // show numbers
mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_CHANNELNUMBER, &g_settings.channellist_show_numbers, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_CHANNELNUMBER, &g_settings.channellist_show_numbers, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_CHANNELNUMBER); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_CHANNELNUMBER);
@@ -1483,37 +1503,44 @@ void COsdSetup::showOsdInfoclockSetup(CMenuWidget *menu_infoclock)
bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
{ {
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_POS)) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_POS))
{
submenu_menus->hide(); submenu_menus->hide();
return true; return true;
} }
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_HINTS)) { else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_HINTS))
{
/* change option after hide, to let hide clear hint */ /* change option after hide, to let hide clear hint */
submenu_menus->hide(); submenu_menus->hide();
g_settings.show_menu_hints = * (int*) data; g_settings.show_menu_hints = * (int*) data;
return true; return true;
} }
else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY)) else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY))
||(ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER))) { || (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_SHOW_TUNER)))
{
if (g_InfoViewer == NULL) if (g_InfoViewer == NULL)
g_InfoViewer = new CInfoViewer; g_InfoViewer = new CInfoViewer;
g_InfoViewer->changePB(); g_InfoViewer->changePB();
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY)){ if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY))
{
casystemActivate.Activate(g_settings.infobar_casystem_display < 2); casystemActivate.Activate(g_settings.infobar_casystem_display < 2);
return false; return false;
} }
return false; return false;
} }
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SCREENSAVER_DELAY)) { else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SCREENSAVER_DELAY))
{
screensaverActivate.Activate(g_settings.screensaver_delay != 0); screensaverActivate.Activate(g_settings.screensaver_delay != 0);
screensaverOptActivate.Activate(g_settings.screensaver_delay != 0 && g_settings.screensaver_mode == CScreenSaver::SCR_MODE_IMAGE); screensaverOptActivate.Activate(g_settings.screensaver_delay != 0 && g_settings.screensaver_mode == CScreenSaver::SCR_MODE_IMAGE);
return false; return false;
} }
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SCREENSAVER_MODE)) { else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SCREENSAVER_MODE))
{
screensaverOptActivate.Activate(g_settings.screensaver_mode == CScreenSaver::SCR_MODE_IMAGE); screensaverOptActivate.Activate(g_settings.screensaver_mode == CScreenSaver::SCR_MODE_IMAGE);
return false; return false;
} }
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET)) { else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET))
{
int preset = * (int *) data; int preset = * (int *) data;
printf("preset %d (setting %d)\n", preset, g_settings.screen_preset); printf("preset %d (setting %d)\n", preset, g_settings.screen_preset);
@@ -1567,15 +1594,18 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
return true; return true;
} }
#endif #endif
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS)) { else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS))
{
osd_menu->hide(); osd_menu->hide();
g_settings.theme.rounded_corners = * (int*) data; g_settings.theme.rounded_corners = * (int*) data;
return true; return true;
} }
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_RADIOTEXT)) { else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_RADIOTEXT))
{
resetRadioText(); resetRadioText();
} }
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_DIGITS)) { else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_DIGITS))
{
CVolumeHelper::getInstance()->refresh(); CVolumeHelper::getInstance()->refresh();
return false; return false;
} }
@@ -1587,7 +1617,8 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
#endif #endif
else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOCLOCK)) || else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOCLOCK)) ||
(ARE_LOCALES_EQUAL(OptionName, LOCALE_CLOCK_SIZE_HEIGHT)) || (ARE_LOCALES_EQUAL(OptionName, LOCALE_CLOCK_SIZE_HEIGHT)) ||
(ARE_LOCALES_EQUAL(OptionName, LOCALE_CLOCK_SECONDS))) { (ARE_LOCALES_EQUAL(OptionName, LOCALE_CLOCK_SECONDS)))
{
CInfoClock::getInstance()->ClearDisplay(); CInfoClock::getInstance()->ClearDisplay();
FileTimeOSD->Init(); FileTimeOSD->Init();
} }
@@ -1597,17 +1628,21 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
void COsdSetup::resetRadioText() void COsdSetup::resetRadioText()
{ {
if (getenv("SIMULATE_FE")){ if (getenv("SIMULATE_FE"))
{
dprintf(DEBUG_NORMAL, "\033[33m[COsdSetup][%s - %d] SIMULATE_FE is set, no radiotext function availavble \033[0m\n", __func__, __LINE__); dprintf(DEBUG_NORMAL, "\033[33m[COsdSetup][%s - %d] SIMULATE_FE is set, no radiotext function availavble \033[0m\n", __func__, __LINE__);
return; return;
} }
if (g_settings.radiotext_enable) { if (g_settings.radiotext_enable)
{
if (g_Radiotext == NULL) if (g_Radiotext == NULL)
g_Radiotext = new CRadioText; g_Radiotext = new CRadioText;
if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoModes::mode_radio)){ if (g_Radiotext && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoModes::mode_radio))
if (g_RadiotextWin){ {
if (g_RadiotextWin)
{
delete g_RadiotextWin; delete g_RadiotextWin;
g_RadiotextWin = NULL; g_RadiotextWin = NULL;
} }
@@ -1618,7 +1653,9 @@ void COsdSetup::resetRadioText()
g_Radiotext->setPid(pid); g_Radiotext->setPid(pid);
printf("\033[32m[COsdSetup] %s - %d: %d\033[0m\n", __func__, __LINE__, pid); printf("\033[32m[COsdSetup] %s - %d: %d\033[0m\n", __func__, __LINE__, pid);
} }
} else { }
else
{
if (g_Radiotext) if (g_Radiotext)
g_Radiotext->radiotext_stop(); g_Radiotext->radiotext_stop();
delete g_Radiotext; delete g_Radiotext;
@@ -1688,6 +1725,7 @@ const CMenuOptionChooser::keyval SCREENSHOT_OPTIONS[SCREENSHOT_OPTION_COUNT] =
void COsdSetup::showOsdScreenShotSetup(CMenuWidget *menu_screenshot) void COsdSetup::showOsdScreenShotSetup(CMenuWidget *menu_screenshot)
{ {
menu_screenshot->addIntroItems(LOCALE_SCREENSHOT_MENU); menu_screenshot->addIntroItems(LOCALE_SCREENSHOT_MENU);
if ((uint)g_settings.key_screenshot == CRCInput::RC_nokey) if ((uint)g_settings.key_screenshot == CRCInput::RC_nokey)
menu_screenshot->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCREENSHOT_INFO)); menu_screenshot->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCREENSHOT_INFO));
@@ -1777,7 +1815,8 @@ void COsdSetup::showOsdScreensaverSetup(CMenuWidget *menu_screensaver)
void COsdSetup::paintWindowSize(int w, int h) void COsdSetup::paintWindowSize(int w, int h)
{ {
if (win_demo == NULL) { if (win_demo == NULL)
{
win_demo = new CComponentsShapeSquare(0, 0, 0, 0); win_demo = new CComponentsShapeSquare(0, 0, 0, 0);
win_demo->setFrameThickness(OFFSET_INNER_MID); win_demo->setFrameThickness(OFFSET_INNER_MID);
win_demo->disableShadow(); win_demo->disableShadow();
@@ -1785,7 +1824,8 @@ void COsdSetup::paintWindowSize(int w, int h)
win_demo->setColorFrame(COL_RED); win_demo->setColorFrame(COL_RED);
win_demo->doPaintBg(true); win_demo->doPaintBg(true);
} }
else { else
{
if (win_demo->isPainted()) if (win_demo->isPainted())
win_demo->kill(); win_demo->kill();
} }

View File

@@ -64,6 +64,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
int width; int width;
int is_wizard; int is_wizard;
int show_menu_hints; int show_menu_hints;
int show_menu_hints_line;
int show_tuner_icon; int show_tuner_icon;
int showOsdSetup(); int showOsdSetup();
@@ -71,7 +72,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
void showOsdFontSizeSetup(CMenuWidget *menu_fonts); void showOsdFontSizeSetup(CMenuWidget *menu_fonts);
void showOsdTimeoutSetup(CMenuWidget *menu_timeout); void showOsdTimeoutSetup(CMenuWidget *menu_timeout);
void showOsdMenusSetup(CMenuWidget *menu_menus); void showOsdMenusSetup(CMenuWidget *menu_menus);
void showOsdChannellogosSetup(CMenuWidget *menu_channellogos); //NI void showOsdChannellogosSetup(CMenuWidget *menu_channellogos);
void showOsdInfobarSetup(CMenuWidget *menu_infobar); void showOsdInfobarSetup(CMenuWidget *menu_infobar);
void showOsdChanlistSetup(CMenuWidget *menu_chanlist); void showOsdChanlistSetup(CMenuWidget *menu_chanlist);
void showOsdEventlistSetup(CMenuWidget *menu_eventlist); void showOsdEventlistSetup(CMenuWidget *menu_eventlist);