Revert "Revert '- channellist.cpp: enable to lock new_zap_mode'"

This reverts commit fb892d18ff.
This commit is contained in:
svenhoefer
2013-02-17 22:55:28 +01:00
parent ddbac1b248
commit 505c4ba80d
7 changed files with 37 additions and 13 deletions

View File

@@ -96,7 +96,7 @@ extern cVideo * videoDecoder;
#define ConnectLineBox_Width 16
CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool )
CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist)
{
frameBuffer = CFrameBuffer::getInstance();
name = pName;
@@ -108,7 +108,6 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
this->historyMode = phistoryMode;
vlist = _vlist;
selected_chid = 0;
this->new_mode_active = false;
footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar
previous_channellist_additional = -1;
eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT;
@@ -541,7 +540,7 @@ bool CChannelList::updateSelection(int newpos)
showChannelLogo();
}
if(this->new_mode_active && SameTP()) {
if((g_settings.channellist_new_zap_mode == 2 /* active */) && SameTP()) {
actzap = true;
zapTo(selected);
}
@@ -565,8 +564,6 @@ int CChannelList::show()
return res;
}
this->new_mode_active = 0;
calcSize();
displayNext = false;
@@ -779,7 +776,17 @@ int CChannelList::show()
}
else if (( msg == CRCInput::RC_spkr ) && g_settings.channellist_new_zap_mode ) {
if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) {
this->new_mode_active = (this->new_mode_active ? 0 : 1);
switch (g_settings.channellist_new_zap_mode) {
case 2: /* active */
g_settings.channellist_new_zap_mode = 1; /* allow */
break;
case 1: /* allow */
g_settings.channellist_new_zap_mode = 2; /* active */
break;
default:
break;
}
paintHead();
showChannelLogo();
}
@@ -902,7 +909,6 @@ int CChannelList::show()
res = bouquetList->exec(true);
printf("CChannelList:: bouquetList->exec res %d\n", res);
}
this->new_mode_active = 0;
if(NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode())
return -1;
@@ -1153,7 +1159,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
zapToChannel(chan);
tuned = pos;
if(this->new_mode_active)
if(g_settings.channellist_new_zap_mode == 2 /* active */)
selected_in_new_mode = pos;
else
selected = pos;
@@ -1189,7 +1195,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel)
g_RemoteControl->zapTo_ChannelID(channel->getChannelID(), channel->getName(), !channel->bAlwaysLocked);
CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID());
}
if(!this->new_mode_active) {
if(g_settings.channellist_new_zap_mode != 2 /* not active */) {
/* remove recordModeActive from infobar */
if(g_settings.auto_timeshift && !CNeutrinoApp::getInstance()->recordingstatus) {
g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 0);
@@ -1996,7 +2002,7 @@ void CChannelList::paintHead()
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + full_width - iw1 - 10, y, theight); //y+ 5 );
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + full_width - iw1 - iw2 - 14, y, theight);//y + 5); // icon for bouquet list button
if (g_settings.channellist_new_zap_mode)
frameBuffer->paintIcon(this->new_mode_active ?
frameBuffer->paintIcon((g_settings.channellist_new_zap_mode == 2 /* active */) ?
NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE,
x + full_width - iw1 - iw2 - iw3 - 18, y, theight);