diff --git a/src/driver/lcd4l.cpp b/src/driver/lcd4l.cpp index 6c6322c72..b0ea5ea48 100644 --- a/src/driver/lcd4l.cpp +++ b/src/driver/lcd4l.cpp @@ -100,6 +100,8 @@ extern CPictureViewer *g_PicViewer; #define START LCD_DATADIR "start" #define END LCD_DATADIR "end" +#define MENU LCD_DATADIR "menu" + #define FONT LCD_DATADIR "font" #define FGCOLOR LCD_DATADIR "fgcolor" #define BGCOLOR LCD_DATADIR "bgcolor" @@ -234,6 +236,16 @@ int CLCD4l::RemoveFile(const char *file) 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 max_brightness; diff --git a/src/driver/lcd4l.h b/src/driver/lcd4l.h index b4d5f876b..71c187ca2 100644 --- a/src/driver/lcd4l.h +++ b/src/driver/lcd4l.h @@ -65,6 +65,9 @@ class CLCD4l int CreateFile(const char *file, std::string content = "", bool convert = false); int RemoveFile(const char *file); + int CreateMenuFile(std::string content = "", bool convert = false); + int RemoveMenuFile(); + int GetMaxBrightness(); void ResetParseID() { m_ParseID = 0; } diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 5178f8fe8..3486f1609 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -597,7 +597,7 @@ int CBouquetList::show(bool bShowChannelList) cGLCD::unlockChannel(); #endif #ifdef ENABLE_LCD4LINUX - CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu"); + CLCD4l::getInstance()->RemoveMenuFile(); #endif fader.StopFade(); @@ -663,7 +663,7 @@ void CBouquetList::paintItem(int pos) #endif #ifdef ENABLE_LCD4LINUX 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 } else diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 48478f087..3351d23e9 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -979,7 +979,7 @@ int CChannelList::show() cGLCD::unlockChannel(); #endif #ifdef ENABLE_LCD4LINUX - CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu"); + CLCD4l::getInstance()->RemoveMenuFile(); #endif if(!dont_hide){ @@ -2264,7 +2264,7 @@ void CChannelList::updateVfd() #endif #ifdef ENABLE_LCD4LINUX 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 } diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 80698bf8e..f1483e9f1 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -400,7 +400,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) cGLCD::unlockChannel(); #endif #ifdef ENABLE_LCD4LINUX - CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu"); + CLCD4l::getInstance()->RemoveMenuFile(); #endif return menu_return::RETURN_REPAINT; } @@ -433,7 +433,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) #endif #ifdef ENABLE_LCD4LINUX 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 break; @@ -450,7 +450,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) #endif #ifdef ENABLE_LCD4LINUX 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 break; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index ab72aee6d..398c01064 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -254,7 +254,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text #endif #ifdef ENABLE_LCD4LINUX 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 } @@ -1041,7 +1041,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) cGLCD::unlockChannel(); #endif #ifdef ENABLE_LCD4LINUX - CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu"); + CLCD4l::getInstance()->RemoveMenuFile(); #endif //exec this item... @@ -1063,7 +1063,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) #endif #ifdef ENABLE_LCD4LINUX 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 switch ( rv ) { @@ -1154,7 +1154,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) cGLCD::unlockChannel(); #endif #ifdef ENABLE_LCD4LINUX - CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu"); + CLCD4l::getInstance()->RemoveMenuFile(); #endif for (unsigned int count = 0; count < items.size(); count++)