mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- lcd4l: add and use wrapper functions to handle /tmp/lcd/menu
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -100,6 +100,8 @@ extern CPictureViewer *g_PicViewer;
|
|||||||
#define START LCD_DATADIR "start"
|
#define START LCD_DATADIR "start"
|
||||||
#define END LCD_DATADIR "end"
|
#define END LCD_DATADIR "end"
|
||||||
|
|
||||||
|
#define MENU LCD_DATADIR "menu"
|
||||||
|
|
||||||
#define FONT LCD_DATADIR "font"
|
#define FONT LCD_DATADIR "font"
|
||||||
#define FGCOLOR LCD_DATADIR "fgcolor"
|
#define FGCOLOR LCD_DATADIR "fgcolor"
|
||||||
#define BGCOLOR LCD_DATADIR "bgcolor"
|
#define BGCOLOR LCD_DATADIR "bgcolor"
|
||||||
@@ -234,6 +236,16 @@ int CLCD4l::RemoveFile(const char *file)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CLCD4l::CreateMenuFile(std::string content, bool convert)
|
||||||
|
{
|
||||||
|
return CreateFile(MENU, content, convert);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLCD4l::RemoveMenuFile()
|
||||||
|
{
|
||||||
|
return RemoveFile(MENU);
|
||||||
|
}
|
||||||
|
|
||||||
int CLCD4l::GetMaxBrightness()
|
int CLCD4l::GetMaxBrightness()
|
||||||
{
|
{
|
||||||
int max_brightness;
|
int max_brightness;
|
||||||
|
@@ -65,6 +65,9 @@ class CLCD4l
|
|||||||
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
||||||
int RemoveFile(const char *file);
|
int RemoveFile(const char *file);
|
||||||
|
|
||||||
|
int CreateMenuFile(std::string content = "", bool convert = false);
|
||||||
|
int RemoveMenuFile();
|
||||||
|
|
||||||
int GetMaxBrightness();
|
int GetMaxBrightness();
|
||||||
|
|
||||||
void ResetParseID() { m_ParseID = 0; }
|
void ResetParseID() { m_ParseID = 0; }
|
||||||
|
@@ -597,7 +597,7 @@ int CBouquetList::show(bool bShowChannelList)
|
|||||||
cGLCD::unlockChannel();
|
cGLCD::unlockChannel();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
|
CLCD4l::getInstance()->RemoveMenuFile();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fader.StopFade();
|
fader.StopFade();
|
||||||
@@ -663,7 +663,7 @@ void CBouquetList::paintItem(int pos)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
if(g_settings.lcd4l_support)
|
if(g_settings.lcd4l_support)
|
||||||
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", lname, g_settings.lcd4l_convert);
|
CLCD4l::getInstance()->CreateMenuFile(lname, g_settings.lcd4l_convert);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -979,7 +979,7 @@ int CChannelList::show()
|
|||||||
cGLCD::unlockChannel();
|
cGLCD::unlockChannel();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
|
CLCD4l::getInstance()->RemoveMenuFile();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!dont_hide){
|
if(!dont_hide){
|
||||||
@@ -2264,7 +2264,7 @@ void CChannelList::updateVfd()
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
if (g_settings.lcd4l_support)
|
if (g_settings.lcd4l_support)
|
||||||
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", chan->getName().c_str(), g_settings.lcd4l_convert);
|
CLCD4l::getInstance()->CreateMenuFile(chan->getName().c_str(), g_settings.lcd4l_convert);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -400,7 +400,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
cGLCD::unlockChannel();
|
cGLCD::unlockChannel();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
|
CLCD4l::getInstance()->RemoveMenuFile();
|
||||||
#endif
|
#endif
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
}
|
}
|
||||||
@@ -433,7 +433,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
if (g_settings.lcd4l_support)
|
if (g_settings.lcd4l_support)
|
||||||
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", g_Locale->getText(LOCALE_SCANTS_HEAD), g_settings.lcd4l_convert);
|
CLCD4l::getInstance()->CreateMenuFile(g_Locale->getText(LOCALE_SCANTS_HEAD), g_settings.lcd4l_convert);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
if (g_settings.lcd4l_support)
|
if (g_settings.lcd4l_support)
|
||||||
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", g_Locale->getText(LOCALE_SCANTS_HEAD), g_settings.lcd4l_convert);
|
CLCD4l::getInstance()->CreateMenuFile(g_Locale->getText(LOCALE_SCANTS_HEAD), g_settings.lcd4l_convert);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -254,7 +254,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
if (g_settings.lcd4l_support)
|
if (g_settings.lcd4l_support)
|
||||||
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", lcd_text, g_settings.lcd4l_convert);
|
CLCD4l::getInstance()->CreateMenuFile(lcd_text, g_settings.lcd4l_convert);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1041,7 +1041,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
cGLCD::unlockChannel();
|
cGLCD::unlockChannel();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
|
CLCD4l::getInstance()->RemoveMenuFile();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//exec this item...
|
//exec this item...
|
||||||
@@ -1063,7 +1063,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
if (g_settings.lcd4l_support)
|
if (g_settings.lcd4l_support)
|
||||||
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", item->lcd_text, g_settings.lcd4l_convert);
|
CLCD4l::getInstance()->CreateMenuFile(item->lcd_text, g_settings.lcd4l_convert);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch ( rv ) {
|
switch ( rv ) {
|
||||||
@@ -1154,7 +1154,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
cGLCD::unlockChannel();
|
cGLCD::unlockChannel();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LCD4LINUX
|
#ifdef ENABLE_LCD4LINUX
|
||||||
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
|
CLCD4l::getInstance()->RemoveMenuFile();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (unsigned int count = 0; count < items.size(); count++)
|
for (unsigned int count = 0; count < items.size(); count++)
|
||||||
|
Reference in New Issue
Block a user