mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
infoviewer_bb: use key-assignment from movieplayer
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4c7cea95e9
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-12-14 (Mon, 14 Dec 2015)
Origin message was:
------------------
- infoviewer_bb: use key-assignment from movieplayer
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
#include <gui/infoviewer.h>
|
#include <gui/infoviewer.h>
|
||||||
#include <gui/bouquetlist.h>
|
#include <gui/bouquetlist.h>
|
||||||
|
#include "gui/keybind_setup.h"
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/widget/hintbox.h>
|
#include <gui/widget/hintbox.h>
|
||||||
#include <gui/customcolor.h>
|
#include <gui/customcolor.h>
|
||||||
@@ -222,16 +223,16 @@ void CInfoViewerBB::getBBButtonInfo()
|
|||||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||||
mode = CNeutrinoApp::getInstance()->getMode();
|
mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
if (mode == NeutrinoMessages::mode_ts) {
|
if (mode == NeutrinoMessages::mode_ts) {
|
||||||
text = g_Locale->getText(LOCALE_EPGMENU_STREAMINFO);
|
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active);
|
||||||
active = true;
|
|
||||||
} else {
|
|
||||||
text = CUserMenu::getUserMenuButtonName(0, active);
|
|
||||||
if (!text.empty())
|
if (!text.empty())
|
||||||
break;
|
break;
|
||||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title;
|
|
||||||
if (text.empty())
|
|
||||||
text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST);
|
|
||||||
}
|
}
|
||||||
|
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;
|
break;
|
||||||
case CInfoViewerBB::BUTTON_GREEN:
|
case CInfoViewerBB::BUTTON_GREEN:
|
||||||
icon = NEUTRINO_ICON_BUTTON_GREEN;
|
icon = NEUTRINO_ICON_BUTTON_GREEN;
|
||||||
@@ -240,6 +241,12 @@ void CInfoViewerBB::getBBButtonInfo()
|
|||||||
mode = CNeutrinoApp::getInstance()->getMode();
|
mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
if (!text.empty() && mode < NeutrinoMessages::mode_audio)
|
if (!text.empty() && mode < NeutrinoMessages::mode_audio)
|
||||||
break;
|
break;
|
||||||
|
mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
|
if (mode == NeutrinoMessages::mode_ts) {
|
||||||
|
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active);
|
||||||
|
if (!text.empty())
|
||||||
|
break;
|
||||||
|
}
|
||||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title;
|
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_GREEN]->title;
|
||||||
if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD))
|
if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD))
|
||||||
text = "";
|
text = "";
|
||||||
@@ -255,6 +262,12 @@ void CInfoViewerBB::getBBButtonInfo()
|
|||||||
case CInfoViewerBB::BUTTON_YELLOW:
|
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);
|
||||||
|
mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
|
if (mode == NeutrinoMessages::mode_ts) {
|
||||||
|
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active);
|
||||||
|
if (!text.empty())
|
||||||
|
break;
|
||||||
|
}
|
||||||
text = CUserMenu::getUserMenuButtonName(2, active);
|
text = CUserMenu::getUserMenuButtonName(2, active);
|
||||||
if (!text.empty())
|
if (!text.empty())
|
||||||
break;
|
break;
|
||||||
@@ -265,6 +278,12 @@ void CInfoViewerBB::getBBButtonInfo()
|
|||||||
case CInfoViewerBB::BUTTON_BLUE:
|
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);
|
||||||
|
mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
|
if (mode == NeutrinoMessages::mode_ts) {
|
||||||
|
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active);
|
||||||
|
if (!text.empty())
|
||||||
|
break;
|
||||||
|
}
|
||||||
text = CUserMenu::getUserMenuButtonName(3, active);
|
text = CUserMenu::getUserMenuButtonName(3, active);
|
||||||
if (!text.empty())
|
if (!text.empty())
|
||||||
break;
|
break;
|
||||||
@@ -288,12 +307,14 @@ 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 0
|
||||||
if ((i == CInfoViewerBB::BUTTON_YELLOW) && (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;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
bbButtonInfo[i].paint = true;
|
bbButtonInfo[i].paint = true;
|
||||||
|
@@ -568,3 +568,17 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* d
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bool &active)
|
||||||
|
{
|
||||||
|
active = false;
|
||||||
|
for (unsigned int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++)
|
||||||
|
{
|
||||||
|
if ((uint32_t)*key_settings[i].keyvalue_p == (unsigned int)key)
|
||||||
|
{
|
||||||
|
active = true;
|
||||||
|
return g_Locale->getText(key_settings[i].keydescription);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
@@ -112,6 +112,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver
|
|||||||
~CKeybindSetup();
|
~CKeybindSetup();
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
bool changeNotify(const neutrino_locale_t OptionName, void * data);
|
bool changeNotify(const neutrino_locale_t OptionName, void * data);
|
||||||
|
static const char *getMoviePlayerButtonName(const neutrino_msg_t key, bool &active);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user