mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
glcd: show standard screen instead of menu while configuring positions
This commit is contained in:
@@ -120,6 +120,7 @@ cGLCD::cGLCD()
|
||||
timeout_cnt = 0;
|
||||
locked_countdown = false;
|
||||
time_thread_started = false;
|
||||
config_mode = false;
|
||||
|
||||
cglcd = this;
|
||||
|
||||
|
@@ -155,6 +155,7 @@ class cGLCD
|
||||
static void* Run(void *);
|
||||
static void Lock();
|
||||
static void Unlock();
|
||||
bool config_mode;
|
||||
public:
|
||||
enum {
|
||||
BMP = 0,
|
||||
@@ -234,6 +235,8 @@ class cGLCD
|
||||
bool dumpBuffer(fb_pixel_t *s, int format, const char *filename);
|
||||
void UpdateBrightness();
|
||||
int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data);
|
||||
void SetCfgMode(bool mode) { config_mode = mode; };
|
||||
bool GetCfgMode() { return config_mode; };
|
||||
|
||||
void ReInitFont() { fonts_initialized = false; };
|
||||
};
|
||||
|
@@ -233,6 +233,7 @@ bool GLCD_Menu::changeNotify (const neutrino_locale_t OptionName, void *Data)
|
||||
if (!Data)
|
||||
return false;
|
||||
cGLCD *cglcd = cGLCD::getInstance();
|
||||
cglcd->unlockChannel();
|
||||
|
||||
switch(OptionName)
|
||||
{
|
||||
@@ -485,6 +486,8 @@ int GLCD_Menu::GLCD_Theme_Settings()
|
||||
|
||||
int GLCD_Menu::GLCD_Theme_Position_Settings()
|
||||
{
|
||||
cGLCD::getInstance()->SetCfgMode(true);
|
||||
|
||||
CMenuWidget *gtps = new CMenuWidget(LOCALE_GLCD_THEME_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_GLCD_THEME_POSITION_SETTINGS);
|
||||
gtps->addIntroItems(LOCALE_GLCD_POSITION_SETTINGS);
|
||||
|
||||
@@ -596,6 +599,7 @@ int GLCD_Menu::GLCD_Theme_Position_Settings()
|
||||
int res = gtps->exec(NULL, "");
|
||||
delete gtps;
|
||||
cGLCD::getInstance()->StandbyMode(false);
|
||||
cGLCD::getInstance()->SetCfgMode(false);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -248,7 +248,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text
|
||||
}
|
||||
|
||||
#ifdef ENABLE_GRAPHLCD
|
||||
if (g_settings.glcd_enable)
|
||||
if (g_settings.glcd_enable && !cGLCD::getInstance()->GetCfgMode())
|
||||
cGLCD::lockChannel(g_Locale->getText(LOCALE_MAINMENU_HEAD), lcd_text, 0);
|
||||
#endif
|
||||
#ifdef ENABLE_LCD4LINUX
|
||||
@@ -1061,7 +1061,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
int rv = item->exec( this );
|
||||
|
||||
#ifdef ENABLE_GRAPHLCD
|
||||
if (g_settings.glcd_enable)
|
||||
if (g_settings.glcd_enable && !cGLCD::getInstance()->GetCfgMode())
|
||||
cGLCD::lockChannel(g_Locale->getText(LOCALE_MAINMENU_HEAD), item->lcd_text, 0);
|
||||
#endif
|
||||
#ifdef ENABLE_LCD4LINUX
|
||||
|
Reference in New Issue
Block a user