From 48feb4a164cf3eea27bfb45dc7a9cbb55b08eddc Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 16 Jan 2011 17:51:06 +0000 Subject: [PATCH] Show default color of numbox and numboxtext when zapping over current channel in virtual zap, fix possible segfault git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1030 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e5e583b26af3171110e859ac4bfe1e3b2c9c5a21 Author: Jacek Jendrzej Date: 2011-01-16 (Sun, 16 Jan 2011) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 12 +++++------- src/gui/widget/menue.cpp | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 8f929e7bf..6b2196c76 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -608,14 +608,15 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con } else fadeValue = g_settings.infobar_alpha; - int col_NumBoxText; - int col_NumBox; + int col_NumBoxText = COL_INFOBAR; + int col_NumBox = COL_INFOBAR_PLUS_0; ChannelName = Channel; bool new_chan = false; if (virtual_zap_mode) { - col_NumBoxText = COL_MENUHEAD; - col_NumBox = COL_MENUHEAD_PLUS_0; + if (g_RemoteControl->current_channel_id != new_channel_id) { + col_NumBoxText = COL_MENUHEAD; + } if ((channel_id != new_channel_id) || (evtlist.empty())) { evtlist.clear(); //evtlist = g_Sectionsd->getEventsServiceKey(new_channel_id & 0xFFFFFFFFFFFFULL); @@ -624,9 +625,6 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con sort(evtlist.begin(),evtlist.end(), sortByDateTime); new_chan = true; } - } else { - col_NumBoxText = COL_INFOBAR; - col_NumBox = COL_INFOBAR_PLUS_0; } if (! calledFromNumZap && !(g_RemoteControl->subChannels.empty()) && (g_RemoteControl->selected_subchannel > 0)) { diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index e9a401f01..3f194955e 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -535,7 +535,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) } break; case (CRCInput::RC_left): - if(!(items[selected]->can_arrow) || g_settings.menu_left_exit) { + if(( hasItem() && !(items[selected]->can_arrow)) || g_settings.menu_left_exit) { msg = CRCInput::RC_timeout; break; }