Merge branch 'cst-next' of git://coolstreamtech.de/cst-public-gui-neutrino into ni/cst-next

Origin commit data
------------------
Branch: ni/coolstream
Commit: a62689a553
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-09 (Tue, 09 Aug 2016)


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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-08-09 18:01:04 +02:00
4 changed files with 8 additions and 69 deletions

View File

@@ -985,6 +985,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
switch ( msg )
{
case NeutrinoMessages::EVT_TIMER:
if (data == fader.GetFadeTimer()) {
if (fader.FadeDone())
loop = false;
}
else
CNeutrinoApp::getInstance()->handleMsg(msg, data);
if (!mp_info)
{
if (data == g_InfoViewer->getUpdateTimer()) {
@@ -997,12 +1003,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
pb.paint(false);
}
}
if (data == fader.GetFadeTimer()) {
if (fader.FadeDone())
loop = false;
}
else
CNeutrinoApp::getInstance()->handleMsg(msg, data);
}
break;
case NeutrinoMessages::EVT_CURRENTNEXT_EPG:

View File

@@ -1134,6 +1134,7 @@ int CMovieBrowser::exec(const char* path)
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
while (loop)
{
framebuffer->blit();
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
result = onButtonPress(msg);
@@ -1221,6 +1222,7 @@ int CMovieBrowser::exec(const char* path)
timeoutEnd = CRCInput::calcTimeoutEnd(timeout); // calcualate next timeout
}
hide();
framebuffer->blit();
//TRACE(" return %d\n",res);
m_prevBrowserSelection = m_currentBrowserSelection;

View File

@@ -54,19 +54,8 @@
cTmdb::cTmdb(std::string epgtitle)
{
frameBuffer = CFrameBuffer::getInstance();
minfo.epgtitle = epgtitle;
curl_handle = curl_easy_init();
form = NULL;
ox = frameBuffer->getScreenWidthRel(false);
oy = frameBuffer->getScreenHeightRel(false);
int buttonheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6;
toph = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight() + 6;
sx = getScreenStartX(ox);
sy = getScreenStartY(oy + buttonheight); /* button box is handled separately (why?) */
#ifdef TMDB_API_KEY
key = TMDB_API_KEY;
@@ -91,7 +80,6 @@ cTmdb::cTmdb(std::string epgtitle)
cTmdb::~cTmdb()
{
curl_easy_cleanup(curl_handle);
delete form;
}
size_t cTmdb::CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data)
@@ -306,48 +294,3 @@ std::string cTmdb::CreateEPGText()
epgtext += (std::string)g_Locale->getText(LOCALE_EPGEXTENDED_ACTORS)+":\n"+ minfo.cast+"\n";
return epgtext;
}
void cTmdb::exec()
{
neutrino_msg_t msg;
neutrino_msg_data_t data;
if (form == NULL)
form = new CComponentsForm();
form->setDimensionsAll(sx, sy, ox, oy);
CComponentsHeader *header = new CComponentsHeader(0, 0, ox, toph);
CComponentsText *headerText = new CComponentsText(15, 0, ox-15, toph, getTitle(), CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]);;
headerText->doPaintBg(false);
headerText->setTextColor(COL_MENUHEAD_TEXT);
form->addCCItem(header);
form->addCCItem(headerText);
CComponentsPicture *ptmp = new CComponentsPicture(5, toph+5, "/tmp/tmdb.jpg");
ptmp->setWidth(342);
ptmp->setHeight(513);
ptmp->setColorBody(COL_BLUE);
ptmp->setCorner(RADIUS_MID, CORNER_TOP_LEFT);
form->addCCItem(ptmp);
CComponentsText *des = new CComponentsText(ptmp->getWidth()+10, toph+5, form->getWidth()-ptmp->getWidth()-10, form->getHeight(), CreateEPGText(), CTextBox::AUTO_LINEBREAK_NO_BREAKCHARS | CTextBox::TOP);
des->setCorner(RADIUS_MID, CORNER_BOTTOM_RIGHT);
des->setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
form->addCCItem(des);
form->paint();
frameBuffer->blit();
while (1) {
g_RCInput->getMsg(&msg, &data, 100);
if (msg == CRCInput::RC_home)
break;
}
if (form->isPainted()) {
form->hide();
delete form;
form = NULL;
}
}

View File

@@ -24,7 +24,6 @@
#include <curl/easy.h>
#include <string>
#include <gui/components/cc.h>
typedef struct {
std::string epgtitle;
@@ -49,12 +48,8 @@ class cTmdb
{
private:
CURL *curl_handle;
CComponentsForm *form;
tmdbinfo minfo;
CFrameBuffer *frameBuffer;
int ox, oy, sx, sy, toph;
static size_t CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data);
std::string encodeUrl(std::string txt);
std::string decodeUrl(std::string url);
@@ -66,7 +61,6 @@ class cTmdb
public:
cTmdb(std::string epgtitle);
~cTmdb();
void exec();
std::string CreateEPGText();
std::string getTitle() { return minfo.epgtitle;}