Move OSD preset notify to osd setup

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1883 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2011-11-22 17:12:06 +00:00
parent 951acc4aff
commit 470f8fa30c
3 changed files with 19 additions and 5 deletions

View File

@@ -423,8 +423,9 @@ int COsdSetup::showOsdSetup()
osd_menu->addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, osd_menu_chanlist, NULL, CRCInput::RC_2));
//monitor
CScreenPresetNotifier * presetNotify = new CScreenPresetNotifier();
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, presetNotify));
//CScreenPresetNotifier * presetNotify = new CScreenPresetNotifier();
//osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, presetNotify));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this));
osd_menu->addItem(GenericMenuSeparatorLine);
//options
@@ -635,7 +636,7 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist)
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*/)
bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
{
if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS))
return true;
@@ -643,6 +644,17 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/
osd_menu->hide();
return true;
}
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET)) {
int preset = * (int *) data;
printf("preset %d (setting %d)\n", preset, g_settings.screen_preset);
g_settings.screen_StartX = g_settings.screen_preset ? g_settings.screen_StartX_lcd : g_settings.screen_StartX_crt;
g_settings.screen_StartY = g_settings.screen_preset ? g_settings.screen_StartY_lcd : g_settings.screen_StartY_crt;
g_settings.screen_EndX = g_settings.screen_preset ? g_settings.screen_EndX_lcd : g_settings.screen_EndX_crt;
g_settings.screen_EndY = g_settings.screen_preset ? g_settings.screen_EndY_lcd : g_settings.screen_EndY_crt;
osd_menu->hide();
return true;
}
return false;
}

View File

@@ -1060,6 +1060,7 @@ extern cCpuFreqManager * cpuFreq;
return true;
}
#if 0
bool CScreenPresetNotifier::changeNotify(const neutrino_locale_t /*OptionName*/, void * data)
{
int preset = * (int *) data;
@@ -1072,7 +1073,7 @@ printf("CScreenPresetNotifier::changeNotify preset %d (setting %d)\n", preset, g
CFrameBuffer::getInstance()->Clear();
return true;
}
#endif
bool CAllUsalsNotifier::changeNotify(const neutrino_locale_t /*OptionName*/, void * data)
{
int onoff = * (int *) data;

View File

@@ -296,12 +296,13 @@ public:
bool changeNotify(const neutrino_locale_t, void * data);
};
#if 0
class CScreenPresetNotifier : public CChangeObserver
{
public:
bool changeNotify(const neutrino_locale_t, void * data);
};
#endif
class CAllUsalsNotifier : public CChangeObserver
{
public: