aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-01-05 14:48:32 -0800
committerjmarshallnz <jcmarsha@gmail.com>2014-01-05 14:48:32 -0800
commit69d8ad6380aa12259590b48d403972f731de719e (patch)
tree35fb63d462e4fec32052ca4ac9768a8df417f04b
parentf9e059cbe977146389d0553483ff84de7b892f4f (diff)
parentf23fdfdd3abc97449deaff4258781c84b2efbc8f (diff)
Merge pull request #3958 from jmarshallnz/epg_nav_back
[epg] handle <onback> just like every other control
-rw-r--r--xbmc/epg/GUIEPGGridContainer.cpp1
-rw-r--r--xbmc/pvr/windows/GUIWindowPVR.cpp9
-rw-r--r--xbmc/pvr/windows/GUIWindowPVR.h1
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRCommon.cpp11
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRRecordings.cpp8
5 files changed, 15 insertions, 15 deletions
diff --git a/xbmc/epg/GUIEPGGridContainer.cpp b/xbmc/epg/GUIEPGGridContainer.cpp
index 5c984ee91e..11a826e0a3 100644
--- a/xbmc/epg/GUIEPGGridContainer.cpp
+++ b/xbmc/epg/GUIEPGGridContainer.cpp
@@ -675,6 +675,7 @@ bool CGUIEPGGridContainer::OnAction(const CAction &action)
case ACTION_MOVE_RIGHT:
case ACTION_MOVE_DOWN:
case ACTION_MOVE_UP:
+ case ACTION_NAV_BACK:
{ // use base class implementation
return CGUIControl::OnAction(action);
diff --git a/xbmc/pvr/windows/GUIWindowPVR.cpp b/xbmc/pvr/windows/GUIWindowPVR.cpp
index e840203502..5639cac28a 100644
--- a/xbmc/pvr/windows/GUIWindowPVR.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVR.cpp
@@ -30,6 +30,7 @@
#include "pvr/addons/PVRClients.h"
#include "guilib/GUIMessage.h"
#include "guilib/GUIWindowManager.h"
+#include "guilib/Key.h"
#include "dialogs/GUIDialogBusy.h"
#include "dialogs/GUIDialogKaiToast.h"
#include "threads/SingleLock.h"
@@ -136,6 +137,14 @@ bool CGUIWindowPVR::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
CGUIMediaWindow::OnContextButton(itemNumber, button);
}
+bool CGUIWindowPVR::OnBack(int actionID)
+{
+ if (actionID == ACTION_NAV_BACK)
+ // don't call CGUIMediaWindow as it will attempt to go to the parent folder which we don't want.
+ return CGUIWindow::OnBack(actionID);
+ return CGUIMediaWindow::OnBack(actionID);
+}
+
void CGUIWindowPVR::OnInitWindow(void)
{
if (!g_PVRManager.IsStarted() || !g_PVRClients->HasConnectedClients())
diff --git a/xbmc/pvr/windows/GUIWindowPVR.h b/xbmc/pvr/windows/GUIWindowPVR.h
index 7063dd259f..44f8972f44 100644
--- a/xbmc/pvr/windows/GUIWindowPVR.h
+++ b/xbmc/pvr/windows/GUIWindowPVR.h
@@ -68,6 +68,7 @@ namespace PVR
virtual void SetLabel(int iControl, int iLabel);
virtual void UpdateButtons(void);
virtual bool Update(const CStdString &strDirectory, bool updateFilterPath = true);
+ virtual bool OnBack(int actionID);
private:
virtual bool OnMessageFocus(CGUIMessage &message);
diff --git a/xbmc/pvr/windows/GUIWindowPVRCommon.cpp b/xbmc/pvr/windows/GUIWindowPVRCommon.cpp
index 7793c8165c..0516a80881 100644
--- a/xbmc/pvr/windows/GUIWindowPVRCommon.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRCommon.cpp
@@ -198,16 +198,7 @@ void CGUIWindowPVRCommon::OnWindowUnload(void)
bool CGUIWindowPVRCommon::OnAction(const CAction &action)
{
- bool bReturn = false;
-
- if (action.GetID() == ACTION_NAV_BACK ||
- action.GetID() == ACTION_PREVIOUS_MENU)
- {
- g_windowManager.PreviousWindow();
- bReturn = true;
- }
-
- return bReturn;
+ return false; // CGUIWindowPVR will handle any default actions
}
bool CGUIWindowPVRCommon::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
diff --git a/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp b/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
index aef5400c8a..1c7a69739f 100644
--- a/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
@@ -164,13 +164,11 @@ bool CGUIWindowPVRRecordings::OnAction(const CAction &action)
action.GetID() == ACTION_NAV_BACK)
{
if (m_parent->m_vecItems->GetPath() != "pvr://recordings/")
+ {
m_parent->GoParentFolder();
- else if (action.GetID() == ACTION_NAV_BACK)
- g_windowManager.PreviousWindow();
-
- return true;
+ return true;
+ }
}
-
return CGUIWindowPVRCommon::OnAction(action);
}