From 44bbd4f5c64d9f03dedc13f14ac896c653169672 Mon Sep 17 00:00:00 2001 From: satbaby Date: Thu, 21 Jan 2010 07:28:14 +0000 Subject: [PATCH] optimize code git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@197 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/infoviewer.cpp | 46 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index b463d0b43..4499390dd 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -553,7 +553,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_set if (showButtonBar) { sec_timer_id = g_RCInput->addTimer (1*1000*1000, false); - if (bottom_bar_offset > 0) + if (g_settings.casystem_display) { // FIXME frameBuffer->paintBox(ChanInfoX, BoxEndY, BoxEndX, BoxEndY + bottom_bar_offset, COL_BLACK); 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) { - 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); 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 (); } 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) { // hierher kann das event nur dann kommen, wenn ein anderes Fenster im Vordergrund ist! g_RCInput->killTimer (fadeTimer); frameBuffer->setBlendLevel(g_settings.gtx_alpha1, g_settings.gtx_alpha2); - return messages_return::handled; } else if (data == lcdUpdateTimer) { //printf("CInfoViewer::handleMsg: lcdUpdateTimer\n"); @@ -960,26 +976,12 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) showButton_Audio (); } 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) { if ((*(t_channel_id *) data) == channel_id) { if (is_visible && showButtonBar) showButton_SubServices (); } 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) { chanready = 1; showSNR (); @@ -1018,7 +1020,6 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) aspectRatio = data; if (is_visible && showButtonBar) showIcon_16_9 (); - return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_TIMESET) { 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) { Set_CA_Status (false); 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; @@ -1777,7 +1773,7 @@ int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*action void CInfoViewer::paint_ca_icons(int caid, char * icon) { - if (bottom_bar_offset == 0) + if (!g_settings.casystem_display) return; char buf[20];