mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
- moviebrowser: add lcd4linux support
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -239,6 +239,16 @@ int CLCD4l::RemoveFile(const char *file)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CLCD4l::CreateEventFile(std::string content, bool convert)
|
||||||
|
{
|
||||||
|
return CreateFile(EVENT, content, convert);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLCD4l::RemoveEventFile()
|
||||||
|
{
|
||||||
|
return RemoveFile(EVENT);
|
||||||
|
}
|
||||||
|
|
||||||
int CLCD4l::CreateMenuFile(std::string content, bool convert)
|
int CLCD4l::CreateMenuFile(std::string content, bool convert)
|
||||||
{
|
{
|
||||||
return CreateFile(MENU, content, convert);
|
return CreateFile(MENU, content, convert);
|
||||||
@@ -781,6 +791,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT;
|
Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT;
|
||||||
Service = g_Locale->getText(LOCALE_MAINMENU_AVINPUTMODE);
|
Service = g_Locale->getText(LOCALE_MAINMENU_AVINPUTMODE);
|
||||||
}
|
}
|
||||||
|
else if (parseID == NeutrinoModes::mode_moviebrowser)
|
||||||
|
{
|
||||||
|
Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT;
|
||||||
|
Service = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD);
|
||||||
|
}
|
||||||
else if (parseID == NeutrinoModes::mode_ts)
|
else if (parseID == NeutrinoModes::mode_ts)
|
||||||
{
|
{
|
||||||
if (ModeTshift)
|
if (ModeTshift)
|
||||||
@@ -1076,6 +1091,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
// TODO: Event = Bildname
|
// TODO: Event = Bildname
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else if (parseID == NeutrinoModes::mode_moviebrowser)
|
||||||
|
{
|
||||||
|
// do nothing; Event is processed in moviebrowser
|
||||||
|
}
|
||||||
else if (parseID == NeutrinoModes::mode_ts)
|
else if (parseID == NeutrinoModes::mode_ts)
|
||||||
{
|
{
|
||||||
if (CMoviePlayerGui::getInstance().p_movie_info)
|
if (CMoviePlayerGui::getInstance().p_movie_info)
|
||||||
|
@@ -65,6 +65,8 @@ 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 CreateEventFile(std::string content = "", bool convert = false);
|
||||||
|
int RemoveEventFile();
|
||||||
int CreateMenuFile(std::string content = "", bool convert = false);
|
int CreateMenuFile(std::string content = "", bool convert = false);
|
||||||
int RemoveMenuFile();
|
int RemoveMenuFile();
|
||||||
|
|
||||||
|
@@ -80,6 +80,10 @@
|
|||||||
#include <timerdclient/timerdclient.h>
|
#include <timerdclient/timerdclient.h>
|
||||||
#include <system/hddstat.h>
|
#include <system/hddstat.h>
|
||||||
|
|
||||||
|
#ifdef ENABLE_LCD4LINUX
|
||||||
|
#include "driver/lcd4l.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern CPictureViewer * g_PicViewer;
|
extern CPictureViewer * g_PicViewer;
|
||||||
extern bool timeset;
|
extern bool timeset;
|
||||||
|
|
||||||
@@ -1064,7 +1068,12 @@ int CMovieBrowser::exec(const char* path)
|
|||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
neutrino_msg_data_t data;
|
neutrino_msg_data_t data;
|
||||||
|
|
||||||
|
// tell neutrino we're in moviebrowser mode
|
||||||
|
m_LastMode = CNeutrinoApp::getInstance()->getMode();
|
||||||
|
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoModes::mode_moviebrowser | NeutrinoModes::norezap);
|
||||||
|
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
|
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
|
||||||
|
|
||||||
loadSettings(&m_settings);
|
loadSettings(&m_settings);
|
||||||
initFrames();
|
initFrames();
|
||||||
|
|
||||||
@@ -1179,6 +1188,14 @@ int CMovieBrowser::exec(const char* path)
|
|||||||
loop = false;
|
loop = false;
|
||||||
g_RCInput->postMsg(msg, data);
|
g_RCInput->postMsg(msg, data);
|
||||||
}
|
}
|
||||||
|
else if (msg == NeutrinoMessages::CHANGEMODE)
|
||||||
|
{
|
||||||
|
if ((data & NeutrinoModes::mode_mask) != NeutrinoModes::mode_moviebrowser)
|
||||||
|
{
|
||||||
|
loop = false;
|
||||||
|
m_LastMode = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
|
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
|
||||||
{
|
{
|
||||||
TRACE("[mb]->exec: getInstance\n");
|
TRACE("[mb]->exec: getInstance\n");
|
||||||
@@ -1206,7 +1223,8 @@ int CMovieBrowser::exec(const char* path)
|
|||||||
fileInfoStale();
|
fileInfoStale();
|
||||||
}
|
}
|
||||||
|
|
||||||
//CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, m_LastMode);
|
||||||
|
|
||||||
return (res);
|
return (res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1255,8 +1273,6 @@ int CMovieBrowser::paint(void)
|
|||||||
{
|
{
|
||||||
TRACE("[mb]->%s\n", __func__);
|
TRACE("[mb]->%s\n", __func__);
|
||||||
|
|
||||||
//CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
|
|
||||||
|
|
||||||
Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_LIST];
|
Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_LIST];
|
||||||
m_movieSelectionHandler = NULL;
|
m_movieSelectionHandler = NULL;
|
||||||
|
|
||||||
@@ -1672,6 +1688,11 @@ void CMovieBrowser::refreshLCD(void)
|
|||||||
if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
|
if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef ENABLE_LCD4LINUX
|
||||||
|
if (g_settings.lcd4l_support)
|
||||||
|
CLCD4l::getInstance()->CreateEventFile(m_movieSelectionHandler->epgTitle.c_str(), g_settings.lcd4l_convert);
|
||||||
|
#endif
|
||||||
|
|
||||||
CVFD::getInstance()->showMenuText(0, m_movieSelectionHandler->epgTitle.c_str(), -1, true); // UTF-8
|
CVFD::getInstance()->showMenuText(0, m_movieSelectionHandler->epgTitle.c_str(), -1, true); // UTF-8
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4596,7 +4617,13 @@ int CMenuSelector::paint(bool selected)
|
|||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y+height,dx- (stringstartposName - x), optionName, color);
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y+height,dx- (stringstartposName - x), optionName, color);
|
||||||
|
|
||||||
if (selected)
|
if (selected)
|
||||||
|
{
|
||||||
|
#ifdef ENABLE_LCD4LINUX
|
||||||
|
if (g_settings.lcd4l_support)
|
||||||
|
CLCD4l::getInstance()->CreateEventFile(optionName, g_settings.lcd4l_convert);
|
||||||
|
#endif
|
||||||
CVFD::getInstance()->showMenuText(0, optionName, -1, true); // UTF-8
|
CVFD::getInstance()->showMenuText(0, optionName, -1, true); // UTF-8
|
||||||
|
}
|
||||||
|
|
||||||
return y+height;
|
return y+height;
|
||||||
}
|
}
|
||||||
|
@@ -221,6 +221,8 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals
|
|||||||
Font* m_pcFontTitle;
|
Font* m_pcFontTitle;
|
||||||
std::string m_textTitle;
|
std::string m_textTitle;
|
||||||
|
|
||||||
|
int m_LastMode;
|
||||||
|
|
||||||
MB_PARENTAL_LOCK m_parentalLock;
|
MB_PARENTAL_LOCK m_parentalLock;
|
||||||
MB_STORAGE_TYPE m_storageType;
|
MB_STORAGE_TYPE m_storageType;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user