From 36bf89ea8e58f14bdb977c0733f250b313a6aade Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 2 Nov 2012 13:46:32 +0400 Subject: [PATCH] system/setting_helpers.cpp: add static CColorSetupNotifier::setPalette(), to call it direct Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a1bd6d404bbd001f0013b622d998a1f63d61c800 Author: [CST] Focus Date: 2012-11-02 (Fri, 02 Nov 2012) ------------------ This commit was generated by Migit --- src/system/setting_helpers.cpp | 18 +++++++----------- src/system/setting_helpers.h | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 92d2a8a95..b9c3b0990 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -129,10 +129,9 @@ bool CTouchFileNotifier::changeNotify(const neutrino_locale_t, void * data) return true; } -bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *) +void CColorSetupNotifier::setPalette() { CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); -// unsigned char r,g,b; //setting colors-.. frameBuffer->paletteGenFade(COL_MENUHEAD, convertSetupColor2RGB(g_settings.menu_Head_red, g_settings.menu_Head_green, g_settings.menu_Head_blue), @@ -165,13 +164,6 @@ bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *) convertSetupColor2RGB(g_settings.infobar_Text_red, g_settings.infobar_Text_green, g_settings.infobar_Text_blue), 8, convertSetupAlpha2Alpha(g_settings.infobar_alpha) ); -/* frameBuffer->paletteSetColor( COL_INFOBAR_SHADOW, - convertSetupColor2RGB( - int(g_settings.infobar_red*0.4), - int(g_settings.infobar_green*0.4), - int(g_settings.infobar_blue*0.4)), - g_settings.infobar_alpha); -*/ frameBuffer->paletteGenFade(COL_INFOBAR_SHADOW, convertSetupColor2RGB(int(g_settings.infobar_red*0.4), int(g_settings.infobar_green*0.4), int(g_settings.infobar_blue*0.4)), convertSetupColor2RGB(g_settings.infobar_Text_red, g_settings.infobar_Text_green, g_settings.infobar_Text_blue), @@ -189,6 +181,11 @@ bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *) 8, convertSetupAlpha2Alpha(g_settings.infobar_alpha) ); frameBuffer->paletteSet(); +} + +bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *) +{ + setPalette(); #if 0 /* recalculate volumebar */ CVolume::getInstance()->Init(); @@ -486,8 +483,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK //CNeutrinoApp::getInstance()->loadColors(NEUTRINO_SETTINGS_FILE); CNeutrinoApp::getInstance()->SetupFonts(); CNeutrinoApp::getInstance()->SetupTiming(); - CColorSetupNotifier colorSetupNotifier; - colorSetupNotifier.changeNotify(NONEXISTANT_LOCALE, NULL); + CColorSetupNotifier::setPalette(); CVFD::getInstance()->setlcdparameter(); CFrameBuffer::getInstance()->Clear(); } diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h index 22d0b27c9..ab3b9b1bd 100644 --- a/src/system/setting_helpers.h +++ b/src/system/setting_helpers.h @@ -88,6 +88,7 @@ class CColorSetupNotifier : public CChangeObserver { public: bool changeNotify(const neutrino_locale_t, void *); + static void setPalette(); }; class CAudioSetupNotifier : public CChangeObserver