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:
vanhofen
2018-03-21 00:45:21 +01:00
parent b7bbace805
commit 319dadfadc
5 changed files with 61 additions and 38 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1243,10 +1243,19 @@ int CChannelList::numericZap(int key)
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)
@@ -1256,24 +1265,52 @@ int CChannelList::numericZap(int key)
}
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++) {
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();

View File

@@ -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,

View File

@@ -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",