From a4d3800465ca5412459f522e3eb3afe2d5f07ac1 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 27 Feb 2011 22:26:04 +0000 Subject: [PATCH] fix new_mode(spkr) zap in channellist git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1231 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e0455690271020ce0b1f39acc5f7486caefb3783 Author: Jacek Jendrzej Date: 2011-02-27 (Sun, 27 Feb 2011) Origin message was: ------------------ -fix new_mode(spkr) zap in channellist git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1231 e54a6e83-5905-42d5-8d5c-058d10e6a962 ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 22 ++++++++++++++++------ src/gui/channellist.h | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 6e7f8b625..d8462cfc7 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -98,6 +98,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl frameBuffer = CFrameBuffer::getInstance(); name = pName; selected = 0; + selected_in_new_mode = 0; liststart = 0; tuned=0xfffffff; zapProtection = NULL; @@ -557,9 +558,15 @@ int CChannelList::show() } } else if ( ( msg == CRCInput::RC_timeout ) || ( msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ) { - if(!actzap) - selected = oldselected; res = -1; + if(!actzap){ + selected = oldselected; + } + else{ + res = -4; + selected = selected_in_new_mode; + } + if ( fadeIn ) { g_RCInput->killTimer(fadeTimer); fadeTimer = 0; @@ -1054,6 +1061,13 @@ printf("**************************** CChannelList::zapTo me %p %s tuned %d new % if ( pos!=(int)tuned ) { tuned = pos; g_RemoteControl->zapTo_ChannelID(chan->channel_id, chan->name, !chan->bAlwaysLocked); // UTF-8 + // TODO check is it possible bouquetList is NULL ? + if (bouquetList != NULL) { + CNeutrinoApp::getInstance()->channelList->adjustToChannelID(chan->channel_id); + } + if(this->new_mode_active) + selected_in_new_mode = pos; + } if(!this->new_mode_active) { selected = pos; @@ -1067,10 +1081,6 @@ printf("**************************** CChannelList::zapTo me %p %s tuned %d new % g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 0); } - // TODO check is it possible bouquetList is NULL ? - if (bouquetList != NULL) { - CNeutrinoApp::getInstance()->channelList->adjustToChannelID(chan->channel_id); - } g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR, 0 ); } } diff --git a/src/gui/channellist.h b/src/gui/channellist.h index c6caf929a..b45411af0 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -55,7 +55,7 @@ class CChannelList { private: CFrameBuffer *frameBuffer; - unsigned int selected; + unsigned int selected, selected_in_new_mode; t_channel_id selected_chid; CLastChannel lastChList; unsigned int liststart;