Example #1
0
void CGUIWindowPVRGuide::OnInputDone()
{
  const int iChannelNumber = GetChannelNumber();
  if (iChannelNumber >= 0)
  {
    for (const CFileItemPtr event : m_vecItems->GetList())
    {
      const CEpgInfoTagPtr tag(event->GetEPGInfoTag());
      if (tag->HasPVRChannel() && tag->PVRChannelNumber() == iChannelNumber)
      {
        CGUIEPGGridContainer* epgGridContainer = dynamic_cast<CGUIEPGGridContainer*>(GetControl(m_viewControl.GetCurrentControl()));
        if (epgGridContainer)
        {
          epgGridContainer->SetChannel(tag->ChannelTag());
          return;
        }
      }
    }
  }
}