diff --git a/src/gui/lcd4l_setup.cpp b/src/gui/lcd4l_setup.cpp index f92996d2a..0659db35a 100644 --- a/src/gui/lcd4l_setup.cpp +++ b/src/gui/lcd4l_setup.cpp @@ -89,6 +89,16 @@ CLCD4lSetup::~CLCD4lSetup() { } +CLCD4lSetup* CLCD4lSetup::getInstance() +{ + static CLCD4lSetup* me = NULL; + + if(!me) + me = new CLCD4lSetup(); + + return me; +} + int CLCD4lSetup::exec(CMenuTarget *parent, const std::string &actionkey) { printf("CLCD4lSetup::exec: actionkey %s\n", actionkey.c_str()); diff --git a/src/gui/lcd4l_setup.h b/src/gui/lcd4l_setup.h index 217f4e1e2..68ac7c801 100644 --- a/src/gui/lcd4l_setup.h +++ b/src/gui/lcd4l_setup.h @@ -44,6 +44,7 @@ class CLCD4lSetup : public CMenuTarget, CChangeObserver int show(); public: + static CLCD4lSetup* getInstance(); CLCD4lSetup(); ~CLCD4lSetup(); int exec(CMenuTarget *parent, const std::string &actionkey); diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index ee67c1460..c4300b039 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include //NI @@ -526,6 +527,13 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) menu_item->setHint(NEUTRINO_ICON_HINT_NETWORK, LOCALE_MENU_HINT_NETWORK); break; } + case SNeutrinoSettings::ITEM_LCD4LINUX: + { + keyhelper.get(&key,&icon); + menu_item = new CMenuForwarder(LOCALE_LCD4L_SUPPORT, ((access("/usr/bin/lcd4linux", F_OK) == 0) || (access("/var/bin/lcd4linux", F_OK) == 0)), NULL, CLCD4lSetup::getInstance(), NULL, key, icon); + menu_item->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_SUPPORT); + break; + } case SNeutrinoSettings::ITEM_SWUPDATE: { keyhelper.get(&key,&icon); diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index d631d8b73..9a6637af5 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -102,6 +102,7 @@ static keyvals usermenu_items[] = { SNeutrinoSettings::ITEM_AUDIOPLAY, LOCALE_AUDIOPLAYER_NAME, usermenu_show }, { SNeutrinoSettings::ITEM_INETPLAY, LOCALE_INETRADIO_NAME, usermenu_show }, { SNeutrinoSettings::ITEM_NETSETTINGS, LOCALE_MAINSETTINGS_NETWORK, usermenu_show }, + { SNeutrinoSettings::ITEM_LCD4LINUX, LOCALE_LCD4L_SUPPORT, usermenu_show }, { SNeutrinoSettings::ITEM_SWUPDATE, LOCALE_SERVICEMENU_UPDATE, usermenu_show }, { SNeutrinoSettings::ITEM_LIVESTREAM_RESOLUTION,LOCALE_LIVESTREAM_RESOLUTION, usermenu_show }, { SNeutrinoSettings::ITEM_ADZAP, LOCALE_USERMENU_ITEM_ADZAP, usermenu_show }, diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index b3d59b577..6fce619df 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -171,6 +171,7 @@ #define NEUTRINO_ICON_HINT_AUDIO "hint_audio" #define NEUTRINO_ICON_HINT_PROTECTION "hint_protection" #define NEUTRINO_ICON_HINT_NETWORK "hint_network" +#define NEUTRINO_ICON_HINT_LCD4LINUX "hint_lcd4linux" #define NEUTRINO_ICON_HINT_RECORDING "hint_recording" #define NEUTRINO_ICON_HINT_LANGUAGE "hint_language" #define NEUTRINO_ICON_HINT_OSD "hint_osd" diff --git a/src/system/settings.h b/src/system/settings.h index 87fce174d..c3a47886a 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -969,6 +969,7 @@ struct SNeutrinoSettings ITEM_TESTMENU = 37, //NI ITEM_FILEPLAY_AUDIO = 38, ITEM_TIMESHIFT = 39, + ITEM_LCD4LINUX = 40, ITEM_MAX // MUST be always the last in the list } USER_ITEM;