gui/channellist.cpp: start/stop PiP for selected channel on play button

Origin commit data
------------------
Branch: ni/coolstream
Commit: 682c3c4f37
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-02-27 (Wed, 27 Feb 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2013-02-27 11:02:13 +04:00
parent 1155846a3c
commit ac4eb12451

View File

@@ -773,6 +773,21 @@ int CChannelList::show()
loop=false; loop=false;
} }
} }
#ifdef BOXMODEL_APOLLO
else if ( msg == CRCInput::RC_play) {
if(SameTP() && CRecordManager::getInstance()->GetRecordMode(chanlist[selected]->channel_id) == CRecordManager::RECMODE_OFF) {
if (CZapit::getInstance()->GetPipChannelID() == chanlist[selected]->getChannelID()) {
CZapit::getInstance()->StopPip();
paint();
} else {
if (CZapit::getInstance()->StartPip(chanlist[selected]->getChannelID()))
paint();
else
DisplayErrorMessage(g_Locale->getText(LOCALE_VIDEOMENU_PIP_ERROR));
}
}
}
#endif
else if (( msg == CRCInput::RC_spkr ) && g_settings.channellist_new_zap_mode ) { else if (( msg == CRCInput::RC_spkr ) && g_settings.channellist_new_zap_mode ) {
if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) { if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) {
switch (g_settings.channellist_new_zap_mode) { switch (g_settings.channellist_new_zap_mode) {
@@ -1847,11 +1862,19 @@ void CChannelList::paintItem(int pos)
rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[curr]->channel_id); rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[curr]->channel_id);
//set recording icon //set recording icon
const char * rec_icon = ""; std::string rec_icon;
if (rec_mode & CRecordManager::RECMODE_REC) if (rec_mode & CRecordManager::RECMODE_REC)
rec_icon = NEUTRINO_ICON_REC; rec_icon = NEUTRINO_ICON_REC;
else if (rec_mode & CRecordManager::RECMODE_TSHIFT) else if (rec_mode & CRecordManager::RECMODE_TSHIFT)
rec_icon = NEUTRINO_ICON_AUTO_SHIFT; rec_icon = NEUTRINO_ICON_AUTO_SHIFT;
#ifdef BOXMODEL_APOLLO
else if (chanlist[curr]->channel_id == CZapit::getInstance()->GetPipChannelID()) {
int h;
frameBuffer->getIconSize(NEUTRINO_ICON_PIP, &ChannelList_Rec, &h);
rec_icon = NEUTRINO_ICON_PIP;
ChannelList_Rec += 8;
}
#endif
//calculating icons //calculating icons
int icon_x = (x+width-15-2) - RADIUS_LARGE/2; int icon_x = (x+width-15-2) - RADIUS_LARGE/2;
@@ -1866,7 +1889,8 @@ void CChannelList::paintItem(int pos)
r_icon_x = r_icon_x - s_icon_w; r_icon_x = r_icon_x - s_icon_w;
//paint recording icon //paint recording icon
if (rec_mode != CRecordManager::RECMODE_OFF) //if (rec_mode != CRecordManager::RECMODE_OFF)
if (!rec_icon.empty())
frameBuffer->paintIcon(rec_icon, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2); frameBuffer->paintIcon(rec_icon, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2);
//paint buttons //paint buttons