[pvr] fix hiding the "go to parent directory" item in the root of the
[vuplus_xbmc] / xbmc / pvr / windows / GUIWindowPVRBase.cpp
index 59ba0e0..8164493 100644 (file)
@@ -156,7 +156,18 @@ bool CGUIWindowPVRBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
         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;
   }
@@ -662,6 +673,7 @@ bool CGUIWindowPVRBase::UpdateEpgForChannel(CFileItem *item)
 
 bool CGUIWindowPVRBase::Update(const std::string &strDirectory, bool updateFilterPath /* = true */)
 {
+  m_vecItems->SetPath(strDirectory);
   return CGUIMediaWindow::Update(strDirectory, updateFilterPath);
 }