{
}
+void CGUIWindowPVRBase::Notify(const Observable &obs, const ObservableMessage msg)
+{
+ CGUIMessage m(GUI_MSG_REFRESH_LIST, GetID(), 0, msg);
+ CApplicationMessenger::Get().SendGUIMessage(m);
+}
+
bool CGUIWindowPVRBase::OnAction(const CAction &action)
{
switch (action.GetID())
return;
}
+ m_vecItems->SetPath(GetDirectoryPath());
+
CGUIMediaWindow::OnInitWindow();
}
return CGUIMediaWindow::OnMessage(message);
}
+bool CGUIWindowPVRBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
+{
+ bool bReturn = false;
+
+ switch(button)
+ {
+ case CONTEXT_BUTTON_MENU_HOOKS:
+ if (itemNumber >= 0 && itemNumber < m_vecItems->Size())
+ {
+ CFileItemPtr item = m_vecItems->Get(itemNumber);
+
+ if (item->IsEPG() && item->GetEPGInfoTag()->HasPVRChannel())
+ g_PVRClients->ProcessMenuHooks(item->GetEPGInfoTag()->ChannelTag()->ClientID(), PVR_MENUHOOK_EPG, item.get());
+ else if (item->IsPVRChannel())
+ g_PVRClients->ProcessMenuHooks(item->GetPVRChannelInfoTag()->ClientID(), PVR_MENUHOOK_CHANNEL, item.get());
+ else if (item->IsPVRRecording())
+ g_PVRClients->ProcessMenuHooks(item->GetPVRRecordingInfoTag()->m_iClientId, PVR_MENUHOOK_RECORDING, item.get());
+ else if (item->IsPVRTimer())
+ g_PVRClients->ProcessMenuHooks(item->GetPVRTimerInfoTag()->m_iClientId, PVR_MENUHOOK_TIMER, item.get());
+
+ bReturn = true;
+ }
+ break;
+ case CONTEXT_BUTTON_FIND:
+ {
+ int windowSearchId = m_bRadio ? WINDOW_RADIO_SEARCH : WINDOW_TV_SEARCH;
+ CGUIWindowPVRBase *windowSearch = (CGUIWindowPVRBase*) g_windowManager.GetWindow(windowSearchId);
+ if (windowSearch && itemNumber >= 0 && itemNumber < m_vecItems->Size())
+ {
+ CFileItemPtr item = m_vecItems->Get(itemNumber);
+ g_windowManager.ActivateWindow(windowSearchId);
+ bReturn = windowSearch->OnContextButton(*item.get(), button);
+ }
+ break;
+ }
+ default:
+ bReturn = false;
+ }
+
+ return bReturn || CGUIMediaWindow::OnContextButton(itemNumber, button);
+}
+
+void CGUIWindowPVRBase::SetInvalid()
+{
+ VECFILEITEMS items = m_vecItems->GetList();
+ for (VECFILEITEMS::iterator it = items.begin(); it != items.end(); ++it)
+ (*it)->SetInvalid();
+ CGUIMediaWindow::SetInvalid();
+}
+
bool CGUIWindowPVRBase::OpenGroupSelectionDialog(void)
{
CGUIDialogSelect *dialog = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT);
// we need to register the window to receive changes from the new group
m_group->RegisterObserver(this);
g_PVRManager.SetPlayingGroup(m_group);
- Update();
+ Update(GetDirectoryPath());
}
}
return false;
g_PVRChannelGroups->GetGroupAll(channel->IsRadio())->RemoveFromGroup(*channel);
- Update();
+ Refresh(true);
return true;
}
bool CGUIWindowPVRBase::Update(const std::string &strDirectory, bool updateFilterPath /* = true */)
{
+ m_vecItems->SetPath(strDirectory);
return CGUIMediaWindow::Update(strDirectory, updateFilterPath);
}