- infoviewer_bb: rename infobar buttons

This commit is contained in:
svenhoefer
2015-12-14 13:53:04 +01:00
parent e22d2d8a45
commit 7ccb57548b
3 changed files with 27 additions and 27 deletions

View File

@@ -1348,7 +1348,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
} else if (msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS) { } else if (msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS) {
if ((*(t_channel_id *) data) == current_channel_id) { if ((*(t_channel_id *) data) == current_channel_id) {
if (is_visible && showButtonBar) if (is_visible && showButtonBar)
infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_AUDIO); infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_GREEN);
if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio)) if (g_settings.radiotext_enable && g_Radiotext && !g_RemoteControl->current_PIDs.APIDs.empty() && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio))
g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid); g_Radiotext->setPid(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid);
} }
@@ -1356,7 +1356,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
} else if (msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES) { } else if (msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES) {
if ((*(t_channel_id *) data) == current_channel_id) { if ((*(t_channel_id *) data) == current_channel_id) {
if (is_visible && showButtonBar) if (is_visible && showButtonBar)
infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_SUBS); infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_YELLOW);
} }
return messages_return::handled; return messages_return::handled;
} else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) { } else if (msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) {
@@ -1757,7 +1757,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
frameBuffer->paintBackgroundBoxRel (BoxEndX - 108, posy, 112, height2); frameBuffer->paintBackgroundBoxRel (BoxEndX - 108, posy, 112, height2);
} }
#endif #endif
infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_EPG); infoViewerBB->showBBButtons(CInfoViewerBB::BUTTON_RED);
} }
if ((info_CurrentNext.flags & CSectionsdClient::epgflags::not_broadcast) || if ((info_CurrentNext.flags & CSectionsdClient::epgflags::not_broadcast) ||

View File

@@ -217,7 +217,7 @@ void CInfoViewerBB::getBBButtonInfo()
bool active; bool active;
std::string text, icon; std::string text, icon;
switch (i) { switch (i) {
case CInfoViewerBB::BUTTON_EPG: case CInfoViewerBB::BUTTON_RED:
icon = NEUTRINO_ICON_BUTTON_RED; icon = NEUTRINO_ICON_BUTTON_RED;
frameBuffer->getIconSize(icon.c_str(), &w, &h); frameBuffer->getIconSize(icon.c_str(), &w, &h);
mode = CNeutrinoApp::getInstance()->getMode(); mode = CNeutrinoApp::getInstance()->getMode();
@@ -233,7 +233,7 @@ void CInfoViewerBB::getBBButtonInfo()
text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST);
} }
break; break;
case CInfoViewerBB::BUTTON_AUDIO: case CInfoViewerBB::BUTTON_GREEN:
icon = NEUTRINO_ICON_BUTTON_GREEN; icon = NEUTRINO_ICON_BUTTON_GREEN;
frameBuffer->getIconSize(icon.c_str(), &w, &h); frameBuffer->getIconSize(icon.c_str(), &w, &h);
text = CUserMenu::getUserMenuButtonName(1, active); text = CUserMenu::getUserMenuButtonName(1, active);
@@ -252,7 +252,7 @@ void CInfoViewerBB::getBBButtonInfo()
} }
} }
break; break;
case CInfoViewerBB::BUTTON_SUBS: case CInfoViewerBB::BUTTON_YELLOW:
icon = NEUTRINO_ICON_BUTTON_YELLOW; icon = NEUTRINO_ICON_BUTTON_YELLOW;
frameBuffer->getIconSize(icon.c_str(), &w, &h); frameBuffer->getIconSize(icon.c_str(), &w, &h);
text = CUserMenu::getUserMenuButtonName(2, active); text = CUserMenu::getUserMenuButtonName(2, active);
@@ -262,7 +262,7 @@ void CInfoViewerBB::getBBButtonInfo()
if (text.empty()) if (text.empty())
text = g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME); text = g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME);
break; break;
case CInfoViewerBB::BUTTON_FEAT: case CInfoViewerBB::BUTTON_BLUE:
icon = NEUTRINO_ICON_BUTTON_BLUE; icon = NEUTRINO_ICON_BUTTON_BLUE;
frameBuffer->getIconSize(icon.c_str(), &w, &h); frameBuffer->getIconSize(icon.c_str(), &w, &h);
text = CUserMenu::getUserMenuButtonName(3, active); text = CUserMenu::getUserMenuButtonName(3, active);
@@ -288,7 +288,7 @@ void CInfoViewerBB::getBBButtonInfo()
bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; bbButtonMaxX = g_InfoViewer->ChanInfoX + 10;
int br = 0, count = 0; int br = 0, count = 0;
for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) {
if ((i == CInfoViewerBB::BUTTON_SUBS) && (g_RemoteControl->subChannels.empty())) { // no subchannels if ((i == CInfoViewerBB::BUTTON_YELLOW) && (g_RemoteControl->subChannels.empty())) { // no subchannels
bbButtonInfo[i].paint = false; bbButtonInfo[i].paint = false;
// bbButtonInfo[i].x = -1; // bbButtonInfo[i].x = -1;
// continue; // continue;
@@ -315,22 +315,22 @@ void CInfoViewerBB::getBBButtonInfo()
} }
bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; bbButtonMaxX = g_InfoViewer->ChanInfoX + 10;
bbButtonInfo[CInfoViewerBB::BUTTON_EPG].x = bbButtonMaxX; bbButtonInfo[CInfoViewerBB::BUTTON_RED].x = bbButtonMaxX;
bbButtonInfo[CInfoViewerBB::BUTTON_FEAT].x = minX - bbButtonInfo[CInfoViewerBB::BUTTON_FEAT].w; bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].x = minX - bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].w;
int x1 = bbButtonInfo[CInfoViewerBB::BUTTON_EPG].x + bbButtonInfo[CInfoViewerBB::BUTTON_EPG].w; int x1 = bbButtonInfo[CInfoViewerBB::BUTTON_RED].x + bbButtonInfo[CInfoViewerBB::BUTTON_RED].w;
int rest = bbButtonInfo[CInfoViewerBB::BUTTON_FEAT].x - x1; int rest = bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].x - x1;
if (Btns < 4) { if (Btns < 4) {
rest -= bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].w; rest -= bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w;
bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].x = x1 + rest / 2; bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x = x1 + rest / 2;
} }
else { else {
rest -= bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].w + bbButtonInfo[CInfoViewerBB::BUTTON_SUBS].w; rest -= bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w + bbButtonInfo[CInfoViewerBB::BUTTON_YELLOW].w;
rest = rest / 3; rest = rest / 3;
bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].x = x1 + rest; bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x = x1 + rest;
bbButtonInfo[CInfoViewerBB::BUTTON_SUBS].x = bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].x + bbButtonInfo[CInfoViewerBB::BUTTON_YELLOW].x = bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x +
bbButtonInfo[CInfoViewerBB::BUTTON_AUDIO].w + rest; bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w + rest;
} }
#endif #endif
bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; bbButtonMaxX = g_InfoViewer->ChanInfoX + 10;
@@ -347,10 +347,10 @@ void CInfoViewerBB::getBBButtonInfo()
} }
} else { } else {
printf("[infoviewer_bb:%s#%d: count <= 0???\n", __func__, __LINE__); printf("[infoviewer_bb:%s#%d: count <= 0???\n", __func__, __LINE__);
bbButtonInfo[BUTTON_EPG].x = bbButtonMaxX; bbButtonInfo[BUTTON_RED].x = bbButtonMaxX;
bbButtonInfo[BUTTON_AUDIO].x = bbButtonMaxX + step; bbButtonInfo[BUTTON_GREEN].x = bbButtonMaxX + step;
bbButtonInfo[BUTTON_SUBS].x = bbButtonMaxX + 2*step; bbButtonInfo[BUTTON_YELLOW].x = bbButtonMaxX + 2*step;
bbButtonInfo[BUTTON_FEAT].x = bbButtonMaxX + 3*step; bbButtonInfo[BUTTON_BLUE].x = bbButtonMaxX + 3*step;
} }
} }
@@ -402,7 +402,7 @@ void CInfoViewerBB::showBBButtons(const int modus)
} }
} }
if (modus == CInfoViewerBB::BUTTON_AUDIO) if (modus == CInfoViewerBB::BUTTON_GREEN)
showIcon_DD(); showIcon_DD();
for (i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { for (i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) {

View File

@@ -50,10 +50,10 @@ class CInfoViewerBB
enum enum
{ {
// The order of icons from left to right. Here nothing changes! // The order of icons from left to right. Here nothing changes!
BUTTON_EPG = 0, BUTTON_RED = 0,
BUTTON_AUDIO = 1, BUTTON_GREEN = 1,
BUTTON_SUBS = 2, BUTTON_YELLOW = 2,
BUTTON_FEAT = 3, BUTTON_BLUE = 3,
BUTTON_MAX = 4 BUTTON_MAX = 4
}; };