mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
neutrino: sync keybind and usermenu code with neutrino-mp, code (C) martii
Origin commit data
------------------
Branch: ni/coolstream
Commit: 420af7a4dc
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-09-05 (Fri, 05 Sep 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -223,25 +223,32 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
int mode;
|
||||
for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) {
|
||||
int w = 0, h = 0;
|
||||
bool active;
|
||||
std::string text, icon;
|
||||
switch (i) {
|
||||
case CInfoViewerBB::BUTTON_EPG:
|
||||
icon = NEUTRINO_ICON_BUTTON_RED;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
text = g_settings.usermenu_text[SNeutrinoSettings::BUTTON_RED];
|
||||
text = CUserMenu::getUserMenuButtonName(0, active);
|
||||
if (!text.empty())
|
||||
break;
|
||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title;
|
||||
if (text.empty())
|
||||
text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST);
|
||||
break;
|
||||
case CInfoViewerBB::BUTTON_AUDIO:
|
||||
icon = NEUTRINO_ICON_BUTTON_GREEN;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
text = g_settings.usermenu_text[SNeutrinoSettings::BUTTON_GREEN];
|
||||
text = CUserMenu::getUserMenuButtonName(1, active);
|
||||
if (!text.empty())
|
||||
break;
|
||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title;
|
||||
if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD))
|
||||
text = "";
|
||||
mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if ((mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv) && !CMoviePlayerGui::getInstance().timeshift) {
|
||||
text = CMoviePlayerGui::getInstance().CurrentAudioName();
|
||||
}else if (!g_RemoteControl->current_PIDs.APIDs.empty()) {
|
||||
} else if (!g_RemoteControl->current_PIDs.APIDs.empty()) {
|
||||
int selected = g_RemoteControl->current_PIDs.PIDs.selected_apid;
|
||||
if (text.empty()){
|
||||
text = g_RemoteControl->current_PIDs.APIDs[selected].desc;
|
||||
@@ -251,14 +258,20 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
case CInfoViewerBB::BUTTON_SUBS:
|
||||
icon = NEUTRINO_ICON_BUTTON_YELLOW;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
text = g_settings.usermenu_text[SNeutrinoSettings::BUTTON_YELLOW];
|
||||
text = CUserMenu::getUserMenuButtonName(2, active);
|
||||
if (!text.empty())
|
||||
break;
|
||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->title;
|
||||
if (text.empty())
|
||||
text = g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME);
|
||||
break;
|
||||
case CInfoViewerBB::BUTTON_FEAT:
|
||||
icon = NEUTRINO_ICON_BUTTON_BLUE;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
text = g_settings.usermenu_text[SNeutrinoSettings::BUTTON_BLUE];
|
||||
text = CUserMenu::getUserMenuButtonName(3, active);
|
||||
if (!text.empty())
|
||||
break;
|
||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_BLUE]->title;
|
||||
if (text.empty())
|
||||
text = g_Locale->getText(LOCALE_INFOVIEWER_STREAMINFO);
|
||||
break;
|
||||
@@ -270,6 +283,7 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
bbButtonInfo[i].h = h;
|
||||
bbButtonInfo[i].text = text;
|
||||
bbButtonInfo[i].icon = icon;
|
||||
bbButtonInfo[i].active = active;
|
||||
}
|
||||
// Calculate position/size of buttons
|
||||
minX = std::min(bbIconMinX, g_InfoViewer->ChanInfoX + (((g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX) * 75) / 100));
|
||||
@@ -382,10 +396,12 @@ void CInfoViewerBB::showBBButtons(const int modus)
|
||||
__LINE__, i);
|
||||
continue;
|
||||
}
|
||||
frameBuffer->paintIcon(bbButtonInfo[i].icon, bbButtonInfo[i].x, BBarY, InfoHeightY_Info);
|
||||
if (bbButtonInfo[i].active) {
|
||||
frameBuffer->paintIcon(bbButtonInfo[i].icon, bbButtonInfo[i].x, BBarY, InfoHeightY_Info);
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(bbButtonInfo[i].x + bbButtonInfo[i].cx, BBarFontY,
|
||||
bbButtonInfo[i].w - bbButtonInfo[i].cx, bbButtonInfo[i].text, COL_INFOBAR_TEXT);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(bbButtonInfo[i].x + bbButtonInfo[i].cx, BBarFontY,
|
||||
bbButtonInfo[i].w - bbButtonInfo[i].cx, bbButtonInfo[i].text, COL_INFOBAR_TEXT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,7 +872,7 @@ void CInfoViewerBB::setBBOffset()
|
||||
|
||||
void* CInfoViewerBB::scrambledThread(void *arg)
|
||||
{
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
||||
CInfoViewerBB *infoViewerBB = static_cast<CInfoViewerBB*>(arg);
|
||||
while(1) {
|
||||
if (infoViewerBB->is_visible)
|
||||
|
Reference in New Issue
Block a user