- channllist: fix new_zap_mode handling

This commit is contained in:
Jacek Jendrzej
2013-06-01 08:30:37 +02:00
committed by svenhoefer
parent 917e95aea3
commit daf539b141

View File

@@ -566,6 +566,11 @@ bool CChannelList::updateSelection(int newpos)
/* return: >= 0 to zap, -1 on cancel, -3 on list mode change, -4 list edited, -2 zap but no restore old list/chan ?? */ /* return: >= 0 to zap, -1 on cancel, -3 on list mode change, -4 list edited, -2 zap but no restore old list/chan ?? */
int CChannelList::show() int CChannelList::show()
{ {
int res = -1;
if (chanlist.empty()) {
return res;
}
/* temporary debugging stuff */ /* temporary debugging stuff */
struct timeval t1, t2; struct timeval t1, t2;
gettimeofday(&t1, NULL); gettimeofday(&t1, NULL);
@@ -573,10 +578,6 @@ int CChannelList::show()
neutrino_msg_t msg; neutrino_msg_t msg;
neutrino_msg_data_t data; neutrino_msg_data_t data;
bool actzap = 0; bool actzap = 0;
int res = -1;
if (chanlist.empty()) {
return res;
}
new_zap_mode = g_settings.channellist_new_zap_mode; new_zap_mode = g_settings.channellist_new_zap_mode;
@@ -920,13 +921,14 @@ int CChannelList::show()
} }
} }
} }
if (g_settings.channellist_new_zap_mode != new_zap_mode)
g_settings.channellist_new_zap_mode = new_zap_mode;
new_zap_mode = 0;
if (bouquet_changed) if (bouquet_changed)
res = -5; /* in neutrino.cpp: -5 == "don't change bouquet after adding a channel to fav" */ res = -5; /* in neutrino.cpp: -5 == "don't change bouquet after adding a channel to fav" */
if(!dont_hide){ if(!dont_hide){
if (new_zap_mode && (g_settings.channellist_new_zap_mode != new_zap_mode))
g_settings.channellist_new_zap_mode = new_zap_mode;
new_zap_mode = 0;
hide(); hide();
fader.Stop(); fader.Stop();
} }
@@ -1253,11 +1255,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force)
/* Called only from "all" channel list */ /* Called only from "all" channel list */
int CChannelList::numericZap(int key) int CChannelList::numericZap(int key)
{ {
neutrino_msg_t msg;
neutrino_msg_data_t data;
int res = -1; int res = -1;
if(showEmptyError()) if(showEmptyError())
return res; return res;
@@ -1333,6 +1331,8 @@ int CChannelList::numericZap(int key)
int lastchan= -1; int lastchan= -1;
bool doZap = false; bool doZap = false;
bool showEPG = false; bool showEPG = false;
neutrino_msg_t msg;
neutrino_msg_data_t data;
while(1) { while(1) {
if (lastchan != chn) { if (lastchan != chn) {
@@ -1473,12 +1473,12 @@ CZapitChannel* CChannelList::getPrevNextChannel(int key, unsigned int &sl)
void CChannelList::virtual_zap_mode(bool up) void CChannelList::virtual_zap_mode(bool up)
{ {
neutrino_msg_t msg;
neutrino_msg_data_t data;
if(showEmptyError()) if(showEmptyError())
return; return;
neutrino_msg_t msg;
neutrino_msg_data_t data;
unsigned int sl = selected; unsigned int sl = selected;
int old_bactive = bouquetList->getActiveBouquetNumber(); int old_bactive = bouquetList->getActiveBouquetNumber();
int bactive = old_bactive; int bactive = old_bactive;