Skip to content
This repository
Browse code

Merge pull request #1702 from axmhari/reclist-after-play

Show PVR recordings view after replaying a PVR item.
  • Loading branch information...
commit 4bf192d4c22763510086e7870ae0bace582c1f8a 2 parents 2ff8cca + 42ef712
Michal Piechowiak authored November 21, 2012
2  xbmc/pvr/windows/GUIWindowPVRChannels.cpp
@@ -207,7 +207,7 @@ void CGUIWindowPVRChannels::UpdateData(bool bUpdateSelectedFile /* = true */)
207 207
   CPVRChannelGroupPtr selectedGroup = SelectedGroup();
208 208
 
209 209
   m_iSelected = m_parent->m_viewControl.GetSelectedItem();
210  
-  m_parent->m_viewControl.Clear();
  210
+  ShowBusyItem();
211 211
   m_parent->m_vecItems->Clear();
212 212
   m_parent->m_viewControl.SetCurrentView(m_iControlList);
213 213
 
14  xbmc/pvr/windows/GUIWindowPVRCommon.cpp
@@ -190,6 +190,7 @@ bool CGUIWindowPVRCommon::OnMessageFocus(CGUIMessage &message)
190 190
 void CGUIWindowPVRCommon::OnWindowUnload(void)
191 191
 {
192 192
   m_iSelected = m_parent->m_viewControl.GetSelectedItem();
  193
+  m_history = m_parent->m_history;
193 194
 }
194 195
 
195 196
 bool CGUIWindowPVRCommon::OnAction(const CAction &action)
@@ -869,3 +870,16 @@ bool CGUIWindowPVRCommon::OnContextButtonFind(CFileItem *item, CONTEXT_BUTTON bu
869 870
 
870 871
   return bReturn;
871 872
 }
  873
+
  874
+void CGUIWindowPVRCommon::ShowBusyItem(void)
  875
+{
  876
+  // FIXME: display a temporary entry so that the list can keep its focus
  877
+  // busy_items has to be static, because m_viewControl holds the pointer to it
  878
+  static CFileItemList busy_items;
  879
+  if (busy_items.IsEmpty())
  880
+  {
  881
+    CFileItemPtr pItem(new CFileItem(g_localizeStrings.Get(1040)));
  882
+    busy_items.AddFront(pItem, 0);
  883
+  }
  884
+  m_parent->m_viewControl.SetItems(busy_items);
  885
+}
1  xbmc/pvr/windows/GUIWindowPVRCommon.h
@@ -119,6 +119,7 @@ namespace PVR
119 119
     virtual bool UpdateEpgForChannel(CFileItem *item);
120 120
     virtual bool ShowTimerSettings(CFileItem *item);
121 121
     virtual bool ShowNewTimerDialog(void);
  122
+    virtual void ShowBusyItem(void);
122 123
 
123 124
     virtual bool OnContextButtonMenuHooks(CFileItem *item, CONTEXT_BUTTON button);
124 125
     virtual bool OnContextButtonSortAsc(CFileItem *item, CONTEXT_BUTTON button);
2  xbmc/pvr/windows/GUIWindowPVRGuide.cpp
@@ -270,7 +270,7 @@ void CGUIWindowPVRGuide::UpdateData(bool bUpdateSelectedFile /* = true */)
270 270
 
271 271
   /* lock the graphics context while updating */
272 272
   CSingleLock graphicsLock(g_graphicsContext);
273  
-  m_parent->m_viewControl.Clear();
  273
+  ShowBusyItem();
274 274
   m_parent->m_vecItems->Clear();
275 275
 
276 276
   if (m_iGuideView == GUIDE_VIEW_CHANNEL)
2  xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
@@ -208,7 +208,7 @@ void CGUIWindowPVRRecordings::UpdateData(bool bUpdateSelectedFile /* = true */)
208 208
   else
209 209
     m_strSelectedPath = m_parent->m_vecItems->GetPath();
210 210
 
211  
-  m_parent->m_viewControl.Clear();
  211
+  ShowBusyItem();
212 212
   m_parent->m_vecItems->Clear();
213 213
   m_parent->m_viewControl.SetCurrentView(m_iControlList);
214 214
   m_parent->m_vecItems->SetPath(m_strSelectedPath);
2  xbmc/pvr/windows/GUIWindowPVRSearch.cpp
@@ -101,7 +101,7 @@ void CGUIWindowPVRSearch::UpdateData(bool bUpdateSelectedFile /* = true */)
101 101
   CSingleLock graphicsLock(g_graphicsContext);
102 102
 
103 103
   m_iSelected = m_parent->m_viewControl.GetSelectedItem();
104  
-  m_parent->m_viewControl.Clear();
  104
+  ShowBusyItem();
105 105
   m_parent->m_vecItems->Clear();
106 106
   m_parent->m_viewControl.SetCurrentView(m_iControlList);
107 107
 
2  xbmc/pvr/windows/GUIWindowPVRTimers.cpp
@@ -105,7 +105,7 @@ void CGUIWindowPVRTimers::UpdateData(bool bUpdateSelectedFile /* = true */)
105 105
   CSingleLock graphicsLock(g_graphicsContext);
106 106
 
107 107
   m_iSelected = m_parent->m_viewControl.GetSelectedItem();
108  
-  m_parent->m_viewControl.Clear();
  108
+  ShowBusyItem();
109 109
   m_parent->m_vecItems->Clear();
110 110
   m_parent->m_viewControl.SetCurrentView(m_iControlList);
111 111
   m_parent->m_vecItems->SetPath("pvr://timers/");

1 note on commit 4bf192d

Ard van der Leeuw

This commit seems to break the EPG timeline for me... Haven't been able to figure out why, yet.

Please sign in to comment.
Something went wrong with that request. Please try again.