mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
Truth is: nobody know how it work
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@409 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: dbbdfdfb64
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-02-24 (Wed, 24 Feb 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -125,15 +125,16 @@ void CBouquetList::adjustToChannel( int nChannelNr)
|
||||
|
||||
void CBouquetList::adjustToChannelID(t_channel_id channel_id)
|
||||
{
|
||||
printf("CBouquetList::adjustToChannelID [%s] to %llx, selected %d size %d\n", name.c_str(), channel_id, selected, Bouquets.size());
|
||||
if(selected < Bouquets.size()) {
|
||||
int nChannelPos = Bouquets[selected]->channelList->hasChannelID(channel_id);
|
||||
if(nChannelPos > -1) {
|
||||
printf("CBouquetList::adjustToChannelID to %llx -> not needed\n", channel_id);
|
||||
printf("CBouquetList::adjustToChannelID [%s] to %llx -> not needed\n", name.c_str(), channel_id);
|
||||
Bouquets[selected]->channelList->setSelected(nChannelPos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
printf("CBouquetList::adjustToChannelID to %llx\n", channel_id);
|
||||
printf("CBouquetList::adjustToChannelID [%s] to %llx\n", name.c_str(), channel_id);
|
||||
for (uint32_t i=0; i < Bouquets.size(); i++) {
|
||||
if(i == selected)
|
||||
continue;
|
||||
@@ -238,6 +239,7 @@ int CBouquetList::doMenu()
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
} else {
|
||||
menu->addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_DELETE, true, NULL, selector, cnt, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE), old_selected == i ++);
|
||||
ret = menu->exec(NULL, "");
|
||||
@@ -259,6 +261,7 @@ int CBouquetList::doMenu()
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -338,10 +341,10 @@ int CBouquetList::show(bool bShowChannelList)
|
||||
continue; //FIXME msgs not forwarded to neutrino !!
|
||||
else if ( msg == CRCInput::RC_setup) {
|
||||
int ret = doMenu();
|
||||
if(ret) {
|
||||
if(ret > 0) {
|
||||
res = -4;
|
||||
loop = false;
|
||||
} else
|
||||
} else if(ret < 0)
|
||||
paint();
|
||||
}
|
||||
else if ( msg == (neutrino_msg_t) g_settings.key_list_start ) {
|
||||
|
@@ -310,6 +310,13 @@ int CChannelList::doChannelMenu(void)
|
||||
int result;
|
||||
char cnt[5];
|
||||
t_channel_id channel_id;
|
||||
bool enabled = true;
|
||||
|
||||
if(old_b_id >= (int) bouquetList->Bouquets.size() || !bouquetList->Bouquets[old_b_id]->zapitBouquet) {
|
||||
enabled = false;
|
||||
if(old_selected < 2)//FIXME take care if some items added before 0, 1
|
||||
old_selected = 2;
|
||||
}
|
||||
|
||||
if(!bouquetList || g_settings.minimode)
|
||||
return 0;
|
||||
@@ -318,9 +325,9 @@ int CChannelList::doChannelMenu(void)
|
||||
CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select);
|
||||
|
||||
sprintf(cnt, "%d", i);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_DELETE, true, NULL, selector, cnt, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), old_selected == i++);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_DELETE, enabled, NULL, selector, cnt, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), old_selected == i++);
|
||||
sprintf(cnt, "%d", i);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_MOVE, true, NULL, selector, cnt, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), old_selected == i++);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_MOVE, enabled, NULL, selector, cnt, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), old_selected == i++);
|
||||
sprintf(cnt, "%d", i);
|
||||
menu->addItem(new CMenuForwarder(LOCALE_EXTRA_ADD_TO_BOUQUET, true, NULL, selector, cnt, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW), old_selected == i++);
|
||||
sprintf(cnt, "%d", i);
|
||||
@@ -351,7 +358,6 @@ int CChannelList::doChannelMenu(void)
|
||||
case 1: // move
|
||||
old_bouquet_id = bouquetList->getActiveBouquetNumber();
|
||||
old_bouquet_id = g_bouquetManager->existsBouquet(bouquetList->Bouquets[old_bouquet_id]->channelList->getName());
|
||||
|
||||
do {
|
||||
new_bouquet_id = bouquetList->exec(false);
|
||||
} while(new_bouquet_id == -3);
|
||||
@@ -882,7 +888,11 @@ int CChannelList::hasChannel(int nChannelNr)
|
||||
|
||||
int CChannelList::hasChannelID(t_channel_id channel_id)
|
||||
{
|
||||
for (uint32_t i=0;i<chanlist.size();i++) {
|
||||
for (uint32_t i=0; i < chanlist.size();i++) {
|
||||
if(chanlist[i] == NULL) {
|
||||
printf("CChannelList::hasChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i);
|
||||
continue;
|
||||
}
|
||||
if (chanlist[i]->channel_id == channel_id)
|
||||
return i;
|
||||
}
|
||||
|
@@ -3175,6 +3175,7 @@ _repeat:
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if( msg == NeutrinoMessages::EVT_SERVICESCHANGED ) {
|
||||
printf("NeutrinoMessages::EVT_SERVICESCHANGED\n");fflush(stdout);
|
||||
channelsInit();
|
||||
channelList->adjustToChannelID(live_channel_id);//FIXME what if deleted ?
|
||||
if(old_b_id >= 0) {
|
||||
@@ -3184,6 +3185,7 @@ _repeat:
|
||||
}
|
||||
}
|
||||
else if( msg == NeutrinoMessages::EVT_BOUQUETSCHANGED ) {
|
||||
printf("NeutrinoMessages::EVT_BOUQUETSCHANGED\n");fflush(stdout);
|
||||
channelsInit();
|
||||
channelList->adjustToChannelID(live_channel_id);//FIXME what if deleted ?
|
||||
return messages_return::handled;
|
||||
|
Reference in New Issue
Block a user