Testing list edit problem #249; Commented some not used code

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@426 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-02-26 17:49:28 +00:00
parent 55956cf728
commit 42078cdd8f
5 changed files with 38 additions and 22 deletions

View File

@@ -113,6 +113,7 @@ int CBouquetList::getActiveBouquetNumber()
return selected;
}
#if 0
void CBouquetList::adjustToChannel( int nChannelNr)
{
for (uint32_t i=0; i<Bouquets.size(); i++) {
@@ -124,7 +125,7 @@ void CBouquetList::adjustToChannel( int nChannelNr)
}
}
}
#endif
bool CBouquetList::hasChannelID(t_channel_id channel_id)
{
for (uint32_t i = 0; i < Bouquets.size(); i++) {
@@ -342,14 +343,18 @@ int CBouquetList::show(bool bShowChannelList)
hide();
return -3;
} else if(msg == CRCInput::RC_yellow || msg == CRCInput::RC_sat) {
if(bShowChannelList) {
CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_SAT);
hide();
return -3;
}
} else if(msg == CRCInput::RC_blue) {
if(bShowChannelList) {
CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_ALL);
hide();
return -3;
}
}
else if(Bouquets.size() == 0)
continue; //FIXME msgs not forwarded to neutrino !!
else if ( msg == CRCInput::RC_setup) {

View File

@@ -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);

View File

@@ -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;i<chanlist.size();i++) {
@@ -897,6 +899,7 @@ int CChannelList::hasChannel(int nChannelNr)
}
return(-1);
}
#endif
int CChannelList::hasChannelID(t_channel_id channel_id)
{
@@ -988,7 +991,8 @@ int CChannelList::numericZap(int key)
if (key == g_settings.key_zaphistory) {
if(!autoshift && CNeutrinoApp::getInstance()->recordingstatus) {
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

View File

@@ -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

View File

@@ -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;
}
}