lcd4l add possibility to use it in user menu (thx GetAway)

Origin commit data
------------------
Branch: ni/coolstream
Commit: d61353f0fa
Author: TangoCash <eric@loxat.de>
Date: 2018-12-25 (Tue, 25 Dec 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2018-12-25 22:35:29 +01:00
committed by vanhofen
parent a4aa07635d
commit 6cd9cb74c8
6 changed files with 22 additions and 0 deletions

View File

@@ -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) int CLCD4lSetup::exec(CMenuTarget *parent, const std::string &actionkey)
{ {
printf("CLCD4lSetup::exec: actionkey %s\n", actionkey.c_str()); printf("CLCD4lSetup::exec: actionkey %s\n", actionkey.c_str());

View File

@@ -44,6 +44,7 @@ class CLCD4lSetup : public CMenuTarget, CChangeObserver
int show(); int show();
public: public:
static CLCD4lSetup* getInstance();
CLCD4lSetup(); CLCD4lSetup();
~CLCD4lSetup(); ~CLCD4lSetup();
int exec(CMenuTarget *parent, const std::string &actionkey); int exec(CMenuTarget *parent, const std::string &actionkey);

View File

@@ -76,6 +76,7 @@
#include <gui/widget/icons.h> #include <gui/widget/icons.h>
#include <gui/adzap.h> #include <gui/adzap.h>
#include <gui/network_setup.h> #include <gui/network_setup.h>
#include <gui/lcd4l_setup.h>
#include <gui/update_menue.h> #include <gui/update_menue.h>
#include <gui/hdd_menu.h> #include <gui/hdd_menu.h>
#include <gui/test_menu.h> //NI #include <gui/test_menu.h> //NI
@@ -526,6 +527,13 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
menu_item->setHint(NEUTRINO_ICON_HINT_NETWORK, LOCALE_MENU_HINT_NETWORK); menu_item->setHint(NEUTRINO_ICON_HINT_NETWORK, LOCALE_MENU_HINT_NETWORK);
break; 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: case SNeutrinoSettings::ITEM_SWUPDATE:
{ {
keyhelper.get(&key,&icon); keyhelper.get(&key,&icon);

View File

@@ -102,6 +102,7 @@ static keyvals usermenu_items[] =
{ SNeutrinoSettings::ITEM_AUDIOPLAY, LOCALE_AUDIOPLAYER_NAME, usermenu_show }, { SNeutrinoSettings::ITEM_AUDIOPLAY, LOCALE_AUDIOPLAYER_NAME, usermenu_show },
{ SNeutrinoSettings::ITEM_INETPLAY, LOCALE_INETRADIO_NAME, usermenu_show }, { SNeutrinoSettings::ITEM_INETPLAY, LOCALE_INETRADIO_NAME, usermenu_show },
{ SNeutrinoSettings::ITEM_NETSETTINGS, LOCALE_MAINSETTINGS_NETWORK, 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_SWUPDATE, LOCALE_SERVICEMENU_UPDATE, usermenu_show },
{ SNeutrinoSettings::ITEM_LIVESTREAM_RESOLUTION,LOCALE_LIVESTREAM_RESOLUTION, usermenu_show }, { SNeutrinoSettings::ITEM_LIVESTREAM_RESOLUTION,LOCALE_LIVESTREAM_RESOLUTION, usermenu_show },
{ SNeutrinoSettings::ITEM_ADZAP, LOCALE_USERMENU_ITEM_ADZAP, usermenu_show }, { SNeutrinoSettings::ITEM_ADZAP, LOCALE_USERMENU_ITEM_ADZAP, usermenu_show },

View File

@@ -171,6 +171,7 @@
#define NEUTRINO_ICON_HINT_AUDIO "hint_audio" #define NEUTRINO_ICON_HINT_AUDIO "hint_audio"
#define NEUTRINO_ICON_HINT_PROTECTION "hint_protection" #define NEUTRINO_ICON_HINT_PROTECTION "hint_protection"
#define NEUTRINO_ICON_HINT_NETWORK "hint_network" #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_RECORDING "hint_recording"
#define NEUTRINO_ICON_HINT_LANGUAGE "hint_language" #define NEUTRINO_ICON_HINT_LANGUAGE "hint_language"
#define NEUTRINO_ICON_HINT_OSD "hint_osd" #define NEUTRINO_ICON_HINT_OSD "hint_osd"

View File

@@ -969,6 +969,7 @@ struct SNeutrinoSettings
ITEM_TESTMENU = 37, //NI ITEM_TESTMENU = 37, //NI
ITEM_FILEPLAY_AUDIO = 38, ITEM_FILEPLAY_AUDIO = 38,
ITEM_TIMESHIFT = 39, ITEM_TIMESHIFT = 39,
ITEM_LCD4LINUX = 40,
ITEM_MAX // MUST be always the last in the list ITEM_MAX // MUST be always the last in the list
} USER_ITEM; } USER_ITEM;