From cbb4b8eff01bfd75dae3e05f1b9b22c01086d066 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 24 Nov 2011 15:28:13 +0000 Subject: [PATCH] Switch list modes also with left/right keys git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1886 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/da65f42575ea5c72db8374868595b943feeb3921 Author: [CST] Focus Date: 2011-11-24 (Thu, 24 Nov 2011) ------------------ This commit was generated by Migit --- src/gui/bouquetlist.cpp | 14 ++++++++++++++ src/gui/channellist.h | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 8231940fa..47d2c6082 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -407,6 +407,20 @@ int CBouquetList::show(bool bShowChannelList) return -3; } } + else if(msg == CRCInput::RC_left || msg == CRCInput::RC_right) { + if(bShowChannelList) { + int mode = CNeutrinoApp::getInstance()->GetChannelMode(); + mode += (msg == CRCInput::RC_left) ? -1 : 1; + if(mode < 0) + mode = LIST_MODE_LAST - 1; + else if(mode >= LIST_MODE_LAST) + mode = 0; + CNeutrinoApp::getInstance()->SetChannelMode(mode); + hide(); + return -3; + } + + } else if(Bouquets.size() == 0) continue; //FIXME msgs not forwarded to neutrino !! else if ( msg == CRCInput::RC_setup) { diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 71ec431c5..5a6afefec 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -48,7 +48,8 @@ enum { LIST_MODE_FAV, LIST_MODE_PROV, LIST_MODE_SAT, - LIST_MODE_ALL + LIST_MODE_ALL, + LIST_MODE_LAST }; class CChannelList