mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
optimize code
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@197 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -553,7 +553,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_set
|
|||||||
if (showButtonBar) {
|
if (showButtonBar) {
|
||||||
sec_timer_id = g_RCInput->addTimer (1*1000*1000, false);
|
sec_timer_id = g_RCInput->addTimer (1*1000*1000, false);
|
||||||
|
|
||||||
if (bottom_bar_offset > 0)
|
if (g_settings.casystem_display)
|
||||||
{ // FIXME
|
{ // FIXME
|
||||||
frameBuffer->paintBox(ChanInfoX, BoxEndY, BoxEndX, BoxEndY + bottom_bar_offset, COL_BLACK);
|
frameBuffer->paintBox(ChanInfoX, BoxEndY, BoxEndX, BoxEndY + bottom_bar_offset, COL_BLACK);
|
||||||
int xcnt = (BoxEndX - ChanInfoX) / 4;
|
int xcnt = (BoxEndX - ChanInfoX) / 4;
|
||||||
@@ -924,7 +924,6 @@ void CInfoViewer::showMotorMoving (int duration)
|
|||||||
|
|
||||||
int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((msg == NeutrinoMessages::EVT_CURRENTNEXT_EPG) || (msg == NeutrinoMessages::EVT_NEXTPROGRAM)) {
|
if ((msg == NeutrinoMessages::EVT_CURRENTNEXT_EPG) || (msg == NeutrinoMessages::EVT_NEXTPROGRAM)) {
|
||||||
//printf("CInfoViewer::handleMsg: NeutrinoMessages::EVT_CURRENTNEXT_EPG data %llx current %llx\n", *(t_channel_id *) data, channel_id & 0xFFFFFFFFFFFFULL);
|
//printf("CInfoViewer::handleMsg: NeutrinoMessages::EVT_CURRENTNEXT_EPG data %llx current %llx\n", *(t_channel_id *) data, channel_id & 0xFFFFFFFFFFFFULL);
|
||||||
if ((*(t_channel_id *) data) == (channel_id & 0xFFFFFFFFFFFFULL)) {
|
if ((*(t_channel_id *) data) == (channel_id & 0xFFFFFFFFFFFFULL)) {
|
||||||
@@ -934,12 +933,29 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
showLcdPercentOver ();
|
showLcdPercentOver ();
|
||||||
}
|
}
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if (msg == NeutrinoMessages::EVT_TIMER) {
|
} else if (msg == NeutrinoMessages::EVT_ZAP_GOTPIDS) {
|
||||||
|
if ((*(t_channel_id *) data) == channel_id) {
|
||||||
|
if (is_visible && showButtonBar) {
|
||||||
|
showIcon_VTXT ();
|
||||||
|
showIcon_SubT();
|
||||||
|
showIcon_CA_Status (0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return messages_return::handled;
|
||||||
|
} else if ((msg == NeutrinoMessages::EVT_ZAP_COMPLETE) ||
|
||||||
|
(msg == NeutrinoMessages::EVT_ZAP_ISNVOD)){
|
||||||
|
channel_id = (*(t_channel_id *)data);
|
||||||
|
return messages_return::handled;
|
||||||
|
}else if (msg == NeutrinoMessages::EVT_ZAP_CA_ID) {
|
||||||
|
chanready = 1;
|
||||||
|
Set_CA_Status (data);
|
||||||
|
showSNR ();
|
||||||
|
return messages_return::handled;
|
||||||
|
}else if (msg == NeutrinoMessages::EVT_TIMER) {
|
||||||
if (data == fadeTimer) {
|
if (data == fadeTimer) {
|
||||||
// hierher kann das event nur dann kommen, wenn ein anderes Fenster im Vordergrund ist!
|
// hierher kann das event nur dann kommen, wenn ein anderes Fenster im Vordergrund ist!
|
||||||
g_RCInput->killTimer (fadeTimer);
|
g_RCInput->killTimer (fadeTimer);
|
||||||
frameBuffer->setBlendLevel(g_settings.gtx_alpha1, g_settings.gtx_alpha2);
|
frameBuffer->setBlendLevel(g_settings.gtx_alpha1, g_settings.gtx_alpha2);
|
||||||
|
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if (data == lcdUpdateTimer) {
|
} else if (data == lcdUpdateTimer) {
|
||||||
//printf("CInfoViewer::handleMsg: lcdUpdateTimer\n");
|
//printf("CInfoViewer::handleMsg: lcdUpdateTimer\n");
|
||||||
@@ -960,26 +976,12 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
showButton_Audio ();
|
showButton_Audio ();
|
||||||
}
|
}
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if (msg == NeutrinoMessages::EVT_ZAP_GOTPIDS) {
|
|
||||||
if ((*(t_channel_id *) data) == channel_id) {
|
|
||||||
if (is_visible && showButtonBar) {
|
|
||||||
showIcon_VTXT ();
|
|
||||||
showIcon_SubT();
|
|
||||||
showIcon_CA_Status (0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return messages_return::handled;
|
|
||||||
} else if (msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES) {
|
} else if (msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES) {
|
||||||
if ((*(t_channel_id *) data) == channel_id) {
|
if ((*(t_channel_id *) data) == channel_id) {
|
||||||
if (is_visible && showButtonBar)
|
if (is_visible && showButtonBar)
|
||||||
showButton_SubServices ();
|
showButton_SubServices ();
|
||||||
}
|
}
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if ((msg == NeutrinoMessages::EVT_ZAP_COMPLETE) ||
|
|
||||||
(msg == NeutrinoMessages::EVT_ZAP_ISNVOD))
|
|
||||||
{
|
|
||||||
channel_id = (*(t_channel_id *)data);
|
|
||||||
return messages_return::handled;
|
|
||||||
} else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) {
|
} else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) {
|
||||||
chanready = 1;
|
chanready = 1;
|
||||||
showSNR ();
|
showSNR ();
|
||||||
@@ -1018,7 +1020,6 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
aspectRatio = data;
|
aspectRatio = data;
|
||||||
if (is_visible && showButtonBar)
|
if (is_visible && showButtonBar)
|
||||||
showIcon_16_9 ();
|
showIcon_16_9 ();
|
||||||
|
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if (msg == NeutrinoMessages::EVT_TIMESET) {
|
} else if (msg == NeutrinoMessages::EVT_TIMESET) {
|
||||||
gotTime = true;
|
gotTime = true;
|
||||||
@@ -1032,11 +1033,6 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
} else if (msg == NeutrinoMessages::EVT_ZAP_CA_FTA) {
|
} else if (msg == NeutrinoMessages::EVT_ZAP_CA_FTA) {
|
||||||
Set_CA_Status (false);
|
Set_CA_Status (false);
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if (msg == NeutrinoMessages::EVT_ZAP_CA_ID) {
|
|
||||||
chanready = 1;
|
|
||||||
Set_CA_Status (data);
|
|
||||||
showSNR ();
|
|
||||||
return messages_return::handled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return messages_return::unhandled;
|
return messages_return::unhandled;
|
||||||
@@ -1777,7 +1773,7 @@ int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*action
|
|||||||
|
|
||||||
void CInfoViewer::paint_ca_icons(int caid, char * icon)
|
void CInfoViewer::paint_ca_icons(int caid, char * icon)
|
||||||
{
|
{
|
||||||
if (bottom_bar_offset == 0)
|
if (!g_settings.casystem_display)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char buf[20];
|
char buf[20];
|
||||||
|
Reference in New Issue
Block a user