diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index b590d2830..8e5985d08 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -113,6 +113,7 @@ int CBouquetList::getActiveBouquetNumber() return selected; } +#if 0 void CBouquetList::adjustToChannel( int nChannelNr) { for (uint32_t i=0; iSetChannelMode(LIST_MODE_SAT); - hide(); - return -3; + if(bShowChannelList) { + CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_SAT); + hide(); + return -3; + } } else if(msg == CRCInput::RC_blue) { - CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_ALL); - hide(); - return -3; + if(bShowChannelList) { + CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_ALL); + hide(); + return -3; + } } else if(Bouquets.size() == 0) continue; //FIXME msgs not forwarded to neutrino !! diff --git a/src/gui/bouquetlist.h b/src/gui/bouquetlist.h index 01f59446b..11f796764 100644 --- a/src/gui/bouquetlist.h +++ b/src/gui/bouquetlist.h @@ -114,7 +114,7 @@ class CBouquetList int activateBouquet(int id, bool bShowChannelList); int show(bool bShowChannelList = true); int showChannelList(int nBouquet = -1); - void adjustToChannel(int nChannelNr); + //void adjustToChannel(int nChannelNr); bool adjustToChannelID(t_channel_id channel_id); int exec( bool bShowChannelList); bool hasChannelID(t_channel_id channel_id); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 1898bc21a..133767f1d 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -89,6 +89,7 @@ int info_height = 0; bool new_mode_active = 0; //int list_changed = 0; static bool pipzap; +extern int g_channel_list_changed; extern CBouquetManager *g_bouquetManager; void sectionsd_getChannelEvents(CChannelEventList &eList, const bool tv_mode, t_channel_id *chidlist, int clen); @@ -485,7 +486,7 @@ int CChannelList::show() bool loop=true; while (loop) { - g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd ); + g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, true); if ( msg <= CRCInput::RC_MaxRC ) timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); @@ -516,8 +517,8 @@ int CChannelList::show() } else if ( msg == CRCInput::RC_setup) { old_b_id = bouquetList->getActiveBouquetNumber(); - int ret = doChannelMenu(); - if(ret) { + g_channel_list_changed = doChannelMenu(); + if(g_channel_list_changed) { res = -4; loop = false; } else { @@ -889,6 +890,7 @@ printf("CChannelList::adjustToChannelID me %x [%s] list size %d channel_id %llx\ return false; } +#if 0 int CChannelList::hasChannel(int nChannelNr) { for (uint32_t i=0;irecordingstatus) { - CChannelList * orgList = bouquetList->orgChannelList; + //CChannelList * orgList = bouquetList->orgChannelList; + CChannelList * orgList = CNeutrinoApp::getInstance()->channelList; CChannelList * channelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_CURRENT_TP), false, true); t_channel_id recid = rec_channel_id >> 16; for ( unsigned int i = 0 ; i < orgList->chanlist.size(); i++) { @@ -1304,7 +1308,6 @@ printf("CChannelList::quickZap: new selected %d total %d active bouquet %d total else if ((key==g_settings.key_quickzap_up) || (key == CRCInput::RC_right)) { selected = (selected+1)%chanlist.size(); } - //printf("[neutrino] quick zap selected = %d bouquetList %x getActiveBouquetNumber %d orgChannelList %x\n", selected, bouquetList, bouquetList->getActiveBouquetNumber(), bouquetList->orgChannelList); CNeutrinoApp::getInstance()->channelList->zapTo(getKey(selected)-1); } g_RCInput->clearRCMsg(); //FIXME test for n.103 diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 21fbb5ccc..ccd58ec11 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -114,7 +114,7 @@ class CChannelList int show(); int exec(); void quickZap(int key, bool cycle = false); - int hasChannel(int nChannelNr); + //int hasChannel(int nChannelNr); int hasChannelID(t_channel_id channel_id); void setSelected( int nChannelNr); // for adjusting bouquet's channel list after numzap or quickzap diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 13b646191..e29546324 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -199,6 +199,8 @@ int prev_video_mode; int xres = 72; int yres = 72; // TODO: no globals for that. +int g_channel_list_changed; + void stop_daemons(bool stopall = true); // uncomment if you want to have a "test" menue entry (rasc) @@ -1704,19 +1706,25 @@ void CNeutrinoApp::channelsInit(bool /*bOnly*/) if(g_settings.make_hd_list) hdBouquet = new CBouquet(0, (char *) "HD", false); + /* TODO: check, is really needed to have main "all channels" list sorted + according to channel number ? Anything besides + channelList::zapTo(pos) using direct [number] access in list ?? + zapTo(pos) used in epgplus.cpp and channellist.cpp + + getActiveChannelNumber used to get index for direct access too ? + */ int tvi = 0, ri = 0, hi = 0; for (tallchans_iterator it = allchans.begin(); it != allchans.end(); it++) { if (it->second.getServiceType() == ST_DIGITAL_TELEVISION_SERVICE) { TVchannelList->putChannel(&(it->second)); tvi++; -#if 1 + if(g_settings.make_hd_list) if(it->second.isHD()) { //printf("HD channel: %d %s sid %x\n", it->second.getSatellitePosition(), it->second.getName().c_str(), it->second.getServiceId()); hdBouquet->channelList->addChannel(&(it->second)); hi++; } -#endif } else if (it->second.getServiceType() == ST_DIGITAL_RADIO_SOUND_SERVICE) { RADIOchannelList->putChannel(&(it->second)); @@ -3037,18 +3045,18 @@ _repeat: nNewChannel = bouquetList->exec(true); goto _repeat; } - else if(nNewChannel == -4) { + //else if(nNewChannel == -4) + if(g_channel_list_changed) + { + SetChannelMode(old_mode); + g_channel_list_changed = 0; if(old_b_id < 0) old_b_id = old_b; g_Zapit->saveBouquets(); } if(g_settings.mode_clock) InfoClock->StartClock(); -#if 0 - /* FIXME: more check for StartSubtitles() like was no zap ?? */ - if(mode == mode_tv) - StartSubtitles(); -#endif + return messages_return::handled; } }