mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
gui/scan_setup.cpp,
gui/channellist.cpp,
gui/bedit/bouqueteditor_channels.cpp,
gui/bedit/bouqueteditor_chanselect.cpp: use transponder::description to show channel details
Origin commit data
------------------
Commit: 1c2363cfb4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-04-17 (Tue, 17 Apr 2012)
This commit is contained in:
@@ -172,53 +172,17 @@ void CBEChannelWidget::paintFoot()
|
||||
|
||||
void CBEChannelWidget::paintDetails(int index)
|
||||
{
|
||||
char buf[128] = {0};
|
||||
int len = 0;
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName((*Channels)[index]->getSatellitePosition());
|
||||
transponder t;
|
||||
CServiceManager::getInstance()->GetTransponder((*Channels)[index]->getTransponderId(), t);
|
||||
std::string desc = t.description();
|
||||
if((*Channels)[index]->pname)
|
||||
desc = desc + " (" + std::string((*Channels)[index]->pname) + ")";
|
||||
else
|
||||
desc = desc + " (" + satname + ")";
|
||||
|
||||
transponder_id_t ct = (*Channels)[index]->getTransponderId();
|
||||
transponder_list_t::iterator tpI = transponders.find(ct);
|
||||
//sat_iterator_t sit = satellitePositions.find((*Channels)[index]->getSatellitePosition());
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName((*Channels)[index]->getSatellitePosition()).c_str();
|
||||
|
||||
len = snprintf(buf, sizeof(buf), "%d ", (*Channels)[index]->getFreqId());
|
||||
|
||||
if(tpI != transponders.end()) {
|
||||
char * f, *s, *m;
|
||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||
transponder & t = tpI->second;
|
||||
switch(frontend->getInfo()->type)
|
||||
{
|
||||
case FE_QPSK:
|
||||
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_QAM:
|
||||
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_OFDM:
|
||||
case FE_ATSC:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if((*Channels)[index]->pname) {
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", (*Channels)[index]->pname);
|
||||
}
|
||||
else {
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", satname.c_str());
|
||||
#if 0
|
||||
if(sit != satellitePositions.end()) {
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", sit->second.name.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//if(sit != satellitePositions.end())
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, width - 30, buf, COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
|
||||
void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
|
@@ -199,52 +199,17 @@ void CBEChannelSelectWidget::paintFoot()
|
||||
|
||||
void CBEChannelSelectWidget::paintDetails(int index)
|
||||
{
|
||||
char buf[128] = {0};
|
||||
int len = 0;
|
||||
transponder_id_t ct = Channels[index]->getTransponderId();
|
||||
transponder_list_t::iterator tpI = transponders.find(ct);
|
||||
//sat_iterator_t sit = satellitePositions.find(Channels[index]->getSatellitePosition());
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(Channels[index]->getSatellitePosition());
|
||||
transponder t;
|
||||
CServiceManager::getInstance()->GetTransponder(Channels[index]->getTransponderId(), t);
|
||||
std::string desc = t.description();
|
||||
if(Channels[index]->pname)
|
||||
desc = desc + " (" + std::string(Channels[index]->pname) + ")";
|
||||
else
|
||||
desc = desc + " (" + satname + ")";
|
||||
|
||||
len = snprintf(buf, sizeof(buf), "%d ", Channels[index]->getFreqId());
|
||||
|
||||
if(tpI != transponders.end()) {
|
||||
char * f, *s, *m;
|
||||
transponder & t = tpI->second;
|
||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||
switch(frontend->getInfo()->type)
|
||||
{
|
||||
case FE_QPSK:
|
||||
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_QAM:
|
||||
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_OFDM:
|
||||
case FE_ATSC:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(Channels[index]->pname) {
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", Channels[index]->pname);
|
||||
}
|
||||
else {
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", satname.c_str());
|
||||
#if 0
|
||||
if(sit != satellitePositions.end()) {
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", sit->second.name.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//if(sit != satellitePositions.end())
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, width - 30, buf, COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
|
||||
void CBEChannelSelectWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
|
@@ -1492,47 +1492,21 @@ void CChannelList::paintDetails(int index)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ width- 10- seit_len, y+ height+ 5+ fheight, seit_len, cSeit, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ width- 10- noch_len, y+ height+ 5+ 2* fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||
}
|
||||
char buf[128] = {0};
|
||||
char cFrom[50] = {0}; // UTF-8
|
||||
int len = 0;
|
||||
if(g_settings.channellist_foot == 0) {
|
||||
transponder_id_t ct = chanlist[index]->getTransponderId();
|
||||
transponder_list_t::iterator tpI = transponders.find(ct);
|
||||
len = snprintf(buf, sizeof(buf), "%d ", chanlist[index]->getFreqId());
|
||||
|
||||
if(tpI != transponders.end()) {
|
||||
char * f, *s, *m;
|
||||
transponder & t = tpI->second;
|
||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||
switch(frontend->getInfo()->type) {
|
||||
case FE_QPSK:
|
||||
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_QAM:
|
||||
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_OFDM:
|
||||
case FE_ATSC:
|
||||
break;
|
||||
}
|
||||
}
|
||||
transponder t;
|
||||
CServiceManager::getInstance()->GetTransponder(chanlist[index]->getTransponderId(), t);
|
||||
|
||||
std::string desc = t.description();
|
||||
if(chanlist[index]->pname)
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", chanlist[index]->pname);
|
||||
else {
|
||||
#if 0
|
||||
const char * satname = CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition());
|
||||
if(satname)
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)", satname);
|
||||
#endif
|
||||
snprintf(&buf[len], sizeof(buf) - len, "(%s)",
|
||||
CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition()).c_str());
|
||||
}
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, width - 30, buf, COL_MENUCONTENTDARK, 0, true);
|
||||
desc = desc + " (" + std::string(chanlist[index]->pname) + ")";
|
||||
else
|
||||
desc = desc + " (" + CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition()) + ")";
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
else if( !displayNext && g_settings.channellist_foot == 1) { // next Event
|
||||
char buf[128] = {0};
|
||||
char cFrom[50] = {0}; // UTF-8
|
||||
CSectionsdClient::CurrentNextInfo CurrentNext;
|
||||
sectionsd_getCurrentNextServiceKey(chanlist[index]->channel_id & 0xFFFFFFFFFFFFULL, CurrentNext);
|
||||
if (!CurrentNext.next_name.empty()) {
|
||||
|
@@ -1010,30 +1010,15 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
||||
int i = 0;
|
||||
transponder_list_t &select_transponders = CServiceManager::getInstance()->GetSatelliteTransponders(position);
|
||||
for (transponder_list_t::iterator tI = select_transponders.begin(); tI != select_transponders.end(); ++tI) {
|
||||
char buf[128];
|
||||
sprintf(cnt, "%d", i);
|
||||
char * f, *s, *m;
|
||||
transponder & t = tI->second;
|
||||
switch (frontend->getInfo()->type) {
|
||||
case FE_QPSK:
|
||||
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
snprintf(buf, sizeof(buf), "%d %c %d %s %s %s ", t.feparams.frequency/1000, transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_QAM:
|
||||
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||
snprintf(buf, sizeof(buf), "%d %d %s %s %s ", t.feparams.frequency/1000, t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_OFDM:
|
||||
case FE_ATSC:
|
||||
break;
|
||||
}
|
||||
|
||||
if(!old_selected && channel && channel->getSatellitePosition() == position) {
|
||||
if(channel->getFreqId() == GET_FREQ_FROM_TPID(tI->first))
|
||||
old_selected = i;
|
||||
}
|
||||
|
||||
CMenuForwarderNonLocalized * ts_item = new CMenuForwarderNonLocalized(buf, true, NULL, selector, cnt, CRCInput::RC_nokey, NULL)/*, false*/;
|
||||
std::string tname = t.description();
|
||||
CMenuForwarderNonLocalized * ts_item = new CMenuForwarderNonLocalized(tname.c_str(), true, NULL, selector, cnt, CRCInput::RC_nokey, NULL)/*, false*/;
|
||||
|
||||
ts_item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
|
||||
menu.addItem(ts_item, old_selected == i);
|
||||
|
Reference in New Issue
Block a user