ChannelList::quickZap -record mode- should zap if possible, else display transponderlist

This commit is contained in:
Jacek Jendrzej
2013-05-25 13:05:55 +02:00
parent 7eb27cd212
commit a01551d360
3 changed files with 17 additions and 6 deletions

View File

@@ -1535,17 +1535,21 @@ void CChannelList::virtual_zap_mode(bool up)
} }
} }
void CChannelList::quickZap(int key, bool /* cycle */) bool CChannelList::quickZap(int key, bool /* cycle */)
{ {
if(chanlist.empty()) if(chanlist.empty())
return; return true;
unsigned int sl = selected; unsigned int sl = selected;
/* here selected value doesnt matter, zap will do adjust */ /* here selected value doesnt matter, zap will do adjust */
CZapitChannel* channel = getPrevNextChannel(key, sl); CZapitChannel* channel = getPrevNextChannel(key, sl);
if(channel) bool ret = false;
if(channel && SameTP(channel)) {
CNeutrinoApp::getInstance()->channelList->zapToChannel(channel); CNeutrinoApp::getInstance()->channelList->zapToChannel(channel);
ret = true;
}
g_RCInput->clearRCMsg(); //FIXME test for n.103 g_RCInput->clearRCMsg(); //FIXME test for n.103
return ret;
} }
void CChannelList::paintDetails(int index) void CChannelList::paintDetails(int index)

View File

@@ -162,7 +162,7 @@ public:
int numericZap(int key); int numericZap(int key);
int show(); int show();
int exec(); int exec();
void quickZap(int key, bool cycle = false); bool quickZap(int key, bool cycle = false);
//int hasChannel(int nChannelNr); //int hasChannel(int nChannelNr);
int hasChannelID(t_channel_id channel_id); int hasChannelID(t_channel_id channel_id);
void setSelected( int nChannelNr); // for adjusting bouquet's channel list after numzap or quickzap void setSelected( int nChannelNr); // for adjusting bouquet's channel list after numzap or quickzap

View File

@@ -1956,16 +1956,23 @@ void CNeutrinoApp::quickZap(int msg)
StopSubtitles(); StopSubtitles();
printf("CNeutrinoApp::quickZap haveFreeFrontend %d\n", CFEManager::getInstance()->haveFreeFrontend()); printf("CNeutrinoApp::quickZap haveFreeFrontend %d\n", CFEManager::getInstance()->haveFreeFrontend());
#if 0
if(!CFEManager::getInstance()->haveFreeFrontend()) if(!CFEManager::getInstance()->haveFreeFrontend())
{ {
res = channelList->numericZap(g_settings.key_zaphistory); res = channelList->numericZap(g_settings.key_zaphistory);
StartSubtitles(res < 0); StartSubtitles(res < 0);
return; return;
} }
#endif
bool ret;
if(!bouquetList->Bouquets.empty()) if(!bouquetList->Bouquets.empty())
bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->quickZap(msg, g_settings.zap_cycle); ret = bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->quickZap(msg, g_settings.zap_cycle);
else else
channelList->quickZap(msg); ret = channelList->quickZap(msg);
if (!ret) {
res = channelList->numericZap(g_settings.key_zaphistory);
StartSubtitles(res < 0);
}
} }
void CNeutrinoApp::numericZap(int msg) void CNeutrinoApp::numericZap(int msg)