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


Origin commit data
------------------
Commit: 470f8fa30c
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-11-22 (Tue, 22 Nov 2011)
This commit is contained in:
[CST] Focus
2011-11-22 17:12:06 +00:00
parent 043c91ee73
commit b13744d6fe
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)); osd_menu->addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, osd_menu_chanlist, NULL, CRCInput::RC_2));
//monitor //monitor
CScreenPresetNotifier * presetNotify = new CScreenPresetNotifier(); //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, 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); osd_menu->addItem(GenericMenuSeparatorLine);
//options //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)); 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)) if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS))
return true; return true;
@@ -643,6 +644,17 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/
osd_menu->hide(); osd_menu->hide();
return true; 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; return false;
} }

View File

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

View File

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