mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
TRy to fix channel list display depending on record status
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1611 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: f4638daf6f
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-08-01 (Mon, 01 Aug 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include <driver/screen_max.h>
|
||||
#include <driver/rcinput.h>
|
||||
#include <driver/abstime.h>
|
||||
#include <driver/record.h>
|
||||
|
||||
#include <gui/color.h>
|
||||
#include <gui/eventlist.h>
|
||||
@@ -80,7 +81,7 @@ extern CBouquetList * RADIOallList;
|
||||
extern tallchans allchans;
|
||||
|
||||
|
||||
extern t_channel_id rec_channel_id;
|
||||
//extern t_channel_id rec_channel_id;
|
||||
extern bool autoshift;
|
||||
extern int g_channel_list_changed;
|
||||
|
||||
@@ -1204,6 +1205,7 @@ int CChannelList::numericZap(int key)
|
||||
//CChannelList * orgList = bouquetList->orgChannelList;
|
||||
CChannelList * orgList = CNeutrinoApp::getInstance()->channelList;
|
||||
CChannelList * channelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_CURRENT_TP), false, true);
|
||||
#if 0
|
||||
t_channel_id recid = rec_channel_id >> 16;
|
||||
if(key == CRCInput::RC_games)
|
||||
recid = chanlist[selected]->channel_id >> 16;
|
||||
@@ -1212,6 +1214,19 @@ int CChannelList::numericZap(int key)
|
||||
channelList->addChannel(orgList->chanlist[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(key == CRCInput::RC_games) {
|
||||
t_channel_id recid =chanlist[selected]->channel_id >> 16;
|
||||
for ( unsigned int i = 0 ; i < orgList->chanlist.size(); i++) {
|
||||
if((orgList->chanlist[i]->channel_id >> 16) == recid)
|
||||
channelList->addChannel(orgList->chanlist[i]);
|
||||
}
|
||||
} else {
|
||||
for ( unsigned int i = 0 ; i < orgList->chanlist.size(); i++) {
|
||||
if(SameTP(orgList->chanlist[i]->channel_id))
|
||||
channelList->addChannel(orgList->chanlist[i]);
|
||||
}
|
||||
}
|
||||
if (channelList->getSize() != 0) {
|
||||
channelList->adjustToChannelID(orgList->getActiveChannel_ChannelID(), false);
|
||||
this->frameBuffer->paintBackground();
|
||||
@@ -1738,10 +1753,15 @@ void CChannelList::paintItem(int pos)
|
||||
bool iscurrent = true;
|
||||
unsigned int curr = liststart + pos;
|
||||
|
||||
#if 0
|
||||
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
|
||||
iscurrent = (chanlist[curr]->channel_id >> 16) == (rec_channel_id >> 16);
|
||||
//printf("recording %llx current %llx current = %s\n", rec_channel_id, chanlist[liststart + pos]->channel->channel_id, iscurrent? "yes" : "no");
|
||||
//printf("recording %llx current %llx current = %s\n", rec_channel_id, chanlist[liststart + pos]->channel_id, iscurrent? "yes" : "no");
|
||||
}
|
||||
#endif
|
||||
if(curr < chanlist.size())
|
||||
iscurrent = SameTP(chanlist[curr]->channel_id);
|
||||
|
||||
if (curr == selected) {
|
||||
color = COL_MENUCONTENTSELECTED;
|
||||
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
|
||||
@@ -1972,11 +1992,15 @@ bool CChannelList::SameTP(t_channel_id channel_id)
|
||||
{
|
||||
bool iscurrent = true;
|
||||
|
||||
if(channel_id == 0)
|
||||
channel_id = chanlist[selected]->channel_id;
|
||||
|
||||
#if 0
|
||||
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift)
|
||||
iscurrent = (channel_id >> 16) == (rec_channel_id >> 16);
|
||||
#endif
|
||||
if(CNeutrinoApp::getInstance()->recordingstatus) {
|
||||
if(channel_id == 0)
|
||||
channel_id = chanlist[selected]->channel_id;
|
||||
iscurrent = CRecordManager::getInstance()->SameTransponder(channel_id);
|
||||
}
|
||||
|
||||
return iscurrent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user