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


Origin commit data
------------------
Branch: ni/coolstream
Commit: a9cb9c4733
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-11-22 (Tue, 22 Nov 2011)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2011-11-22 09:49:51 +00:00
parent f11a59b82c
commit 10803d3b6b
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;
}