mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
channellist: simplify key_zaphistory/key_current_transponder handling
* Remove strange list of "zapable" channels while recording. Channellist
(RC_ok) has same feature ... not avalable channels are marked inactive.
* Add hint, when no zapping histoty is available to confirm user's keypress
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9034fd3ea6
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-03-21 (Wed, 21 Mar 2018)
Origin message was:
------------------
- channellist: simplify key_zaphistory/key_current_transponder handling
* Remove strange list of "zapable" channels while recording. Channellist
(RC_ok) has same feature ... not avalable channels are marked inactive.
* Add hint, when no zapping histoty is available to confirm user's keypress
------------------
This commit was generated by Migit
This commit is contained in:
@@ -292,6 +292,7 @@ channellist.foot_sort_sat Sortiert[sat]
|
||||
channellist.head Alle Kanäle
|
||||
channellist.history Verlauf
|
||||
channellist.history_clear Verlauf löschen
|
||||
channellist.history_empty Kein Verlauf verfügbar
|
||||
channellist.keep_numbers Dauerhafte Kanalnummern
|
||||
channellist.make_hdlist Erzeuge Bouquets mit HD- und UHD-Kanälen
|
||||
channellist.make_newlist Erzeuge Bouquet mit neuen Kanälen
|
||||
@@ -1008,7 +1009,7 @@ keybindingmenu.video Video
|
||||
keybindingmenu.volume Lautstärke
|
||||
keybindingmenu.volumedown Leiser
|
||||
keybindingmenu.volumeup Lauter
|
||||
keybindingmenu.zaphistory Zapping-History Bouquet
|
||||
keybindingmenu.zaphistory Senderverlauf
|
||||
keychooser.head Neue Taste einstellen
|
||||
keychooser.text Neue Taste drücken.\nZum Abbrechen ein paar Sekunden warten ...
|
||||
keychoosermenu.currentkey Derzeitige Taste
|
||||
|
@@ -292,6 +292,7 @@ channellist.foot_sort_sat Sorted[sat]
|
||||
channellist.head All services
|
||||
channellist.history History
|
||||
channellist.history_clear Clear history
|
||||
channellist.history_empty No history available
|
||||
channellist.keep_numbers Persistent channel numbers
|
||||
channellist.make_hdlist Create lists of HD and UHD channels
|
||||
channellist.make_newlist Create list of new channels
|
||||
@@ -1008,7 +1009,7 @@ keybindingmenu.video Video
|
||||
keybindingmenu.volume Volume
|
||||
keybindingmenu.volumedown Decrease
|
||||
keybindingmenu.volumeup Increase
|
||||
keybindingmenu.zaphistory Zapping History Bouquet
|
||||
keybindingmenu.zaphistory Channel history
|
||||
keychooser.head Setup new key
|
||||
keychooser.text Press new key.\nWait a few seconds to abort ...
|
||||
keychoosermenu.currentkey current key
|
||||
|
@@ -1240,40 +1240,77 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force)
|
||||
int CChannelList::numericZap(int key)
|
||||
{
|
||||
int res = -1;
|
||||
if(showEmptyError())
|
||||
if (showEmptyError())
|
||||
return res;
|
||||
|
||||
// -- quickzap "0" to last seen channel...
|
||||
if (key == g_settings.key_lastchannel) {
|
||||
/*
|
||||
TODO?
|
||||
Move handling of key_zaphistory and key_current_transponder
|
||||
into sepatate functions?
|
||||
These keys do not zap numeric. Pseudo bouquets are shown.
|
||||
*/
|
||||
|
||||
// quickzap "0" to last seen channel
|
||||
if (key == g_settings.key_lastchannel)
|
||||
{
|
||||
t_channel_id channel_id = lastChList.getlast(1);
|
||||
if(channel_id && SameTP(channel_id)) {
|
||||
if (channel_id && SameTP(channel_id))
|
||||
{
|
||||
lastChList.clear_storedelay(); // ignore store delay
|
||||
int new_mode = lastChList.get_mode(channel_id);
|
||||
if(new_mode >= 0)
|
||||
if (new_mode >= 0)
|
||||
CNeutrinoApp::getInstance()->SetChannelMode(new_mode);
|
||||
zapTo_ChannelID(channel_id);
|
||||
res = 0;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
if ((key == g_settings.key_zaphistory) || (key == g_settings.key_current_transponder)) {
|
||||
if((!autoshift && CNeutrinoApp::getInstance()->recordingstatus) || (key == g_settings.key_current_transponder)) {
|
||||
|
||||
// zap history bouquet
|
||||
if (key == g_settings.key_zaphistory)
|
||||
{
|
||||
if (this->lastChList.size() > 1)
|
||||
{
|
||||
CChannelList * channelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HISTORY), true, true);
|
||||
|
||||
for (unsigned int i = 1; i < this->lastChList.size(); ++i)
|
||||
{
|
||||
t_channel_id channel_id = this->lastChList.getlast(i);
|
||||
if (channel_id)
|
||||
{
|
||||
CZapitChannel* channel = getChannel(channel_id);
|
||||
if (channel)
|
||||
channelList->addChannel(channel);
|
||||
}
|
||||
}
|
||||
if (!channelList->isEmpty())
|
||||
{
|
||||
this->frameBuffer->paintBackground();
|
||||
res = channelList->exec();
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
}
|
||||
delete channelList;
|
||||
}
|
||||
else
|
||||
ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_CHANNELLIST_HISTORY_EMPTY);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// current transponder bouquet
|
||||
if (key == g_settings.key_current_transponder)
|
||||
{
|
||||
CChannelList * orgList = CNeutrinoApp::getInstance()->channelList;
|
||||
CChannelList * channelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_CURRENT_TP), false, true);
|
||||
|
||||
if(key == g_settings.key_current_transponder) {
|
||||
t_channel_id recid = (*chanlist)[selected]->getChannelID() >> 16;
|
||||
for ( unsigned int i = 0 ; i < (*orgList->chanlist).size(); i++) {
|
||||
if(((*orgList->chanlist)[i]->getChannelID() >> 16) == recid)
|
||||
|
||||
for (unsigned int i = 0; i < (*orgList->chanlist).size(); i++)
|
||||
{
|
||||
if (((*orgList->chanlist)[i]->getChannelID() >> 16) == recid)
|
||||
channelList->addChannel((*orgList->chanlist)[i]);
|
||||
}
|
||||
} else {
|
||||
for ( unsigned int i = 0 ; i < (*orgList->chanlist).size(); i++) {
|
||||
if(SameTP((*orgList->chanlist)[i]))
|
||||
channelList->addChannel((*orgList->chanlist)[i]);
|
||||
}
|
||||
}
|
||||
if ( !channelList->isEmpty()) {
|
||||
if (!channelList->isEmpty())
|
||||
{
|
||||
channelList->adjustToChannelID(orgList->getActiveChannel_ChannelID());
|
||||
this->frameBuffer->paintBackground();
|
||||
res = channelList->exec();
|
||||
@@ -1282,26 +1319,8 @@ int CChannelList::numericZap(int key)
|
||||
delete channelList;
|
||||
return res;
|
||||
}
|
||||
// -- zap history bouquet, similar to "0" quickzap, but shows a menue of last channels
|
||||
if (this->lastChList.size() > 1) {
|
||||
CChannelList * channelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HISTORY), true, true);
|
||||
|
||||
for(unsigned int i = 1; i < this->lastChList.size() ; ++i) {
|
||||
t_channel_id channel_id = this->lastChList.getlast(i);
|
||||
if(channel_id) {
|
||||
CZapitChannel* channel = getChannel(channel_id);
|
||||
if(channel) channelList->addChannel(channel);
|
||||
}
|
||||
}
|
||||
if ( !channelList->isEmpty() ) {
|
||||
this->frameBuffer->paintBackground();
|
||||
res = channelList->exec();
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
}
|
||||
delete channelList;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
// real numeric zap
|
||||
size_t maxchansize = MaxChanNr().size();
|
||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getMaxDigitWidth();
|
||||
int fh = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight();
|
||||
|
@@ -319,6 +319,7 @@ typedef enum
|
||||
LOCALE_CHANNELLIST_HEAD,
|
||||
LOCALE_CHANNELLIST_HISTORY,
|
||||
LOCALE_CHANNELLIST_HISTORY_CLEAR,
|
||||
LOCALE_CHANNELLIST_HISTORY_EMPTY,
|
||||
LOCALE_CHANNELLIST_KEEP_NUMBERS,
|
||||
LOCALE_CHANNELLIST_MAKE_HDLIST,
|
||||
LOCALE_CHANNELLIST_MAKE_NEWLIST,
|
||||
|
@@ -319,6 +319,7 @@ const char * locale_real_names[] =
|
||||
"channellist.head",
|
||||
"channellist.history",
|
||||
"channellist.history_clear",
|
||||
"channellist.history_empty",
|
||||
"channellist.keep_numbers",
|
||||
"channellist.make_hdlist",
|
||||
"channellist.make_newlist",
|
||||
|
Reference in New Issue
Block a user