lcd4l: possibility to use it in user menue

This commit is contained in:
GetAway
2018-12-26 20:06:01 +01:00
parent 99a6ab267d
commit 444173ead6
6 changed files with 30 additions and 0 deletions

View File

@@ -94,6 +94,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());

View File

@@ -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);

View File

@@ -76,6 +76,9 @@
#include <gui/widget/icons.h>
#include <gui/adzap.h>
#include <gui/network_setup.h>
#ifdef ENABLE_LCD4LINUX
#include <gui/lcd4l_setup.h>
#endif
#include <gui/update_menue.h>
#include <gui/hdd_menu.h>
#include <gui/webtv_setup.h>
@@ -487,6 +490,15 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
menu_item->setHint(NEUTRINO_ICON_HINT_NETWORK, LOCALE_MENU_HINT_NETWORK);
break;
}
#ifdef ENABLE_LCD4LINUX
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;
}
#endif
case SNeutrinoSettings::ITEM_SWUPDATE:
{
keyhelper.get(&key,&icon);

View File

@@ -98,6 +98,9 @@ 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 },
#ifdef ENABLE_LCD4LINUX
{ SNeutrinoSettings::ITEM_LCD4LINUX, LOCALE_LCD4L_SUPPORT, usermenu_show },
#endif
{ 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 },

View File

@@ -168,6 +168,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"

View File

@@ -925,6 +925,9 @@ struct SNeutrinoSettings
ITEM_ADZAP = 33,
ITEM_FILEPLAY_AUDIO = 34,
ITEM_TIMESHIFT = 35,
#ifdef ENABLE_LCD4LINUX
ITEM_LCD4LINUX = 36,
#endif
ITEM_MAX // MUST be always the last in the list
} USER_ITEM;