- neutrino: introduce user-assignable favorites key

Conflicts:
	src/gui/audioplayer.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2019-12-11 22:19:09 +01:00
committed by Thilo Graf
parent 1b72223cab
commit 87ec06daff
10 changed files with 35 additions and 11 deletions

View File

@@ -454,8 +454,8 @@ int CAudioPlayerGui::show()
if (m_state != CAudioPlayerGui::STOP)
stop();
}
//add RC_favorites for internetradio
else if ((msg == CRCInput::RC_favorites) && (m_inetmode))
//add key_favorites for internetradio
else if ((msg == (neutrino_msg_t) g_settings.key_favorites) && (m_inetmode))
{
if (m_key_level == 0)
{

View File

@@ -472,8 +472,8 @@ int CBouquetList::show(bool bShowChannelList)
loop = false;
}
else if ((msg == CRCInput::RC_timeout ) ||
(msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ||
((msg == CRCInput::RC_favorites) && (CNeutrinoApp::getInstance()->GetChannelMode() == LIST_MODE_FAV)))
(msg == (neutrino_msg_t) g_settings.key_channelList_cancel) ||
((msg == (neutrino_msg_t) g_settings.key_favorites) && (CNeutrinoApp::getInstance()->GetChannelMode() == LIST_MODE_FAV)))
{
selected = oldselected;
if(fader.StartFadeOut()) {
@@ -482,7 +482,7 @@ int CBouquetList::show(bool bShowChannelList)
} else
loop=false;
}
else if(msg == CRCInput::RC_red || msg == CRCInput::RC_favorites) {
else if(msg == CRCInput::RC_red || msg == (neutrino_msg_t) g_settings.key_favorites) {
if (!favonly && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_FAV) {
CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_FAV);
hide();

View File

@@ -165,6 +165,7 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] =
{LOCALE_KEYBINDINGMENU_TVRADIOMODE, &g_settings.key_tvradio_mode, LOCALE_MENU_HINT_KEY_TVRADIOMODE },
{LOCALE_KEYBINDINGMENU_POWEROFF, &g_settings.key_power_off, LOCALE_MENU_HINT_KEY_POWEROFF },
{LOCALE_KEYBINDINGMENU_STANDBYOFF_ADD, &g_settings.key_standby_off_add, LOCALE_MENU_HINT_KEY_STANDBYOFF_ADD },
{LOCALE_KEYBINDINGMENU_FAVORITES, &g_settings.key_favorites, LOCALE_MENU_HINT_KEY_FAVORITES },
{LOCALE_KEYBINDINGMENU_PAGEUP, &g_settings.key_pageup, LOCALE_MENU_HINT_KEY_PAGEUP },
{LOCALE_KEYBINDINGMENU_PAGEDOWN, &g_settings.key_pagedown, LOCALE_MENU_HINT_KEY_PAGEDOWN },
{LOCALE_KEYBINDINGMENU_VOLUMEUP, &g_settings.key_volumeup, LOCALE_MENU_HINT_KEY_VOLUMEUP },
@@ -428,6 +429,10 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
bindSettings->addItem(new CMenuSeparator());
// favorites
mf = new CMenuForwarder(key_settings[NKEY_FAVORITES].keydescription, true, keychooser[NKEY_FAVORITES]->getKeyName(), keychooser[NKEY_FAVORITES]);
mf->setHint("", key_settings[NKEY_FAVORITES].hint);
bindSettings->addItem(mf);
// timeshift
mf = new CMenuForwarder(key_settings[NKEY_TIMESHIFT].keydescription, true, keychooser[NKEY_TIMESHIFT]->getKeyName(), keychooser[NKEY_TIMESHIFT]);
mf->setHint("", key_settings[NKEY_TIMESHIFT].hint);
@@ -436,8 +441,8 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
mf = new CMenuForwarder(key_settings[NKEY_UNLOCK].keydescription, true, keychooser[NKEY_UNLOCK]->getKeyName(), keychooser[NKEY_UNLOCK]);
mf->setHint("", key_settings[NKEY_UNLOCK].hint);
bindSettings->addItem(mf);
// screenshot
#ifdef SCREENSHOT
// screenshot
mf = new CMenuForwarder(key_settings[NKEY_SCREENSHOT].keydescription, true, keychooser[NKEY_SCREENSHOT]->getKeyName(), keychooser[NKEY_SCREENSHOT]);
mf->setHint("", key_settings[NKEY_SCREENSHOT].hint);
bindSettings->addItem(mf);

View File

@@ -47,6 +47,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver
NKEY_TV_RADIO_MODE,
NKEY_POWER_OFF,
NKEY_STANDBY_OFF_ADD,
NKEY_FAVORITES,
NKEY_PAGE_UP,
NKEY_PAGE_DOWN,
NKEY_VOLUME_UP,