Experimental: save/restore channel list mode for history zaps

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1870 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2011-11-22 09:49:51 +00:00
parent 4f4f46a912
commit a9cb9c4733
4 changed files with 41 additions and 0 deletions

View File

@@ -442,6 +442,11 @@ int CChannelList::exec()
int nNewChannel = show();
if ( nNewChannel > -1) {
#if 1
if(this->historyMode && chanlist[nNewChannel]) {
int new_mode = CNeutrinoApp::getInstance ()->channelList->getLastChannels().get_mode(chanlist[nNewChannel]->channel_id);
if(new_mode >= 0)
CNeutrinoApp::getInstance()->SetChannelMode(new_mode);
}
CNeutrinoApp::getInstance ()->channelList->zapTo(getKey(nNewChannel)-1);
#else
CNeutrinoApp::getInstance ()->channelList->NewZap(chanlist[nNewChannel]->channel_id);
@@ -1181,6 +1186,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
}
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR, 0 );
CNeutrinoApp::getInstance ()->channelList->getLastChannels().set_mode(chan->channel_id);
}
}
@@ -1224,6 +1230,9 @@ int CChannelList::numericZap(int key)
t_channel_id channel_id = lastChList.getlast(1);
if(channel_id && SameTP(channel_id)) {
lastChList.clear_storedelay (); // ignore store delay
int new_mode = lastChList.get_mode(channel_id);
if(new_mode >= 0)
CNeutrinoApp::getInstance()->SetChannelMode(new_mode);
zapTo_ChannelID(channel_id);
res = 0;
}