- timerlist: just small code cosmetics

This commit is contained in:
svenhoefer
2016-11-07 10:13:04 +01:00
parent 3b25694983
commit 8ac3b64e75

View File

@@ -181,11 +181,13 @@ public:
bool changeNotify(const neutrino_locale_t /*OptionName*/, void *)
{
if (*iRepeat >= (int)CTimerd::TIMERREPEAT_WEEKDAYS) {
if (*iRepeat >= (int)CTimerd::TIMERREPEAT_WEEKDAYS)
{
m1->setActive (true);
*weekdays = "XXXXX--";
}
else {
else
{
m1->setActive (false);
*weekdays = "-------";
}
@@ -294,7 +296,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
{
const char * key = actionKey.c_str();
if(actionKey == "add_ip") {
if (actionKey == "add_ip")
{
std::string rbname,rbaddress,user,pass = "";
std::string port = "80";
CKeyboardInput remotebox_name(LOCALE_REMOTEBOX_RBNAME, &rbname, 25);
@@ -314,14 +317,16 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
rbsetup->addItem(new CMenuForwarder(LOCALE_REMOTEBOX_USER, true, user, &remotebox_user));
rbsetup->addItem(new CMenuForwarder(LOCALE_REMOTEBOX_PASS, true, pass, &remotebox_pass));
rbsetup->enableSaveScreen(true);
if ((rbsetup->exec(NULL,"") == true) && (!rbaddress.empty())) {
if ((rbsetup->exec(NULL,"") == true) && (!rbaddress.empty()))
{
remboxmenu->addItem(new CMenuForwarder(rbname, true, NULL, this, "cha_ip"));
rbsetup->hide();
remboxmenu->enableSaveScreen(false);
remboxmenu->hide();
timer_remotebox_item timer_rb;
timer_rb.rbaddress = rbaddress;
if (!timer_rb.rbaddress.empty()) {
if (!timer_rb.rbaddress.empty())
{
timer_rb.port = atoi(port);
timer_rb.user = user;
timer_rb.pass = pass;
@@ -335,9 +340,11 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
return menu_return::RETURN_REPAINT;
}
if(actionKey == "del_ip") {
if (actionKey == "del_ip")
{
bselected = remboxmenu->getSelected();
if (bselected >= item_offset) {
if (bselected >= item_offset)
{
remboxmenu->removeItem(bselected);
remboxmenu->enableSaveScreen(false);
remboxmenu->hide();
@@ -347,7 +354,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
return menu_return::RETURN_REPAINT;
}
if(actionKey == "cha_ip") {
if (actionKey == "cha_ip")
{
bselected = remboxmenu->getSelected();
CMenuItem* item = remboxmenu->getItem(bselected);
CMenuForwarder *f = static_cast<CMenuForwarder*>(item);
@@ -371,7 +379,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
rbsetup->addItem(new CMenuForwarder(LOCALE_REMOTEBOX_USER, true, it->user, &remotebox_user));
rbsetup->addItem(new CMenuForwarder(LOCALE_REMOTEBOX_PASS, true, it->pass, &remotebox_pass));
rbsetup->enableSaveScreen(true);
if ((rbsetup->exec(NULL,"") == true) && (!it->rbaddress.empty())) {
if ((rbsetup->exec(NULL,"") == true) && (!it->rbaddress.empty()))
{
it->port = atoi(port);
f->setName(it->rbname);
rbsetup->hide();
@@ -393,14 +402,14 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
if (timer_apids_dflt)
timerlist[selected].apids = TIMERD_APIDS_CONF;
else
timerlist[selected].apids = (unsigned char)((timer_apids_std * TIMERD_APIDS_STD) | (timer_apids_ac3 * TIMERD_APIDS_AC3) |
(timer_apids_alt * TIMERD_APIDS_ALT));
timerlist[selected].apids = (unsigned char)((timer_apids_std * TIMERD_APIDS_STD) | (timer_apids_ac3 * TIMERD_APIDS_AC3) | (timer_apids_alt * TIMERD_APIDS_ALT));
Timer->modifyTimerAPid(timerlist[selected].eventID,timerlist[selected].apids);
Timer->modifyRecordTimerEvent(timerlist[selected].eventID, timerlist[selected].announceTime,
timerlist[selected].alarmTime,
timerlist[selected].stopTime, timerlist[selected].eventRepeat,
timerlist[selected].repeatCount,timerlist[selected].recordingDir);
} else if (timerlist[selected].eventType == CTimerd::TIMER_REMOTEBOX)
}
else if (timerlist[selected].eventType == CTimerd::TIMER_REMOTEBOX)
{
CHTTPTool httpTool;
std::string r_url;
@@ -417,7 +426,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
//printf("[remotetimer] url:%s\n",r_url.c_str());
r_url = httpTool.downloadString(r_url, -1, httpConnectTimeout);
//printf("[remotetimer] status:%s\n",r_url.c_str());
} else
}
else
{
Timer->modifyTimerEvent(timerlist[selected].eventID, timerlist[selected].announceTime,
timerlist[selected].alarmTime,
@@ -541,7 +551,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
timerNew.announceTime-= 120; // 2 more mins for rec timer
strncpy(recinfo.recordingDir,timerNew.recordingDir,sizeof(recinfo.recordingDir)-1);
data = &recinfo;
} else
}
else
data= &eventinfo;
}
else if (timerNew.eventType==CTimerd::TIMER_REMIND)
@@ -585,21 +596,25 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
g_RCInput->postMsg(CRCInput::RC_timeout, 0); // leave underlying menu also
return menu_return::RETURN_EXIT;
}
else if(actionKey == "rec_dir1") {
else if (actionKey == "rec_dir1")
{
if (parent)
parent->hide();
const char *action_str = "RecDir1";
if(chooserDir(timerlist[selected].recordingDir, true, action_str, sizeof(timerlist[selected].recordingDir)-1)) {
if (chooserDir(timerlist[selected].recordingDir, true, action_str, sizeof(timerlist[selected].recordingDir)-1))
{
printf("[timerlist] new %s dir %s\n", action_str, timerlist[selected].recordingDir);
}
timer_recordingDir = timerlist[selected].recordingDir;
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "rec_dir2") {
else if (actionKey == "rec_dir2")
{
if (parent)
parent->hide();
const char *action_str = "RecDir2";
if(chooserDir(timerNew.recordingDir, true, action_str, sizeof(timerNew.recordingDir)-1)) {
if (chooserDir(timerNew.recordingDir, true, action_str, sizeof(timerNew.recordingDir)-1))
{
printf("[timerlist] new %s dir %s\n", action_str, timerNew.recordingDir);
}
timerNew_recordingDir = timerNew.recordingDir;
@@ -750,9 +765,10 @@ bool CTimerList::LocalBoxChanExists(t_channel_id channel_id)
std::string CTimerList::RemoteBoxConnectUrl(std::string _rbname)
{
std::string c_url = "";
for (std::vector<timer_remotebox_item>::iterator it = g_settings.timer_remotebox_ip.begin();
it != g_settings.timer_remotebox_ip.end(); ++it) {
if (it->rbname == _rbname) {
for (std::vector<timer_remotebox_item>::iterator it = g_settings.timer_remotebox_ip.begin(); it != g_settings.timer_remotebox_ip.end(); ++it)
{
if (it->rbname == _rbname)
{
if (!it->user.empty() && !it->pass.empty())
c_url += it->user + ":" + it->pass +"@";
c_url += it->rbaddress;
@@ -770,8 +786,8 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist)
CHTTPTool httpTool;
std::string r_url;
for (std::vector<timer_remotebox_item>::iterator it = g_settings.timer_remotebox_ip.begin();
it != g_settings.timer_remotebox_ip.end(); ++it) {
for (std::vector<timer_remotebox_item>::iterator it = g_settings.timer_remotebox_ip.begin(); it != g_settings.timer_remotebox_ip.end(); ++it)
{
r_url = "http://";
r_url += RemoteBoxConnectUrl(it->rbname);
r_url += "/control/timer?format=json";
@@ -781,7 +797,8 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist)
Json::Value root;
Json::Reader reader;
bool parsedSuccess = reader.parse(r_url, root, false);
if (!parsedSuccess) {
if (!parsedSuccess)
{
printf("Failed to parse JSON\n");
printf("%s\n", reader.getFormattedErrorMessages().c_str());
}
@@ -794,9 +811,11 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist)
Json::Value remotetimers = root["data"]["timer"][0]["timer_list"];
for (unsigned int i= 0; i<remotetimers.size();i++) {
for (unsigned int i= 0; i<remotetimers.size();i++)
{
CTimerd::responseGetTimer rtimer;
if ( atoi(remotetimers[i].get("type_number","").asString()) == 5) {
if ( atoi(remotetimers[i].get("type_number","").asString()) == 5)
{
strncpy(rtimer.remotebox_name,it->rbname.c_str(),sizeof(rtimer.remotebox_name));
rtimer.remotebox_name[sizeof(rtimer.remotebox_name) - 1] = 0;
rtimer.rem_pre = rem_pre;
@@ -853,32 +872,42 @@ int CTimerList::show()
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
//ignore numeric keys
if (g_RCInput->isNumeric(msg)){
if (g_RCInput->isNumeric(msg))
{
msg = CRCInput::RC_nokey;
}
if ( msg <= CRCInput::RC_MaxRC )
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
::TIMING_MENU]);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
if((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) {
if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer()))
{
if (fader.FadeDone())
loop = false;
}
else if ( ( msg == CRCInput::RC_timeout ) ||
( msg == CRCInput::RC_home) || (msg == CRCInput::RC_left) ||
(( msg == CRCInput::RC_ok) && (timerlist.empty())) )
else if (
(msg == CRCInput::RC_timeout)
|| (msg == CRCInput::RC_home)
|| (msg == CRCInput::RC_left)
|| (msg == CRCInput::RC_ok && timerlist.empty())
)
{ //Exit after timeout or cancel key
if(fader.StartFadeOut()) {
if (fader.StartFadeOut())
{
timeoutEnd = CRCInput::calcTimeoutEnd( 1 );
msg = 0;
} else
}
else
loop=false;
}
else if (!timerlist.empty() &&
(msg == CRCInput::RC_up || (int)msg == g_settings.key_pageup ||
msg == CRCInput::RC_down || (int)msg == g_settings.key_pagedown))
else if (!timerlist.empty() && (
msg == CRCInput::RC_up
|| msg == CRCInput::RC_down
|| (int)msg == g_settings.key_pageup
|| (int)msg == g_settings.key_pagedown
)
)
{
int prev_selected = selected;
int oldliststart = liststart;
@@ -888,13 +917,19 @@ int CTimerList::show()
liststart = (selected / listmaxshow) * listmaxshow;
if (oldliststart != liststart)
paint();
else {
else
{
paintItem(prev_selected - liststart);
paintItem(selected - liststart);
}
paintFoot();
}
else if ((msg == CRCInput::RC_right || msg == CRCInput::RC_ok || msg==CRCInput::RC_blue) && !(timerlist.empty()))
else if (!timerlist.empty() && (
msg == CRCInput::RC_ok
|| msg == CRCInput::RC_right
|| msg == CRCInput::RC_blue
)
)
{
if (modifyTimer()==menu_return::RETURN_EXIT_ALL)
{
@@ -904,9 +939,10 @@ int CTimerList::show()
else
update=true;
}
else if ((msg == CRCInput::RC_play) && !(timerlist.empty()) && (g_settings.timer_remotebox_ip.size() > 0))
else if (!timerlist.empty() && (msg == CRCInput::RC_play && g_settings.timer_remotebox_ip.size() > 0))
{
if (timerlist[selected].eventType == CTimerd::TIMER_RECORD )
{
if (timerlist[selected].eventType == CTimerd::TIMER_RECORD ) {
RemoteBoxSelect();
if (exec(this,"send_remotetimer"))
{
@@ -915,7 +951,9 @@ int CTimerList::show()
}
else
update=true;
} else if (timerlist[selected].eventType == CTimerd::TIMER_REMOTEBOX ) {
}
else if (timerlist[selected].eventType == CTimerd::TIMER_REMOTEBOX )
{
if (exec(this,"fetch_remotetimer"))
{
res = menu_return::RETURN_EXIT_ALL;
@@ -925,21 +963,26 @@ int CTimerList::show()
update = true;
}
}
else if ((msg == CRCInput::RC_red) && !(timerlist.empty()))
else if (!timerlist.empty() && msg == CRCInput::RC_red)
{
if ((timerlist[selected].eventType == CTimerd::TIMER_REMOTEBOX) && (timerlist[selected].eventState < CTimerd::TIMERSTATE_ISRUNNING))
{
if ((timerlist[selected].eventType == CTimerd::TIMER_REMOTEBOX) && (timerlist[selected].eventState < CTimerd::TIMERSTATE_ISRUNNING)) {
if (exec(this,"del_remotetimer"))
{
res = menu_return::RETURN_EXIT_ALL;
loop = false;
}
} else {
}
else
{
bool killTimer = true;
if (CRecordManager::getInstance()->RecordingStatus(timerlist[selected].channel_id)) {
if (CRecordManager::getInstance()->RecordingStatus(timerlist[selected].channel_id))
{
CTimerd::RecordingStopInfo recinfo;
recinfo.channel_id = timerlist[selected].channel_id;
recinfo.eventID = timerlist[selected].eventID;
if (CRecordManager::getInstance()->IsRecording(&recinfo)) {
if (CRecordManager::getInstance()->IsRecording(&recinfo))
{
std::string title = "";
char buf1[1024];
CEPGData epgdata;
@@ -948,14 +991,15 @@ int CTimerList::show()
if (!epgdata.title.empty())
title = "(" + epgdata.title + ")\n";
snprintf(buf1, sizeof(buf1)-1, g_Locale->getText(LOCALE_TIMERLIST_ASK_TO_DELETE), title.c_str());
if(ShowMsg(LOCALE_RECORDINGMENU_RECORD_IS_RUNNING, buf1,
CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrNo) {
if (ShowMsg(LOCALE_RECORDINGMENU_RECORD_IS_RUNNING, buf1, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrNo)
{
killTimer = false;
update = false;
}
}
}
if (killTimer) {
if (killTimer)
{
Timer->removeTimerEvent(timerlist[selected].eventID);
update = true;
}
@@ -980,8 +1024,7 @@ int CTimerList::show()
update = true;
}
#if 0
else if ((msg==CRCInput::RC_blue)||
(CRCInput::isNumeric(msg)) )
else if (msg==CRCInput::RC_blue || CRCInput::isNumeric(msg))
{
//pushback key if...
g_RCInput->postMsg( msg, data );
@@ -996,10 +1039,12 @@ int CTimerList::show()
if (timer->eventType == CTimerd::TIMER_RECORD || timer->eventType == CTimerd::TIMER_REMOTEBOX || timer->eventType == CTimerd::TIMER_ZAPTO)
{
hide();
if (timer->epgID != 0){
if (timer->epgID != 0)
{
res = g_EpgData->show(timer->channel_id, timer->epgID, &timer->epg_starttime);
update = true;
}else
}
else
ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_EPGVIEWER_NOTFOUND);
if (res == menu_return::RETURN_EXIT_ALL)
loop = false;
@@ -1008,7 +1053,8 @@ int CTimerList::show()
}
}
}
else if (CNeutrinoApp::getInstance()->listModeKey(msg)) {
else if (CNeutrinoApp::getInstance()->listModeKey(msg))
{
g_RCInput->postMsg(msg, 0);
loop = false;
res = menu_return::RETURN_EXIT_ALL;
@@ -1047,24 +1093,26 @@ bool CTimerList::RemoteBoxSetup()
remboxmenu->addIntroItems();
item_offset = remboxmenu->getItemsCount();
for (std::vector<timer_remotebox_item>::iterator it = g_settings.timer_remotebox_ip.begin();
it != g_settings.timer_remotebox_ip.end(); ++it)
for (std::vector<timer_remotebox_item>::iterator it = g_settings.timer_remotebox_ip.begin(); it != g_settings.timer_remotebox_ip.end(); ++it)
remboxmenu->addItem(new CMenuForwarder(it->rbname, true, NULL, this, "cha_ip"));
remboxmenu->setFooter(RemoteBoxFooterButtons, RemoteBoxFooterButtonCount);
remboxmenu->enableSaveScreen(true);
remboxmenu->exec(NULL, "");
if (changed) {
if (changed)
{
std::vector<timer_remotebox_item> old_timer_remotebox_ip = g_settings.timer_remotebox_ip;
g_settings.timer_remotebox_ip.clear();
for (int i = item_offset; i < remboxmenu->getItemsCount(); i++) {
for (int i = item_offset; i < remboxmenu->getItemsCount(); i++)
{
CMenuItem *item = remboxmenu->getItem(i);
CMenuForwarder *f = static_cast<CMenuForwarder*>(item);
for (std::vector<timer_remotebox_item>::iterator it = old_timer_remotebox_ip.begin();
it != old_timer_remotebox_ip.end(); ++it)
if (it->rbname == f->getName()) {
g_settings.timer_remotebox_ip.push_back(*it);}
for (std::vector<timer_remotebox_item>::iterator it = old_timer_remotebox_ip.begin(); it != old_timer_remotebox_ip.end(); ++it)
if (it->rbname == f->getName())
{
g_settings.timer_remotebox_ip.push_back(*it);
}
}
changed = false;
ret = true;
@@ -1125,9 +1173,11 @@ void CTimerList::paintItem(int pos)
{
char srepeatcount[25] = {0};
if (timer.repeatCount == 0)
{
// Unicode 8734 (hex: 221E) not available in all fonts
//sprintf(srepeatcount,"∞");
sprintf(srepeatcount,"00");
}
else
sprintf(srepeatcount,"%ux",timer.repeatCount);
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+fw*13+(real_width-fw*23)/2,ypos+fheight, (real_width-fw*13)/2-5, srepeatcount, color, fheight);
@@ -1136,23 +1186,28 @@ void CTimerList::paintItem(int pos)
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+fw*13+(real_width-fw*13)/2,ypos+fheight, (real_width-fw*13)/2-5, t_type, color, fheight);
// paint rec icon when recording in progress
if ((timer.eventType == CTimerd::TIMER_RECORD) && (CRecordManager::getInstance()->RecordingStatus(timer.channel_id))) {
if ((timer.eventType == CTimerd::TIMER_RECORD) && (CRecordManager::getInstance()->RecordingStatus(timer.channel_id)))
{
CTimerd::RecordingStopInfo recinfo;
recinfo.channel_id = timer.channel_id;
recinfo.eventID = timer.eventID;
if (CRecordManager::getInstance()->IsRecording(&recinfo)) {
if (CRecordManager::getInstance()->IsRecording(&recinfo))
{
int icol_w, icol_h;
frameBuffer->getIconSize(NEUTRINO_ICON_REC, &icol_w, &icol_h);
if ((icol_w > 0) && (icol_h > 0)) {
if ((icol_w > 0) && (icol_h > 0))
{
frameBuffer->paintIcon(NEUTRINO_ICON_REC, (x + real_width) - (icol_w + 8), ypos, 2*fheight);
}
}
}
if ((timer.eventType == CTimerd::TIMER_REMOTEBOX) && timer.eventState == CTimerd::TIMERSTATE_ISRUNNING) {
if ((timer.eventType == CTimerd::TIMER_REMOTEBOX) && timer.eventState == CTimerd::TIMERSTATE_ISRUNNING)
{
int icol_w, icol_h;
frameBuffer->getIconSize(NEUTRINO_ICON_REC, &icol_w, &icol_h);
if ((icol_w > 0) && (icol_h > 0)) {
if ((icol_w > 0) && (icol_h > 0))
{
frameBuffer->paintIcon(NEUTRINO_ICON_REC, (x + real_width) - (icol_w + 8), ypos, 2*fheight);
}
}
@@ -1222,7 +1277,8 @@ void CTimerList::paintItem(int pos)
Json::Value root;
Json::Reader reader;
bool parsedSuccess = reader.parse(r_url, root, false);
if (!parsedSuccess) {
if (!parsedSuccess)
{
printf("Failed to parse JSON\n");
printf("%s\n", reader.getFormattedErrorMessages().c_str());
}
@@ -1630,7 +1686,6 @@ int CTimerList::newTimer()
timerNew_standby_on =false;
strncpy(timerNew.recordingDir,g_settings.network_nfs_recordingdir.c_str(),sizeof(timerNew.recordingDir)-1);
CMenuWidget timerSettings(LOCALE_TIMERLIST_MENUNEW, NEUTRINO_ICON_SETTINGS);
timerSettings.addIntroItems();
timerSettings.addItem(new CMenuForwarder(LOCALE_TIMERLIST_SAVE, true, NULL, this, "newtimer", CRCInput::RC_red));
@@ -1652,12 +1707,13 @@ int CTimerList::newTimer()
m_weekdaysStr = "XXXXX--";
CMenuOptionChooser* m3 = new CMenuOptionChooser(LOCALE_TIMERLIST_REPEAT, (int *)&timerNew.eventRepeat, TIMERLIST_REPEAT_OPTIONS, TIMERLIST_REPEAT_OPTION_COUNT, true, &notifier);
CMenuWidget mctv(LOCALE_TIMERLIST_BOUQUETSELECT, NEUTRINO_ICON_SETTINGS);
CMenuWidget mcradio(LOCALE_TIMERLIST_BOUQUETSELECT, NEUTRINO_ICON_SETTINGS);
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) {
if (!g_bouquetManager->Bouquets[i]->bHidden) {
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++)
{
if (!g_bouquetManager->Bouquets[i]->bHidden)
{
CMenuWidget* mwtv = new CMenuWidget(LOCALE_TIMERLIST_CHANNELSELECT, NEUTRINO_ICON_SETTINGS);
toDelete.push_back(mwtv);
CMenuWidget* mwradio = new CMenuWidget(LOCALE_TIMERLIST_CHANNELSELECT, NEUTRINO_ICON_SETTINGS);
@@ -1665,18 +1721,19 @@ int CTimerList::newTimer()
ZapitChannelList channels;
g_bouquetManager->Bouquets[i]->getTvChannels(channels);
for (int j = 0; j < (int) channels.size(); j++) {
for (int j = 0; j < (int) channels.size(); j++)
{
char cChannelId[3+16+1+1];
sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", channels[j]->getChannelID());
mwtv->addItem(new CMenuForwarder(channels[j]->getName(), true, NULL, this, (std::string(cChannelId) + channels[j]->getName()).c_str(), CRCInput::RC_nokey, NULL, channels[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : (channels[j]->getUrl().empty() ? NULL : NEUTRINO_ICON_STREAMING)));
}
if (!channels.empty())
mctv.addItem(new CMenuForwarder(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str() /*g_bouquetManager->Bouquets[i]->Name.c_str()*/, true, NULL, mwtv));
g_bouquetManager->Bouquets[i]->getRadioChannels(channels);
for (int j = 0; j < (int) channels.size(); j++) {
for (int j = 0; j < (int) channels.size(); j++)
{
char cChannelId[3+16+1+1];
sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", channels[j]->getChannelID());
mwradio->addItem(new CMenuForwarder(channels[j]->getName(), true, NULL, this, (std::string(cChannelId) + channels[j]->getName()).c_str(), CRCInput::RC_nokey, NULL, channels[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : (channels[j]->getUrl().empty() ? NULL : NEUTRINO_ICON_STREAMING)));
@@ -1752,12 +1809,10 @@ bool CTimerList::askUserOnRemoteTimerConflict(time_t announceTime, time_t stopTi
int pre,post;
Timer->getRecordingSafety(pre,post);
for (CTimerd::TimerList::iterator it = timerlist.begin();
it != timerlist.end();++it)
for (CTimerd::TimerList::iterator it = timerlist.begin(); it != timerlist.end();++it)
{
if (strcmp(it->remotebox_name,remotebox_name) == 0)
{
if (strcmp(it->remotebox_name,remotebox_name) == 0) {
if (it->stopTime != 0 && stopTime != 0)
{
// Check if both timers have start and end. In this case do not show conflict, if endtime is the same than the starttime of the following timer
@@ -1778,8 +1833,7 @@ bool CTimerList::askUserOnRemoteTimerConflict(time_t announceTime, time_t stopTi
std::string timerbuf = g_Locale->getText(LOCALE_TIMERLIST_OVERLAPPING_TIMER);
timerbuf += "\n";
for (CTimerd::TimerList::iterator it = overlappingTimers.begin();
it != overlappingTimers.end(); ++it)
for (CTimerd::TimerList::iterator it = overlappingTimers.begin(); it != overlappingTimers.end(); ++it)
{
timerbuf += CTimerList::convertTimerType2String(it->eventType);
timerbuf += " (";
@@ -1831,8 +1885,7 @@ bool askUserOnTimerConflict(time_t announceTime, time_t stopTime, t_channel_id c
std::string timerbuf = g_Locale->getText(LOCALE_TIMERLIST_OVERLAPPING_TIMER);
timerbuf += "\n";
for (CTimerd::TimerList::iterator it = overlappingTimers.begin();
it != overlappingTimers.end(); ++it)
for (CTimerd::TimerList::iterator it = overlappingTimers.begin(); it != overlappingTimers.end(); ++it)
{
timerbuf += CTimerList::convertTimerType2String(it->eventType);
timerbuf += " (";