From 683ebbab9ad7a486cdbd91ab2a7a1de82ae85521 Mon Sep 17 00:00:00 2001 From: focus Date: Mon, 1 Feb 2010 14:01:22 +0000 Subject: [PATCH] Disable zap to different TP from channel list if recording, quick zap still TODO; Dont zap on left/right if virtual zap mode on git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@242 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/channellist.cpp | 26 +++++++++++++++++++------- src/gui/channellist.h | 1 + src/neutrino.cpp | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index e3f2f70c3..eacd13a6a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -529,13 +529,13 @@ int CChannelList::show() selected=0; liststart = (selected/listmaxshow)*listmaxshow; paint(); - if(new_mode_active) { actzap = true; zapTo(selected); } + if(new_mode_active && SameTP()) { actzap = true; zapTo(selected); } } else if (msg == (neutrino_msg_t) g_settings.key_list_end) { selected=chanlist.size()-1; liststart = (selected/listmaxshow)*listmaxshow; paint(); - if(new_mode_active) { actzap = true; zapTo(selected); } + if(new_mode_active && SameTP()) { actzap = true; zapTo(selected); } } else if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup) { @@ -555,7 +555,7 @@ int CChannelList::show() else paintItem(selected - liststart); - if(new_mode_active) { actzap = true; zapTo(selected); } + if(new_mode_active && SameTP()) { actzap = true; zapTo(selected); } //paintHead(); } else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown) @@ -581,7 +581,7 @@ int CChannelList::show() else paintItem(selected - liststart); - if(new_mode_active) { actzap = true; zapTo(selected); } + if(new_mode_active && SameTP()) { actzap = true; zapTo(selected); } //paintHead(); } @@ -630,8 +630,10 @@ int CChannelList::show() } } else if ( msg == CRCInput::RC_ok ) { - zapOnExit = true; - loop=false; + if(SameTP()) { + zapOnExit = true; + loop=false; + } } else if ( msg == CRCInput::RC_spkr ) { new_mode_active = (new_mode_active ? 0 : 1); @@ -1521,7 +1523,7 @@ void CChannelList::paintItem(int pos) max_desc_len -= 28; /* do we need space for the lock icon? */ if (max_desc_len < 0) max_desc_len = 0; - if (ch_desc_len > max_desc_len) + if ((int) ch_desc_len > max_desc_len) ch_desc_len = max_desc_len; if(g_settings.channellist_extended){ @@ -1678,3 +1680,13 @@ int CChannelList::getSelectedChannelIndex() const { return this->selected; } + +bool CChannelList::SameTP() +{ + bool iscurrent = true; + + if(!autoshift && CNeutrinoApp::getInstance()->recordingstatus ) + iscurrent = (chanlist[selected]->channel_id >> 16) == (rec_channel_id >> 16); + + return iscurrent; +} diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 2b56151c3..cce3a51ab 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -130,6 +130,7 @@ class CChannelList void SortAlpha(void); void SortSat(void); void ClearList(void); + bool SameTP(); //friend class CZapitChannel; }; #endif diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 3fab73c5a..cf0d90fa3 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2661,6 +2661,12 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) StopSubtitles(); g_RemoteControl->subChannelUp(); g_InfoViewer->showSubchan(); + } else if(g_settings.virtual_zap_mode) { + if(channelList->getSize()) { + StopSubtitles(); + g_InfoViewer->showTitle(channelList->getActiveChannelNumber(), channelList->getActiveChannelName(), channelList->getActiveSatellitePosition(), channelList->getActiveChannel_ChannelID()); + StartSubtitles(); + } } else quickZap( msg ); } @@ -2669,9 +2675,23 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) StopSubtitles(); g_RemoteControl->subChannelDown(); g_InfoViewer->showSubchan(); + } else if(g_settings.virtual_zap_mode) { + if(channelList->getSize()) { + StopSubtitles(); + g_InfoViewer->showTitle(channelList->getActiveChannelNumber(), channelList->getActiveChannelName(), channelList->getActiveSatellitePosition(), channelList->getActiveChannel_ChannelID()); + StartSubtitles(); + } } else quickZap( msg ); } + /* in case key_subchannel_up/down redefined */ + else if( msg == CRCInput::RC_left || msg == CRCInput::RC_right) { + if(channelList->getSize()) { + StopSubtitles(); + g_InfoViewer->showTitle(channelList->getActiveChannelNumber(), channelList->getActiveChannelName(), channelList->getActiveSatellitePosition(), channelList->getActiveChannel_ChannelID()); + StartSubtitles(); + } + } else if( msg == (neutrino_msg_t) g_settings.key_zaphistory ) { // Zap-History "Bouquet" if(g_settings.mode_clock && g_settings.key_zaphistory == CRCInput::RC_home) {