mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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;
|
||||
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)
|
||||
{
|
||||
if (ModeTshift)
|
||||
@@ -1076,6 +1091,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
||||
// TODO: Event = Bildname
|
||||
}
|
||||
#endif
|
||||
else if (parseID == NeutrinoModes::mode_moviebrowser)
|
||||
{
|
||||
// do nothing; Event is processed in moviebrowser
|
||||
}
|
||||
else if (parseID == NeutrinoModes::mode_ts)
|
||||
{
|
||||
if (CMoviePlayerGui::getInstance().p_movie_info)
|
||||
|
@@ -65,6 +65,8 @@ class CLCD4l
|
||||
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
||||
int RemoveFile(const char *file);
|
||||
|
||||
int CreateEventFile(std::string content = "", bool convert = false);
|
||||
int RemoveEventFile();
|
||||
int CreateMenuFile(std::string content = "", bool convert = false);
|
||||
int RemoveMenuFile();
|
||||
|
||||
|
@@ -80,6 +80,10 @@
|
||||
#include <timerdclient/timerdclient.h>
|
||||
#include <system/hddstat.h>
|
||||
|
||||
#ifdef ENABLE_LCD4LINUX
|
||||
#include "driver/lcd4l.h"
|
||||
#endif
|
||||
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
extern bool timeset;
|
||||
|
||||
@@ -1064,7 +1068,12 @@ int CMovieBrowser::exec(const char* path)
|
||||
neutrino_msg_t msg;
|
||||
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));
|
||||
|
||||
loadSettings(&m_settings);
|
||||
initFrames();
|
||||
|
||||
@@ -1179,6 +1188,14 @@ int CMovieBrowser::exec(const char* path)
|
||||
loop = false;
|
||||
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)
|
||||
{
|
||||
TRACE("[mb]->exec: getInstance\n");
|
||||
@@ -1206,7 +1223,8 @@ int CMovieBrowser::exec(const char* path)
|
||||
fileInfoStale();
|
||||
}
|
||||
|
||||
//CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, m_LastMode);
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
@@ -1255,8 +1273,6 @@ int CMovieBrowser::paint(void)
|
||||
{
|
||||
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];
|
||||
m_movieSelectionHandler = NULL;
|
||||
|
||||
@@ -1672,6 +1688,11 @@ void CMovieBrowser::refreshLCD(void)
|
||||
if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
|
||||
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
|
||||
}
|
||||
|
||||
@@ -4596,7 +4617,13 @@ int CMenuSelector::paint(bool selected)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y+height,dx- (stringstartposName - x), optionName, color);
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
return y+height;
|
||||
}
|
||||
|
@@ -221,6 +221,8 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals
|
||||
Font* m_pcFontTitle;
|
||||
std::string m_textTitle;
|
||||
|
||||
int m_LastMode;
|
||||
|
||||
MB_PARENTAL_LOCK m_parentalLock;
|
||||
MB_STORAGE_TYPE m_storageType;
|
||||
|
||||
|
Reference in New Issue
Block a user