From 41a03e3d4f97d7060d09a9045c2cfc02109c8ad6 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 10 Mar 2013 00:07:26 +0100 Subject: [PATCH] channellist: don't change bouquetmode when adding favs when adding a channel to favorites from the channellist contextmenu the favorites bouquet was chosen, which is not helpful if further favorites should be added Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/99e2ff32c92649f04ce7f1979cf225a50ede8028 Author: Stefan Seyfried Date: 2013-03-10 (Sun, 10 Mar 2013) ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 9 +++++---- src/neutrino.cpp | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 39254c663..69e940966 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -427,7 +427,7 @@ int CChannelList::doChannelMenu(void) } if(!g_bouquetManager->existsChannelInBouquet(bouquet_id, channel_id)) { CZapit::getInstance()->addChannelToBouquet(bouquet_id, channel_id); - return 1; + return 2; } break; @@ -685,9 +685,10 @@ int CChannelList::show() else if ( msg == CRCInput::RC_setup) { old_b_id = bouquetList->getActiveBouquetNumber(); fader.Stop(); - CNeutrinoApp::getInstance()->g_channel_list_changed = doChannelMenu(); - if(CNeutrinoApp::getInstance()->g_channel_list_changed) { - res = -4; + int ret = doChannelMenu(); + CNeutrinoApp::getInstance()->g_channel_list_changed = (ret != 0); + if (ret) { + res = -3 - ret; /* -5 == add to fav, -5 == all other change */ loop = false; } else { old_b_id = -1; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index bec73577e..0b713d11b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2377,7 +2377,9 @@ _repeat: //else if(nNewChannel == -4) if(g_channel_list_changed) { - SetChannelMode(old_mode); + /* don't change bouquet after adding a channel to favorites */ + if (nNewChannel != -5) + SetChannelMode(old_mode); g_channel_list_changed = 0; if(old_b_id < 0) old_b_id = old_b; //g_Zapit->saveBouquets();